Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.DialogSettings


     * This framework method may be overridden, although this is typically
     * unnecessary.
     * </p>
     */
    protected void loadDialogSettings() {
        dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$

        // bug 69387: The instance area should not be created (in the call to
        // #getStateLocation) if -data @none or -data @noDefault was used
        IPath dataLocation = getStateLocationOrNull();
        if (dataLocation != null) {
          // try r/w state area in the local file system
          String readWritePath = dataLocation.append(FN_DIALOG_SETTINGS)
                  .toOSString();
          File settingsFile = new File(readWritePath);
          if (settingsFile.exists()) {
              try {
                  dialogSettings.load(readWritePath);
              } catch (IOException e) {
                  // load failed so ensure we have an empty settings
                  dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$
              }
             
              return;
          }
        }

        // otherwise look for bundle specific dialog settings
        URL dsURL = BundleUtility.find(getBundle(), FN_DIALOG_SETTINGS);
        if (dsURL == null) {
      return;
    }

        InputStream is = null;
        try {
            is = dsURL.openStream();
            BufferedReader reader = new BufferedReader(
                    new InputStreamReader(is, "utf-8")); //$NON-NLS-1$
            dialogSettings.load(reader);
        } catch (IOException e) {
            // load failed so ensure we have an empty settings
            dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$
        } finally {
            try {
                if (is != null) {
          is.close();
        }
View Full Code Here


  @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 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, true);
    return dialogSettings2;
  }
View Full Code Here

  @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, true);
    return dialogSettings2;
  }
View Full Code Here

  @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 IDialogSettings getDialogSettings() {
    IDialogSettings settings = VisualSwingPlugin.getDefault().getDialogSettings();
    IDialogSettings section = settings.getSection(NewComponentPage.PAGE_NAME);
    if (section == null) {
      section = new DialogSettings(NewComponentPage.PAGE_NAME);
      settings.addSection(section);
    }
    section.put(NewComponentPage.SETTINGS_CREATECONSTR, false);
    section.put(NewComponentPage.SETTINGS_CREATEUNIMPLEMENTED, true);
    section.put(NewComponentPage.SETTINGS_SUPERCLASSNAME, superClassName);
View Full Code Here

  @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 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 IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
    ContentAssistant assistant = new ContentAssistant();
    IContentAssistProcessor proc = new PowershellCompletionProcessor(); // FIXME: Don't we want only one copy here?
    DialogSettings dsettings = new DialogSettings("pscoderContentAssist");
    assistant.setContentAssistProcessor(proc, IDocument.DEFAULT_CONTENT_TYPE);
    assistant.enableAutoActivation(true);
    assistant.setRestoreCompletionProposalSize(dsettings);
   
    return assistant;
View Full Code Here

    jsfLibCfgComp.loadControlValuesFromModel(source);*/
  }

 
  private void saveSettings() {
    DialogSettings root = new DialogSettings(SETTINGS_ROOT);
    dialogSettings.addSection(root);

    root.put(SETTINGS_CONFIG, getTapestryConfig());
    root.put(SETTINGS_SERVLET, getTapestryServletName());
    root.put(SETTINGS_SERVLET_CLASSNAME, getTapestryServletClassname());
    DialogSettings mappings = new DialogSettings(SETTINGS_URL_MAPPINGS);
    root.addSection(mappings);
    mappings.put(SETTINGS_URL_PATTERN, getTapestryPatterns());
  }
View Full Code Here

TOP

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

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.