@Override protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings); if (settings.get(S_OPTIONAL_ATTRIBUTES) != null) { boolean state = settings.getBoolean(S_OPTIONAL_ATTRIBUTES); optionalAttributesAction.setChecked(state); } addListFilter(optionalAttributesFilter); applyFilter(); }
@Override protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings); boolean showDerived = settings.getBoolean(SHOW_DERIVED); showDerivedResourcesAction.setChecked(showDerived); this.isDerived = showDerived; boolean groupByLoation = settings.getBoolean(FILTER_BY_LOCATION); this.groupResourcesByLocationAction.setChecked(groupByLoation); this.filterResourceByLocation.setEnabled(groupByLoation); addListFilter(this.filterResourceByLocation); String setting = settings.get(WORKINGS_SET_SETTINGS); if (setting != null) { try { IMemento memento = XMLMemento.createReadRoot(new StringReader( setting)); workingSetFilterActionGroup.restoreState(memento); } catch (WorkbenchException e) { StatusManager.getManager().handle( new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IStatus.ERROR, "", e)); //$NON-NLS-1$ // don't do anything. Simply don't restore the settings } } addListFilter(workingSetFilter); applyFilter(); }
@Override protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings); if (fAllowScopeSwitching) { String setting= settings.get(WORKINGS_SET_SETTINGS); if (setting != null) { try { IMemento memento= XMLMemento.createReadRoot(new StringReader(setting)); fFilterActionGroup.restoreState(memento); } catch (WorkbenchException e) { // don't do anything. Simply don't restore the settings JavaPlugin.log(e); } } IWorkingSet ws= fFilterActionGroup.getWorkingSet(); if (ws == null || (ws.isAggregateWorkingSet() && ws.isEmpty())) { setSearchScope(SearchEngine.createWorkspaceScope()); setSubtitle(null); } else { setSearchScope(JavaSearchScopeFactory.getInstance().createJavaSearchScope(ws, true)); setSubtitle(ws.getLabel()); } } // TypeNameMatch[] types = OpenTypeHistory.getInstance().getTypeInfos(); // // for (int i = 0; i < types.length; i++) { // TypeNameMatch type = types[i]; // accessedHistoryItem(type); // } }
restoreDialog(getDialogSettings());
protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings);
@Override protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings);
@Override protected void restoreDialog(IDialogSettings settings) { super.restoreDialog(settings); if (settings.get(S_EXTENSIONS) != null) { boolean state = settings.getBoolean(S_EXTENSIONS); extensionsAction.setChecked(state); } if (settings.get(S_EXTENSION_POINTS) != null) { boolean state = settings.getBoolean(S_EXTENSION_POINTS); extensionPointsAction.setChecked(state); } if (settings.get(S_EXPORTED_PACKAGES) != null) { boolean state = settings.getBoolean(S_EXPORTED_PACKAGES); exportedPackagesAction.setChecked(state); } if (settings.get(S_FEATURES) != null) { boolean state = settings.getBoolean(S_FEATURES); featuresAction.setChecked(state); } addListFilter(extensionsFilter); addListFilter(extensionPointsFilter); addListFilter(exportedPackagesFilter); addListFilter(featuresFilter); applyFilter(); }