当前位置: 首页>>代码示例>>Java>>正文


Java OptionsDisplayer类代码示例

本文整理汇总了Java中org.netbeans.api.options.OptionsDisplayer的典型用法代码示例。如果您正苦于以下问题:Java OptionsDisplayer类的具体用法?Java OptionsDisplayer怎么用?Java OptionsDisplayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OptionsDisplayer类属于org.netbeans.api.options包,在下文中一共展示了OptionsDisplayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionPerformed

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
    if(e.getSource() == getToolbar().nextButton) {
        if(lastDifference) {
            masterView.selectNextEntry();
        } else {
            diffView.onNextButton();
        }
    } else if(e.getSource() == getToolbar().prevButton) {
        if(firstDifference) {
            diffView.onSelectionLastDifference();
            masterView.selectPrevEntry();
        } else {
            diffView.onPrevButton();
        }
    } else if(e.getSource() == getToolbar().refreshButton) {
        masterView.refresh();
    } else if(e.getSource() == getToolbar().settingsButton) {
        OptionsDisplayer.getDefault().open("Team/Versioning/" + HistoryOptions.OPTIONS_SUBPATH); // NOI18N
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:HistoryComponent.java

示例2: getNetworkProblemDescriptor

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
private DialogDescriptor getNetworkProblemDescriptor() {
    DialogDescriptor descriptor = getProblemDesriptor(NbBundle.getMessage(ProblemPanel.class, "CTL_ShowProxyOptions"));

    JButton showProxyOptions = new JButton ();
    Mnemonics.setLocalizedText (showProxyOptions, NbBundle.getMessage(ProblemPanel.class, "CTL_ShowProxyOptions"));
    
    showProxyOptions.getAccessibleContext ().setAccessibleDescription (NbBundle.getMessage(ProblemPanel.class, "ACSD_ShowProxyOptions"));
    showProxyOptions.addActionListener (new ActionListener () {
        @Override
        public void actionPerformed (ActionEvent arg0) {
            OptionsDisplayer.getDefault ().open ("General"); // NOI18N
        }
    });
            
    if (isWarning) {
        descriptor.setAdditionalOptions(new Object [] {showProxyOptions});
    }
    
    return descriptor;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:ProblemPanel.java

示例3: handleElement

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
private void handleElement(Element e, Keywords annotation, String name) throws LayerGenerationException {
originatingElement = e;
if (!annotation.location().equals(OptionsDisplayer.GENERAL) && !annotation.location().equals(OptionsDisplayer.KEYMAPS)) {
    if (annotation.tabTitle().trim().isEmpty()) {
	throw new LayerGenerationException("Must specify tabTitle", e, processingEnv, annotation, "tabTitle");
    }
}
       File file = layer(e).
               file("OptionsDialog/Keywords/".concat(e.asType().toString()).concat(name)).
               stringvalue("location", annotation.location()).
	bundlevalue("tabTitle", annotation.tabTitle(), annotation, "tabTitle");
       String[] keywords = annotation.keywords();
       for (int j = 0; j < keywords.length; j++) {
           file = file.bundlevalue("keywords-".concat(Integer.toString(j+1)), keywords[j], annotation, "keywords");
       }
       file.write();
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:OptionsPanelControllerProcessor.java

示例4: handleError

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
protected static void handleError(List<? extends Object> command, List<String> cmdOutput, String message, OutputLogger logger) throws HgException{
    if (command != null && cmdOutput != null && logger != null){
        Mercurial.LOG.log(Level.WARNING, "command: {0}", command); // NOI18N
        Mercurial.LOG.log(Level.WARNING, "output: {0}", HgUtils.replaceHttpPassword(cmdOutput)); // NOI18N
        logger.outputInRed(NbBundle.getMessage(HgCommand.class, "MSG_COMMAND_ERR")); // NOI18N
        logger.output(NbBundle.getMessage(
                            HgCommand.class,
                            "MSG_COMMAND_INFO_ERR",                 //NOI18N
                            command,
                            HgUtils.replaceHttpPassword(cmdOutput)));
    }

    if (cmdOutput != null && !cmdOutput.isEmpty() && (isErrorPossibleProxyIssue(cmdOutput.get(0)) || isErrorPossibleProxyIssue(cmdOutput.get(cmdOutput.size() - 1)))) {
        boolean bConfirmSetProxy;
        bConfirmSetProxy = HgUtils.confirmDialog(HgCommand.class, "MSG_POSSIBLE_PROXY_ISSUE_TITLE", "MSG_POSSIBLE_PROXY_ISSUE_QUERY"); // NOI18N
        if(bConfirmSetProxy){
            OptionsDisplayer.getDefault().open("General");              // NOI18N
        }
    } else {
        throw new HgException(message);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:HgCommand.java

示例5: createContextAwareInstance

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public Action createContextAwareInstance(Lookup lookup) {
    String textlintPath = TextlintOptions.getInstance().getTextlintPath();
    if (textlintPath == null || textlintPath.isEmpty()) {
        OptionsDisplayer.getDefault().open(TextlintOptionsPanelController.OPTIONS_FULL_PATH);
        return this;
    }
    DataObject dataObject = lookup.lookup(DataObject.class);
    if (dataObject == null) {
        return this;
    }
    FileObject fileObject = dataObject.getPrimaryFile();
    if (fileObject == null) {
        return this;
    }
    String ext = fileObject.getExt();
    if ("md".equals(ext) || "txt".endsWith(ext) // NOI18N
            || ("html".equals(ext) && TextlintOptions.getInstance().isHtmlEnabled())) { // NOI18N
        return new RefreshAction(dataObject);
    }
    return this;
}
 
开发者ID:junichi11,项目名称:netbeans-textlint-plugin,代码行数:23,代码来源:RefreshAction.java

示例6: isConfigured

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
public static boolean isConfigured() {
    // send to settings the first time isConfigured is called
    synchronized (FanPlatform.class) {
        if (instance.fanHome == null && !configWarningAlreadyDisplayed) {
            configWarningAlreadyDisplayed = true;
            Runnable task = new Runnable() {

                public void run() {
                    // Open after a delay or it tends to appear behind the main window
                    OptionsDisplayer.getDefault().open(FanMainSettingsController.ID);
                }
            };
            Executors.newSingleThreadScheduledExecutor().schedule(task, 15, TimeUnit.SECONDS);
        }
    }
    return instance != null && instance.fanHome != null;
}
 
开发者ID:tcolar,项目名称:fantomidemodule,代码行数:18,代码来源:FanPlatform.java

示例7: openSection

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public void openSection(Section section) {
    switch(section) {
        case PROXY:
            OptionsDisplayer.getDefault().open("General"); // NOI18N
            break;
        case TASKS:
            OptionsDisplayer.getDefault().open(SettingsServices.TEAM_SETTINGS_LOCATION + "/" + SettingsServices.TASKS_SETTINGS_ID); // NOI18N
            break;
        case ODCS:
            OptionsDisplayer.getDefault().open(SettingsServices.TEAM_SETTINGS_LOCATION + "/" + SettingsServices.ODCS_SETTINGS_ID); // NOI18N
            break;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:SettingsServicesImpl.java

示例8: createOpenOptionsButton

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
public static JButton createOpenOptionsButton() {
      JButton button = createButton(
              "org/netbeans/modules/debugger/jpda/resources/formatters_options_16.png",
              NbBundle.getMessage (VariablesViewButtons.class, "Hint_Open_Formatters")
          );
      button.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              System.setProperty(SHOW_FORMATTERS_PROP_NAME, "true"); // NOI18N
OptionsDisplayer.getDefault().open(JavaOptions.JAVA + "/" + OPTIONS_JAVA_DEBUGGER_ID); // NOI18N
          }
      });
      return button;
  }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:VariablesViewButtons.java

示例9: implement

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public ChangeInfo implement() throws Exception {
    if (disable) {
        hintsSettings.setEnabled(metadata, false);
        //XXX: re-run hints task
    } else {
        OptionsDisplayer.getDefault().open("Editor/Hints/text/x-java/" + metadata.id);
    }

    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ErrorDescriptionFactory.java

示例10: notifyMissingBrowser

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
/**
 * Show notification about browser which cannot be run. Also adds a link that opens Tools > Options > General dialog.
 * @param browserName name of browser which cannot be run
 */
@NbBundle.Messages({
    "# {0} - browser name",
    "BrowserUtils.cannot.run.title=Cannot run {0}",
    "BrowserUtils.cannot.run.detail=Selected browser cannot be run.",
})
public static void notifyMissingBrowser(String browserName) {
    NotificationDisplayer.getDefault().notify(Bundle.BrowserUtils_cannot_run_title(browserName), ImageUtilities.loadImageIcon(BROWSER_ICON, false),
            Bundle.BrowserUtils_cannot_run_detail(), new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            OptionsDisplayer.getDefault().open(OptionsDisplayer.GENERAL);
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:BrowserUtils.java

示例11: actionPerformed

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@NbBundle.Messages({
    "# {0} - error message",
    "ERR_RunPlatformShell=Error starting Java Shell: {0}"
})
@Override
public void actionPerformed(ActionEvent e) {
    JavaPlatform platform = options.getSelectedPlatform();
    if (platform == null) {
        NotifyDescriptor.Confirmation conf = new NotifyDescriptor.Confirmation(
                Bundle.ERR_NoShellPlatform(), NotifyDescriptor.Confirmation.OK_CANCEL_OPTION
        );
        Object result = DialogDisplayer.getDefault().notify(conf);
        if (result == NotifyDescriptor.Confirmation.OK_OPTION) {
            OptionsDisplayer.getDefault().open("Java/JShell", true);
        }
        platform = options.getSelectedPlatform();
        if (platform == null) {
            return;
        }
    }
    try {
        JShellEnvironment env = ShellRegistry.get().openDefaultSession(platform);
        env.open();
    } catch (IOException ex) {
        Message msg = new Message(Bundle.ERR_RunPlatformShell(ex.getLocalizedMessage()), Message.ERROR_MESSAGE);
        DialogDisplayer.getDefault().notifyLater(msg);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:PlatformShellAction.java

示例12: defaultAction

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public void defaultAction(JTextComponent component) {
    Completion.get().hideAll();
    if (name == null) {
        OptionsDisplayer.getDefault().open("Editor/CodeCompletion/text/x-java"); //NOI18N
    } else {
        org.netbeans.modules.java.completion.Utilities.exclude(name);
        Completion.get().showCompletion();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:JavaCompletionItem.java

示例13: getCategories

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
@Override
public List<String> getCategories () {
    init ();
    List<String> l = new ArrayList<String>(categoryToOption.keySet ());
    // Sort Miscellaneous (aka Advanced) subcategories. Order of other categories
    // can be defined in layer by position attribute.
    if(OptionsDisplayer.ADVANCED.equals(subpath)) {
        Collections.sort(l, Collator.getInstance());
    }
    return l;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:Model.java

示例14: run

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
public void run() {
    if(!OptionsDisplayer.getDefault().open(path)) {
        // If Options dialog already opened, select category. When
        // the dialog is not opened, it is selected automatically.
        OptionsDisplayerImpl.selectCategory(path);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:QuickSearchProvider.java

示例15: actionPerformed

import org.netbeans.api.options.OptionsDisplayer; //导入依赖的package包/类
public void actionPerformed(ActionEvent e) {
    RequestProcessor.getDefault().post(new Runnable() {
        public void run() {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    log.fine("Options Dialog - Back to modern."); //NOI18N
                    //OptionsDisplayerImpl.this.showOptionsDialog(null);
                    OptionsDisplayer.getDefault().open();
                }
            });
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:OptionsDisplayerImpl.java


注:本文中的org.netbeans.api.options.OptionsDisplayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。