eclipse plugin: prevent duplicate PreferencesDialog show ups
This commit is contained in:
parent
02eca40f94
commit
6ab6612fbe
2 changed files with 8 additions and 1 deletions
|
@ -34,6 +34,8 @@ public class Activator extends AbstractUIPlugin
|
|||
// a switch for knowing if we already started checking conditions
|
||||
private static boolean checkingConditions = false;
|
||||
|
||||
public static boolean IsSettingUpWorkspace = false;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -84,7 +86,9 @@ public class Activator extends AbstractUIPlugin
|
|||
Messages.Activator_3 +
|
||||
Messages.Activator_4 +
|
||||
Messages.Activator_5);
|
||||
WorkspaceUtils.setupWorkspace(true);
|
||||
|
||||
if (IsSettingUpWorkspace == false)
|
||||
WorkspaceUtils.setupWorkspace(true);
|
||||
}
|
||||
}
|
||||
return plugin;
|
||||
|
|
|
@ -10,6 +10,7 @@ package org.wesnoth.handlers;
|
|||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.wesnoth.Activator;
|
||||
import org.wesnoth.utils.WorkspaceUtils;
|
||||
|
||||
|
||||
|
@ -17,7 +18,9 @@ public class SetupWorkspaceHandler extends AbstractHandler
|
|||
{
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) {
|
||||
Activator.IsSettingUpWorkspace = true;
|
||||
WorkspaceUtils.setupWorkspace(false);
|
||||
Activator.IsSettingUpWorkspace = false;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue