Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.IDialogSettings


  public NewPanelCreationWizard() {
    super(JPanel.class.getName());
  }
  @Override
  public IDialogSettings getDialogSettings() {
    IDialogSettings dialogSettings2 = super.getDialogSettings();
    IDialogSettings section = dialogSettings2.getSection(NewComponentPage.PAGE_NAME);
    if (section == null) {
      section = new DialogSettings(NewComponentPage.PAGE_NAME);
      dialogSettings2.addSection(section);
    }
    section.put(NewComponentPage.SETTINGS_CREATEMAIN, false);
    return dialogSettings2;
  }
View Full Code Here


  public NewInternalFrameCreationWizard() {
    super(JInternalFrame.class.getName());
  }
  @Override
  public IDialogSettings getDialogSettings() {
    IDialogSettings dialogSettings2 = super.getDialogSettings();
    IDialogSettings section = dialogSettings2.getSection(NewComponentPage.PAGE_NAME);
    if (section == null) {
      section = new DialogSettings(NewComponentPage.PAGE_NAME);
      dialogSettings2.addSection(section);
    }
    section.put(NewComponentPage.SETTINGS_CREATEMAIN, false);
    return dialogSettings2;
  }
View Full Code Here

    @Override
    public void init(IViewSite site, IMemento memento) throws PartInitException {
        viewMemento = memento;
        if (memento == null) {
            IDialogSettings dialogSettings = FindbugsPlugin.getDefault().getDialogSettings();
            String persistedMemento = dialogSettings.get(TAG_MEMENTO);
            if (persistedMemento == null) {
                // See bug 2504068. First time user opens a view, no settings
                // are defined
                // but we still need to enforce initialisation of content
                // provider
View Full Code Here

        XMLMemento memento = XMLMemento.createWriteRoot("bugExplorer"); //$NON-NLS-1$
        saveState(memento);
        StringWriter writer = new StringWriter();
        try {
            memento.save(writer);
            IDialogSettings dialogSettings = FindbugsPlugin.getDefault().getDialogSettings();
            dialogSettings.put(TAG_MEMENTO, writer.getBuffer().toString());
        } catch (IOException e) {
            // don't do anything. Simply don't store the settings
        }

        if (selectionListener != null) {
View Full Code Here

     * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
     * @since 3.2
     */
    protected IDialogSettings getDialogBoundsSettings() {
      String sectionName= getClass().getName() + "_dialogBounds"; //$NON-NLS-1$
      IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
      IDialogSettings section= settings.getSection(sectionName);
      if (section == null)
        section= settings.addNewSection(sectionName);
      return section;
    }
View Full Code Here

      return;
    String selection= fTarget.getSelectionText();
    if (selection == null)
      selection= ""; //$NON-NLS-1$

    IDialogSettings s= getDialogSettings();
    s.put("selection", selection); //$NON-NLS-1$
  }
View Full Code Here

   * between several find/replace dialogs.
   *
   * @return the dialog settings to be used
   */
  private IDialogSettings getDialogSettings() {
    IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
    fDialogSettings= settings.getSection(getClass().getName());
    if (fDialogSettings == null)
      fDialogSettings= settings.addNewSection(getClass().getName());
    return fDialogSettings;
  }
View Full Code Here

   * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
   * @since 3.2
   */
  protected IDialogSettings getDialogBoundsSettings() {
    String sectionName= getClass().getName() + "_dialogBounds"; //$NON-NLS-1$
    IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
    IDialogSettings section= settings.getSection(sectionName);
    if (section == null)
      section= settings.addNewSection(sectionName);
    return section;
  }
View Full Code Here

  /**
   * Initializes itself from the dialog settings with the same state
   * as at the previous invocation.
   */
  private void readConfiguration() {
    IDialogSettings s= getDialogSettings();

    fWrapInit= s.getBoolean("wrap"); //$NON-NLS-1$
    fCaseInit= s.getBoolean("casesensitive"); //$NON-NLS-1$
    fWholeWordInit= s.getBoolean("wholeword"); //$NON-NLS-1$
    fIncrementalInit= s.getBoolean("incremental"); //$NON-NLS-1$
    fIsRegExInit= s.getBoolean("isRegEx"); //$NON-NLS-1$

    String[] findHistory= s.getArray("findhistory"); //$NON-NLS-1$
    if (findHistory != null) {
      List history= getFindHistory();
      history.clear();
      for (int i= 0; i < findHistory.length; i++)
        history.add(findHistory[i]);
    }

    String[] replaceHistory= s.getArray("replacehistory"); //$NON-NLS-1$
    if (replaceHistory != null) {
      List history= getReplaceHistory();
      history.clear();
      for (int i= 0; i < replaceHistory.length; i++)
        history.add(replaceHistory[i]);
View Full Code Here

  /**
   * Stores its current configuration in the dialog store.
   */
  private void writeConfiguration() {
    IDialogSettings s= getDialogSettings();

    s.put("wrap", fWrapInit); //$NON-NLS-1$
    s.put("casesensitive", fCaseInit); //$NON-NLS-1$
    s.put("wholeword", fWholeWordInit); //$NON-NLS-1$
    s.put("incremental", fIncrementalInit); //$NON-NLS-1$
    s.put("isRegEx", fIsRegExInit); //$NON-NLS-1$
   
    List history= getFindHistory();
    String findString= getFindString();
    if (findString.length() > 0)
      history.add(0, findString);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.IDialogSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.