public DeleteWorkingsetsMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) { super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex); IDialogSettings section = getDialogSettings(); fDeleteBreakpoints = section.getBoolean(DELETE_BREAKPOINTS); fDeleteWorkingsets = section.getBoolean(DELETE_WORKINGSETS); }
private void loadSettings() { IDialogSettings settings = getDialogSettings(); if (settings != null) { fApiAnalysisButton.setSelection(settings.getBoolean(S_API_ANALYSIS)); } }
/** * Answers whether the optional dialog is enabled and should be shown. */ public static boolean isDialogEnabled(String key) { IDialogSettings settings = getDialogSettings(); return !settings.getBoolean(key); }
private void restoreWidgetValues() { IDialogSettings settings = getDialogSettings(); if (settings != null && settings.get(STORE_NESTED_PROJECTS) != null) { nestedProjects = settings.getBoolean(STORE_NESTED_PROJECTS); nestedProjectsCheckbox.setSelection(nestedProjects); lastNestedProjects = nestedProjects; } }
private void contributeToDropDownMenu(IMenuManager manager) { manager.add(fHideFragmentFilterAction); manager.add(fHideOptionalFilterAction); IDialogSettings settings = getSettings(); boolean hideFragments = settings.getBoolean(HIDE_FRAGMENTS); boolean hideOptional = settings.getBoolean(HIDE_OPTIONAL); fHideFragmentFilterAction.setChecked(!hideFragments); fHideOptionalFilterAction.setChecked(!hideOptional); // The filtering will be executed in the setActive function when the viewer is displayed }
@Override protected void updatePreviewCode() { if (fDialogSettings.getBoolean(CUSTOM_PREVIEW_TOGGLE_PREFERENCE_KEY)) { String previewText= fDialogSettings.get(CUSTOM_PREVIEW_CONTENT_PREFERENCE_KEY); if (previewText == null) previewText= "// " + FormatterMessages.FormatterModifyDialog_preview_custom_contents_default_comment; //$NON-NLS-1$ fPreview.setPreviewText(previewText, CodeFormatter.K_UNKNOWN); } else { super.updatePreviewCode(); } }
private void loadSettings() { fSettings= getDialogSettings().getSection(DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(DIALOG_SETTING_SECTION); fSettings.put(ASSUME_CLONE_RETURNS_SAME_TYPE, true); fSettings.put(LEAVE_UNCONSTRAINED_RAW, true); } fRefactoring.setAssumeCloneReturnsSameType(fSettings.getBoolean(ASSUME_CLONE_RETURNS_SAME_TYPE)); fRefactoring.setLeaveUnconstrainedRaw(fSettings.getBoolean(LEAVE_UNCONSTRAINED_RAW)); }
private void loadSettings() { fSettings= getDialogSettings().getSection(DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(DIALOG_SETTING_SECTION); fSettings.put(ASSUME_CLONE_RETURNS_SAME_TYPE, true); fSettings.put(LEAVE_UNCONSTRAINED_RAW, true); } fRefactoring.setAssumeCloneReturnsSameType(fSettings.getBoolean(ASSUME_CLONE_RETURNS_SAME_TYPE)); fRefactoring.setLeaveUnconstrainedRaw(fSettings.getBoolean(LEAVE_UNCONSTRAINED_RAW)); }
public void init(IDialogSettings settings) { boolean enabled= false; String[] selectedEnums= defaultSelectedEnums(); if (settings != null) { IDialogSettings section= settings.getSection(dialogSettingsSectionName()); if (section != null) { enabled= section.getBoolean(SETTINGS_ENABLED); selectedEnums= section.getArray(SETTINGS_SELECTED_ENUMS); } } applyInitialSettings(enabled, selectedEnums); }
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); }
private void loadSettings() { fSettings= getDialogSettings().getSection(ExtractTempWizard.DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(ExtractTempWizard.DIALOG_SETTING_SECTION); fSettings.put(DECLARE_FINAL, false); fSettings.put(REPLACE_ALL, true); } getExtractTempRefactoring().setDeclareFinal(fSettings.getBoolean(DECLARE_FINAL)); getExtractTempRefactoring().setReplaceAllOccurrences(fSettings.getBoolean(REPLACE_ALL)); }
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 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(); }
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)); }
private ShowOnlyMainTypeAction(TreeViewer outlineViewer) { super(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_label, IAction.AS_CHECK_BOX); setToolTipText(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_tooltip); setDescription(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_description); JavaPluginImages.setLocalImageDescriptors(this, "gointo_toplevel_type.png"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GO_INTO_TOP_LEVEL_TYPE_ACTION); fOutlineViewer= outlineViewer; boolean showclass= getDialogSettings().getBoolean(STORE_GO_INTO_TOP_LEVEL_TYPE_CHECKED); setTopLevelTypeOnly(showclass); }
private ShowOnlyMainTypeAction(TreeViewer outlineViewer) { super(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_label, IAction.AS_CHECK_BOX); setToolTipText(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_tooltip); setDescription(TextMessages.JavaOutlineInformationControl_GoIntoTopLevelType_description); JavaPluginImages.setLocalImageDescriptors(this, "gointo_toplevel_type.gif"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GO_INTO_TOP_LEVEL_TYPE_ACTION); fOutlineViewer= outlineViewer; boolean showclass= getDialogSettings().getBoolean(STORE_GO_INTO_TOP_LEVEL_TYPE_CHECKED); setTopLevelTypeOnly(showclass); }
@Override public void initialize(ISynchronizePageConfiguration configuration) { // Load our setting before invoking super since the inherited // initialize will create the provider IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings(); ChangeSetCapability changeSetCapability = getChangeSetCapability(getConfiguration()); enabled = changeSetCapability != null && changeSetCapability.enableChangeSetsByDefault(); if(pageSettings != null && pageSettings.get(P_COMMIT_SET_ENABLED) != null) { enabled = pageSettings.getBoolean(P_COMMIT_SET_ENABLED); } super.initialize(configuration); }
private LexicalSortingAction(TreeViewer outlineViewer) { super(TextMessages.JavaOutlineInformationControl_LexicalSortingAction_label, IAction.AS_CHECK_BOX); setToolTipText(TextMessages.JavaOutlineInformationControl_LexicalSortingAction_tooltip); setDescription(TextMessages.JavaOutlineInformationControl_LexicalSortingAction_description); JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); //$NON-NLS-1$ fOutlineViewer= outlineViewer; boolean checked=getDialogSettings().getBoolean(STORE_LEXICAL_SORTING_CHECKED); setChecked(checked); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.LEXICAL_SORTING_BROWSING_ACTION); }
private void loadSettings() { fSettings= getDialogSettings().getSection(SelfEncapsulateFieldWizard.DIALOG_SETTING_SECTION); if (fSettings == null) { fSettings= getDialogSettings().addNewSection(SelfEncapsulateFieldWizard.DIALOG_SETTING_SECTION); fSettings.put(GENERATE_JAVADOC, JavaPreferencesSettings.getCodeGenerationSettings(fRefactoring.getField().getJavaProject()).createComments); } fRefactoring.setGenerateJavadoc(fSettings.getBoolean(GENERATE_JAVADOC)); }
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)); }