Autobuild on the startup of a plugin [message #157163] |
Fri, 14 November 2003 21:55 |
Del Myers![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=delmyers%40cs.uvic.ca) Messages: 69 Registered: July 2009 |
Member |
|
|
I know I'll get into a lot of trouble for this because a lot of people
really like autobuild. But if you could help me out anyway, that would be
awesome :-).
I have a plugin that needs to turn off the workspaces's autobuild the first
time (and only the first time) that it is loaded. I have this right now:
public void startup() throws CoreException {
super.startup();
IPreferenceStore store = getPreferenceStore();
IPreferenceStore workbenchPS = getWorkbench().getPreferenceStore();
//this is set to true in the initializeDefaultPreferences
boolean firstLoad = store.getBoolean(FIRST_LOAD);
setActionSets = false;
if (firstLoad) {
log("first load");
IWorkspace workspace = getWorkspace();
IWorkspaceDescription workspaceDesc = workspace.getDescription();
//shut off auto-building, only on the
//first time that the plugin is run
workspaceDesc.setAutoBuilding(false);
workspace.setDescription(workspaceDesc);
workbenchPS.setValue("AUTO_BUILD", false);
//to ensure that auto-building is turned off at most one time,
//set a value in the preference store to say that no subsequent
//calls to startup() will be the first load of this plugin.
store.setValue(FIRST_LOAD, false);
}
}
When I install this plugin as a part of a feature that I am deploying, all
of the code to turn off autobuilding runs, but autobuilding is not turned
off. Does anyone have any idea why this may be? Would there be something
else in the Eclipse platform that is turning on autobuild?
Del
|
|
|
Powered by
FUDForum. Page generated in 0.03086 seconds