@Override
 protected IDialogSettings getDialogBoundsSettings() {
   IDialogSettings settings = Activator.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION_NAME);
   if (section == null) section = settings.addNewSection(DIALOG_SETTINGS_SECTION_NAME);
   return section;
 }
Exemple #2
0
 /**
  * Finds or creates a dialog settings section that is used to make the dialog control settings
  * persistent
  */
 public IDialogSettings getSettingsSection(IDialogSettings master) {
   IDialogSettings settings = master.getSection(SETTINGS_SECTION);
   if (settings == null) {
     settings = master.addNewSection(SETTINGS_SECTION);
   }
   return settings;
 }
  /**
   * Saves the state of the filter into the given dialog settings.
   *
   * @param dialogSettings the dialog settings
   */
  public void saveState(final IDialogSettings dialogSettings) {

    if (dialogSettings != null) {
      IDialogSettings settings = dialogSettings.getSection(TAG_DIALOG_SECTION);

      if (settings == null) {
        settings = dialogSettings.addNewSection(TAG_DIALOG_SECTION);
      }

      settings.put(TAG_ENABLED, this.mEnabled);
      settings.put(TAG_ON_RESOURCE, this.mOnResource);

      if (this.mWorkingSet != null) {
        settings.put(TAG_WORKING_SET, this.mWorkingSet.getName());
      }

      settings.put(TAG_SELECT_BY_SEVERITY, this.mSelectBySeverity);
      settings.put(TAG_SEVERITY, this.mSeverity);

      settings.put(TAG_SELECT_BY_REGEX, this.mFilterByRegex);

      if (this.mFilterRegex != null) {
        settings.put(
            TAG_REGULAR_EXPRESSIONS,
            (String[]) this.mFilterRegex.toArray(new String[this.mFilterRegex.size()]));
      }
    }
  }
Exemple #4
0
 /* (non-Javadoc)
  * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
  */
 protected IDialogSettings getDialogBoundsSettings() {
   IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(SETTINGS_ID);
   if (section == null) {
     section = settings.addNewSection(SETTINGS_ID);
   }
   return section;
 }
Exemple #5
0
 /* (non-Javadoc)
  * @see org.eclipse.jface.window.Dialog#getDialogBoundsSettings()
  *
  * @since 3.2
  */
 protected IDialogSettings getDialogBoundsSettings() {
   IDialogSettings settings = IDEWorkbenchPlugin.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
   if (section == null) {
     section = settings.addNewSection(DIALOG_SETTINGS_SECTION);
   }
   return section;
 }
Exemple #6
0
 /** Saves the state of the widgets on the page */
 void saveWidgetState() {
   IDialogSettings rootsettings = ApiUIPlugin.getDefault().getDialogSettings();
   IDialogSettings settings = rootsettings.getSection(SETTINGS_SECTION);
   if (settings == null) {
     settings = rootsettings.addNewSection(SETTINGS_SECTION);
   }
   settings.put(REPORT_PATH_STATE, getValue());
 }
 /** Constructs the import trace package wizard */
 public ImportTracePackageWizard() {
   IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection(STORE_IMPORT_TRACE_PKG_WIZARD);
   if (section == null) {
     section = workbenchSettings.addNewSection(STORE_IMPORT_TRACE_PKG_WIZARD);
   }
   setDialogSettings(section);
 }
Exemple #8
0
 /**
  * Gets the dialog settings.
  *
  * @param sectionName The sectionName
  * @return The dialog settings
  */
 public IDialogSettings getDialogSettings(String sectionName) {
   IDialogSettings settings = getDialogSettings();
   IDialogSettings section = settings.getSection(sectionName);
   if (section == null) {
     section = settings.addNewSection(sectionName);
   }
   return section;
 }
 public QifBankDownloadImportWizard() {
   IDialogSettings workbenchSettings = QIFPlugin.getDefault().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection("QifImportWizard"); // $NON-NLS-1$
   if (section == null) {
     section = workbenchSettings.addNewSection("QifImportWizard"); // $NON-NLS-1$
   }
   setDialogSettings(section);
 }
 /**
  * Returns the {@link IDialogSettings} for the given id
  *
  * @param id the id of the dialog settings to get
  * @return the {@link IDialogSettings} to pass into the {@link ContainerSelectionDialog}
  * @since 3.6
  */
 IDialogSettings getDialogBoundsSettings(String id) {
   IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(id);
   if (section == null) {
     section = settings.addNewSection(id);
   }
   return section;
 }
Exemple #11
0
 public static IDialogSettings getDialogSettings(String dialogId) {
   IDialogSettings workbenchSettings = DBeaverActivator.getInstance().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection(dialogId);
   if (section == null) {
     section = workbenchSettings.addNewSection(dialogId);
   }
   return section;
 }
 /**
  * Returns the dialog settings for this hover or <code>null</code> if none
  *
  * @param create whether to create the settings
  */
 private IDialogSettings getDialogSettings(boolean create) {
   IDialogSettings settings = Activator.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(this.getClass().getName());
   if (section == null & create) {
     section = settings.addNewSection(this.getClass().getName());
   }
   return section;
 }
 private void initDialogSettings() {
   IDialogSettings workbenchSettings = SamplesUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection(NEWPROJECT_WIZARD);
   if (section == null) {
     section = workbenchSettings.addNewSection(NEWPROJECT_WIZARD);
   }
   setDialogSettings(section);
 }
Exemple #14
0
 /**
  * Returns a section in the Erlang plugin's dialog settings. If the section doesn't exist yet, it
  * is created.
  *
  * @param name the name of the section
  * @return the section of the given name
  * @since 3.2
  */
 public IDialogSettings getDialogSettingsSection(final String name) {
   final IDialogSettings dialogSettings = getDialogSettings();
   IDialogSettings section = dialogSettings.getSection(name);
   if (section == null) {
     section = dialogSettings.addNewSection(name);
   }
   return section;
 }
 /* (non-Javadoc)
  * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
  */
 protected IDialogSettings getDialogBoundsSettings() {
   IDialogSettings settings = JavaPlugin.getDefault().getDialogSettings();
   IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
   if (section == null) {
     section = settings.addNewSection(getDialogSettingsSectionName());
   }
   return section;
 }
Exemple #16
0
 @Override
 protected IDialogSettings getDialogBoundsSettings() {
   final IDialogSettings root = Q7UIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = root.getSection(SETTINGS_KEY);
   if (section == null) {
     section = root.addNewSection(SETTINGS_KEY);
   }
   return section;
 }
 /**
  * Returns the dialog settings object used to save state for this dialog.
  *
  * @return the dialog settings to be used
  */
 protected IDialogSettings getDialogSettings() {
   IDialogSettings allSettings = CUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = allSettings.getSection(fDialogSection);
   if (section == null) {
     section = allSettings.addNewSection(fDialogSection);
     writeDefaultSettings(section);
   }
   return section;
 }
 public ErlangProjectImportWizard() {
   super();
   final IDialogSettings workbenchSettings = ErlideUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection("FileSystemImportWizard"); // $NON-NLS-1$
   if (section == null) {
     section = workbenchSettings.addNewSection("FileSystemImportWizard"); // $NON-NLS-1$
   }
   setDialogSettings(section);
 }
 @Override
 protected IDialogSettings getDialogSettings() {
   IDialogSettings settings = CeylonPlugin.getInstance().getDialogSettings();
   IDialogSettings section = settings.getSection(SETTINGS_ID);
   if (section == null) {
     section = settings.addNewSection(SETTINGS_ID);
   }
   return section;
 }
 /**
  * Initialize the wizard's dialog-settings.<br>
  * Subclasses should override to provide specific initialization.
  */
 protected void initDialogSettings() {
   IDialogSettings workbenchSettings = ProjectsPlugin.getDefault().getDialogSettings();
   IDialogSettings section =
       workbenchSettings.getSection("BasicNewProjectResourceWizard"); // $NON-NLS-1$
   if (section == null) {
     section = workbenchSettings.addNewSection("BasicNewProjectResourceWizard"); // $NON-NLS-1$
   }
   setDialogSettings(section);
 }
 private static IDialogSettings getSection(String sectionName) {
   //
   TeacherPlugin plugin = TeacherPlugin.getDefault();
   IDialogSettings ds = plugin.getDialogSettings();
   IDialogSettings section = ds.getSection(sectionName);
   if (section == null) {
     section = ds.addNewSection(sectionName);
   }
   return section;
 }
 private void initializeDialogSettings() {
   IDialogSettings workbenchSettings = CompareUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = workbenchSettings.getSection(DIALOG_SETTINGS_KEY);
   if (section == null) {
     fHasNewDialogSettings = true;
   } else {
     fHasNewDialogSettings = false;
     setDialogSettings(section);
   }
 }
Exemple #23
0
 /**
  * Returns the existing dialog settings for the persisted state of the caught and uncaught check
  * boxes. If no section exists then a new one is created
  *
  * @return the dialog settings section for the type dialog extension
  * @since 3.4
  */
 private IDialogSettings getDialogSettings() {
   IDialogSettings allSetttings = DLTKDebugUIPlugin.getDefault().getDialogSettings();
   IDialogSettings section = allSetttings.getSection(DIALOG_SETTINGS);
   if (section == null) {
     section = allSetttings.addNewSection(DIALOG_SETTINGS);
     section.put(CAUGHT_CHECKED, true);
     section.put(UNCAUGHT_CHECKED, true);
   }
   return section;
 }
 public ExportBarWizard() {
   setDefaultPageImageDescriptor(Pics.getWizban());
   setNeedsProgressMonitor(true);
   IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings();
   IDialogSettings wizardSettings = workbenchSettings.getSection("ExportBarWizard"); // $NON-NLS-1$
   if (wizardSettings == null) {
     wizardSettings = workbenchSettings.addNewSection("ExportBarWizard"); // $NON-NLS-1$
   }
   setDialogSettings(wizardSettings);
   setWindowTitle(Messages.buildTitle);
 }
 @SuppressWarnings("restriction")
 private void configureRefactoringDialogSettingsToRenameVariables() {
   IDialogSettings javaSettings = JavaPlugin.getDefault().getDialogSettings();
   IDialogSettings refactoringSettings =
       javaSettings.getSection(RefactoringWizardPage.REFACTORING_SETTINGS);
   if (refactoringSettings == null) return;
   refactoringSettings.put(RenameRefactoringWizard.TYPE_UPDATE_SIMILAR_ELEMENTS, true);
   refactoringSettings.put(
       RenameRefactoringWizard.TYPE_SIMILAR_MATCH_STRATEGY,
       RenamingNameSuggestor.STRATEGY_EMBEDDED);
 }
 @Override
 public boolean performFinish() {
   if (fNewSettings) {
     final IDialogSettings settings = RefactoringUIPlugin.getDefault().getDialogSettings();
     IDialogSettings section = settings.getSection(DIALOG_SETTINGS_KEY);
     section = settings.addNewSection(DIALOG_SETTINGS_KEY);
     setDialogSettings(section);
   }
   fWizardPage.performFinish();
   return true;
 }
 /**
  * Runs the wizard in a dialog.
  *
  * @generated
  */
 public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
   IDialogSettings pluginDialogSettings = UMLDiagramEditorPlugin.getInstance().getDialogSettings();
   IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
   if (wizardDialogSettings == null) {
     wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
   }
   wizard.setDialogSettings(wizardDialogSettings);
   WizardDialog dialog = new WizardDialog(shell, wizard);
   dialog.create();
   dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
   dialog.open();
 }
 @Override
 public void controlResized(ControlEvent e) {
   IDialogSettings settings = dialogSettings.getSection(COLUMN_WIDTHS);
   TreeColumn treeColumn = (TreeColumn) e.widget;
   int index = treeColumn.getParent().indexOf(treeColumn);
   if (index == 0) {
     settings.put(LABEL_COLUMN, treeColumn.getWidth());
   } else {
     ViewColumn viewColumn = model.getDataProviders().get(index - 1);
     settings.put(viewColumn.getDataProviderFactory().getId(), treeColumn.getWidth());
   }
 }
  @Override
  protected IDialogSettings getDialogBoundsSettings() {
    final String settingsName = getClass().getCanonicalName();

    IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings();
    IDialogSettings section = workbenchSettings.getSection(settingsName);

    if (section == null) {
      section = workbenchSettings.addNewSection(settingsName);
    }

    return section;
  }
 /** Creates a new show refactoring history wizard. */
 public ShowRefactoringHistoryWizard() {
   setNeedsProgressMonitor(false);
   setWindowTitle(ScriptingMessages.ShowRefactoringHistoryWizard_title);
   setDefaultPageImageDescriptor(RefactoringPluginImages.DESC_WIZBAN_SHOW_HISTORY);
   final IDialogSettings settings = RefactoringUIPlugin.getDefault().getDialogSettings();
   final IDialogSettings section = settings.getSection(DIALOG_SETTINGS_KEY);
   if (section == null) fNewSettings = true;
   else {
     fNewSettings = false;
     setDialogSettings(section);
   }
   fWizardPage = new ShowRefactoringHistoryWizardPage(this);
 }