public void setOmitSuper(boolean omitSuper) { if (fOmitSuper != omitSuper) { fOmitSuper= omitSuper; fGenConstructorSettings.put(OMIT_SUPER, omitSuper); } } }
public void writeDialogSettings() { dialogSettings.put(SETTINGS_LIMITELEMENTS, limitElements); dialogSettings.put(SETTINGS_IGNOREDEFAULT, customArrayToString); dialogSettings.put(SETTINGS_STRINGSTYLE, toStringStyle); dialogSettings.put(SETTINGS_LIMITVALUE, limitValue); dialogSettings.put(SETTINGS_SKIPNULLS, skipNulls); dialogSettings.put(SETTINGS_SELECTED_TEMPLATE, stringFormatTemplateNumber); }
private void saveBounds(Rectangle bounds) { IDialogSettings dialogBounds= fSettings.getSection(DIALOG_BOUNDS_KEY); if (dialogBounds == null) { dialogBounds= new DialogSettings(DIALOG_BOUNDS_KEY); fSettings.addSection(dialogBounds); } dialogBounds.put(X, bounds.x); dialogBounds.put(Y, bounds.y); dialogBounds.put(WIDTH, bounds.width); dialogBounds.put(HEIGHT, bounds.height); } }
/** * Sets whether the optional dialog is enabled and should be shown. */ public static void setDialogEnabled(String key, boolean isEnabled) { IDialogSettings settings= getDialogSettings(); settings.put(key, !isEnabled); }
@Override public void widgetSelected(SelectionEvent event) { final Integer selectedModifier= (Integer)event.widget.getData(); fSettings.put(ACCESS_MODIFIER, selectedModifier.intValue()); setVisibility(selectedModifier); } });
@Override public void widgetSelected(SelectionEvent e) { fPreview.showInvisibleCharacters(showInvisibleButton.getSelection()); fDialogSettings.put(SHOW_INVISIBLE_PREFERENCE_KEY, showInvisibleButton.getSelection()); } });
public boolean close() { fSettings.put(SETTINGS_VISIBILITY_MODIFIER, StringConverter.asString(fVisibilityModifier)); fSettings.put(SETTINGS_FINAL_MODIFIER, StringConverter.asString(fFinal)); fSettings.put(SETTINGS_SYNCHRONIZED_MODIFIER, StringConverter.asString(fSynchronized)); if (fCurrentPositionIndex == 0 || fCurrentPositionIndex == 1) { fSettings.put(SETTINGS_INSERTPOSITION, StringConverter.asString(fCurrentPositionIndex)); } fSettings.put(SETTINGS_COMMENTS, fGenerateComment); return super.close(); }
protected void saveState() { try (ByteArrayOutputStream out= new ByteArrayOutputStream()) { writeExpansionState(fRoot, out); fDialogSettings.put(fKeyPreferenceTreeExpansion, out.toString("UTF-8")); //$NON-NLS-1$ } catch (IOException e) { throw new AssertionError(e); } int scrollPosition= getScrolledPageContent().getOrigin().y; fDialogSettings.put(fKeyPreferenceScrollPosition, scrollPosition); }
private void applyChanges() { getDialogSettings().put(ToStringGenerationSettings.SETTINGS_TEMPLATE_NAMES, templateNames.toArray(new String[0])); getDialogSettings().put(ToStringGenerationSettings.SETTINGS_TEMPLATES, templates.toArray(new String[0])); getGenerationSettings().stringFormatTemplateNumber= Math.max(selectedTemplateNumber, 0); somethingChanged= false; getButton(APPLY_BUTTON).setEnabled(false); }
public void widgetSelected(SelectionEvent e) { final TabItem tabItem= (TabItem)e.item; final ModifyDialogTabPage page= (ModifyDialogTabPage)tabItem.getData(); // page.fSashForm.setWeights(); fDialogSettings.put(fKeyLastFocus, fTabPages.indexOf(page)); page.makeVisible(); } });
public SearchInDialog(Shell parentShell) { super(parentShell); fSettings= JavaPlugin.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS_SECTION); if (fSettings == null) { fSettings= JavaPlugin.getDefault().getDialogSettings().addNewSection(DIALOG_SETTINGS_SECTION); fSettings.put(SEARCH_IN_SOURCES, true); fSettings.put(SEARCH_IN_PROJECTS, true); fSettings.put(SEARCH_IN_JRE, true); fSettings.put(SEARCH_IN_APPLIBS, true); } fIncludeMask= getInt(fKeys); }
@Override public void focusGained(FocusEvent e) { PreferenceTreeNode<?> focusNode= fControl2node.get(e.getSource()); if (focusNode != null && focusNode != fCurrentlyFocused) { highlightCurrent(false); fCurrentlyFocused= focusNode; highlightCurrent(true); updatePreviewCode(); } fDialogSettings.put(fKeyLastFocusIndex, fItemMap.get(e.widget).intValue()); }
public void dispose() { if (fDeleteSubPackagesCheckBox != null && saveSettings()) getRefactoringSettings().put(DIALOG_SETTINGS_DELETE_SUB_PACKAGES, fDeleteSubPackagesCheckBox.getSelection()); super.dispose(); }
public boolean close() { Point point= getShell().getSize(); fSettings.put(PREF_USER_LIBRARY_LOADSAVE_SIZE, StringConverter.asString(point)); return super.close(); }
private void loadSettings() { fSettings= getDialogSettings().getSection(ExtractMethodWizard.DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(ExtractMethodWizard.DIALOG_SETTING_SECTION); fSettings.put(THROW_RUNTIME_EXCEPTIONS, false); fSettings.put(GENERATE_JAVADOC, JavaPreferencesSettings.getCodeGenerationSettings(fRefactoring.getCompilationUnit().getJavaProject()).createComments); } fRefactoring.setThrowRuntimeExceptions(fSettings.getBoolean(THROW_RUNTIME_EXCEPTIONS)); }
public AddUnimplementedConstructorsDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, CompilationUnitEditor editor, IType type) throws JavaModelException { super(parent, labelProvider, contentProvider, editor, type, true); IDialogSettings dialogSettings= JavaPlugin.getDefault().getDialogSettings(); fAddConstructorsSettings= dialogSettings.getSection(SETTINGS_SECTION); if (fAddConstructorsSettings == null) { fAddConstructorsSettings= dialogSettings.addNewSection(SETTINGS_SECTION); fAddConstructorsSettings.put(OMIT_SUPER, false); } fOmitSuper= fAddConstructorsSettings.getBoolean(OMIT_SUPER); }
@Override public void dispose() { if (saveSettings()) if (fUpdateSimilarElements != null && !fUpdateSimilarElements.isDisposed() && fUpdateSimilarElements.isEnabled()) { saveBooleanSetting(RenameRefactoringWizard.TYPE_UPDATE_SIMILAR_ELEMENTS, fUpdateSimilarElements); getRefactoringSettings().put(RenameRefactoringWizard.TYPE_SIMILAR_MATCH_STRATEGY, fSelectedStrategy); } super.dispose(); }
private void loadSettings() { fSettings= getDialogSettings().getSection(UseSupertypeWizard.DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(UseSupertypeWizard.DIALOG_SETTING_SECTION); fSettings.put(REWRITE_INSTANCEOF, false); } getUseSupertypeProcessor().setInstanceOf(fSettings.getBoolean(REWRITE_INSTANCEOF)); }