Java Code Examples for org.eclipse.jdt.internal.ui.JavaPlugin#flushInstanceScope()

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPlugin#flushInstanceScope() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeFilterPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public boolean performOk() {
 		IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();

 		List<String> checked= fFilterListField.getCheckedElements();
 		List<String> unchecked= fFilterListField.getElements();
 		unchecked.removeAll(checked);

 		prefs.setValue(PREF_FILTER_ENABLED, packOrderList(checked));
 		prefs.setValue(PREF_FILTER_DISABLED, packOrderList(unchecked));
	JavaPlugin.flushInstanceScope();

	Hashtable<String, String> coreOptions= JavaCore.getOptions();
	String hideForbidden= fHideForbiddenField.isSelected() ? JavaCore.ENABLED : JavaCore.DISABLED;
	coreOptions.put(JavaCore.CODEASSIST_FORBIDDEN_REFERENCE_CHECK, hideForbidden);
	String hideDiscouraged= fHideDiscouragedField.isSelected() ? JavaCore.ENABLED : JavaCore.DISABLED;
	coreOptions.put(JavaCore.CODEASSIST_DISCOURAGED_REFERENCE_CHECK, hideDiscouraged);
	JavaCore.setOptions(coreOptions);

       return true;
   }
 
Example 2
Source File: AppearancePreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public boolean performOk() {
	IPreferenceStore prefs= getPreferenceStore();
	prefs.setValue(PREF_METHOD_RETURNTYPE, fShowMethodReturnType.isSelected());
	prefs.setValue(PREF_METHOD_TYPEPARAMETERS, fShowMethodTypeParameters.isSelected());
	prefs.setValue(PREF_CATEGORY, fShowCategory.isSelected());
	prefs.setValue(SHOW_CU_CHILDREN, fShowMembersInPackageView.isSelected());
	prefs.setValue(STACK_BROWSING_VIEWS_VERTICALLY, fStackBrowsingViewsVertically.isSelected());
	prefs.setValue(PREF_PKG_NAME_PATTERN_FOR_PKG_VIEW, fPackageNamePattern.getText());
	prefs.setValue(PREF_COMPRESS_PACKAGE_NAMES, fCompressPackageNames.isSelected());
	prefs.setValue(PREF_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW, fAbbreviatePackageNamePattern.getText());
	prefs.setValue(PREF_ABBREVIATE_PACKAGE_NAMES, fAbbreviatePackageNames.isSelected());
	prefs.setValue(PREF_FOLD_PACKAGES_IN_PACKAGE_EXPLORER, fFoldPackagesInPackageExplorer.isSelected());
	JavaPlugin.flushInstanceScope();
	return super.performOk();
}
 
Example 3
Source File: CompletionProposalComputerRegistry.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void updateUninstalledComputerCount() {
	IPreferenceStore preferenceStore= PreferenceConstants.getPreferenceStore();
	fIsFirstTimeCheckForUninstalledComputers= !preferenceStore.contains(NUM_COMPUTERS_PREF_KEY);
	int lastNumberOfComputers= preferenceStore.getInt(NUM_COMPUTERS_PREF_KEY);
	int currNumber= fDescriptors.size();
	fHasUninstalledComputers= lastNumberOfComputers > currNumber;
	preferenceStore.putValue(NUM_COMPUTERS_PREF_KEY, Integer.toString(currNumber));
	JavaPlugin.flushInstanceScope();
}
 
Example 4
Source File: MembersOrderPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public boolean performOk() {

	//save preferences for both dialog lists
	IPreferenceStore store= getPreferenceStore();
	updateList(store, fSortOrderList, PREF_OUTLINE_SORT_OPTION);
	updateList(store, fVisibilityOrderList, PREF_VISIBILITY_SORT_OPTION);

	//update the button setting
	store.setValue(PREF_USE_VISIBILITY_SORT_OPTION, fUseVisibilitySortField.isSelected());
	JavaPlugin.flushInstanceScope();

	return true;
}
 
Example 5
Source File: JavaTemplatePreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public boolean performOk() {
	boolean ok= super.performOk();
	JavaPlugin.flushInstanceScope();
	return ok;
}
 
Example 6
Source File: PropertiesFileEditorPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public boolean performOk() {
	fOverlayStore.propagate();
	JavaPlugin.flushInstanceScope();
	return true;
}
 
Example 7
Source File: ClasspathVariablesPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public boolean performOk() {
	JavaPlugin.flushInstanceScope();
	return fVariableBlock.performOk();
}
 
Example 8
Source File: AbstractConfigurationBlockPreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 3 votes vote down vote up
@Override
public boolean performOk() {

	fConfigurationBlock.performOk();

	fOverlayStore.propagate();

	JavaPlugin.flushInstanceScope();

	return true;
}