eclipse plugin: Remove existing paths from an install...
...when we remove it
This commit is contained in:
parent
cf286d7c2f
commit
385536a891
1 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,7 @@ import org.eclipse.core.runtime.Path;
|
|||
import org.eclipse.jface.preference.DirectoryFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditor;
|
||||
import org.eclipse.jface.preference.FileFieldEditor;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.StringFieldEditor;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.jface.viewers.ArrayContentProvider;
|
||||
|
@ -306,6 +307,14 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
installs_.remove( install.Name );
|
||||
installsTableViewer_.refresh();
|
||||
|
||||
// unset all settings.
|
||||
IPreferenceStore prefs = Preferences.getPreferences( );
|
||||
String installPrefix = Preferences.getInstallPrefix( install.Name );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_EXEC_PATH );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_USER_DIR );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_WMLTOOLS_DIR );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_WORKING_DIR );
|
||||
|
||||
if ( install.Name.equals( Preferences.getDefaultInstallName( ) ) ) {
|
||||
Preferences.setDefaultInstallName( "" ); //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue