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


Java UnnamedConfigurable.apply方法代码示例

本文整理汇总了Java中com.intellij.openapi.options.UnnamedConfigurable.apply方法的典型用法代码示例。如果您正苦于以下问题:Java UnnamedConfigurable.apply方法的具体用法?Java UnnamedConfigurable.apply怎么用?Java UnnamedConfigurable.apply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.options.UnnamedConfigurable的用法示例。


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

示例1: apply

import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
  ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myProject);

  if (myRbCurrentFile.isSelected()){
    exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_FILE);
  }
  else if (myRbSelectedText.isSelected()){
    exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_SELECTED_TEXT);
  }
  else if (myRbCurrentPackage.isSelected()){
    exportToHTMLSettings.setPrintScope(PrintSettings.PRINT_DIRECTORY);
  }

  exportToHTMLSettings.setIncludeSubpackages(myCbIncludeSubpackages.isSelected());
  exportToHTMLSettings.PRINT_LINE_NUMBERS = myCbLineNumbers.isSelected();
  exportToHTMLSettings.OPEN_IN_BROWSER = myCbOpenInBrowser.isSelected();
  exportToHTMLSettings.OUTPUT_DIRECTORY = myTargetDirectoryField.getText();
  for (UnnamedConfigurable printOption : myExtensions) {
    printOption.apply();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ExportToHTMLDialog.java

示例2: doOKAction

import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
protected void doOKAction() {
  for (String vcsName : myVcsNameToConfigurableMap.keySet()) {
    UnnamedConfigurable configurable = myVcsNameToConfigurableMap.get(vcsName);
    if (configurable != null && configurable.isModified()) {
      try {
        configurable.apply();
      }
      catch (ConfigurationException e) {
        Messages.showErrorDialog(VcsBundle.message("message.text.unable.to.save.settings", e.getMessage()),
                                 VcsBundle.message("message.title.unable.to.save.settings"));
      }
    }
  }

  final JComboBox vcsesToUpdate = myVcsesToUpdate;
  if (vcsesToUpdate != null) {
    final VcsDescriptor wrapper = (VcsDescriptor) myVcses.getSelectedValue();
    vcsesToUpdate.setSelectedItem(wrapper);
    final ComboBoxModel model = vcsesToUpdate.getModel();
    for(int i = 0; i < model.getSize(); i++){
      final Object vcsWrapper = model.getElementAt(i);
      if (vcsWrapper instanceof VcsDescriptor){
        final VcsDescriptor defaultVcsWrapper = (VcsDescriptor) vcsWrapper;
        if (defaultVcsWrapper.equals(wrapper)){
          vcsesToUpdate.setSelectedIndex(i);
          break;
        }
      }
    }
  }

  super.doOKAction();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:VcsConfigurationsDialog.java

示例3: apply

import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
  mySettingsForm.getData(myImportingSettings);

  MavenServerManager.getInstance().setMavenEmbedderVMOptions(myEmbedderVMOptions.getText());
  String jdk = myEmbedderJdk.getSelectedValue();
  if(jdk != null) {
    MavenServerManager.getInstance().setEmbedderJdk(jdk);
  }

  for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
    additionalConfigurable.apply();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:MavenImportingConfigurable.java

示例4: apply

import com.intellij.openapi.options.UnnamedConfigurable; //导入方法依赖的package包/类
public void apply() throws ConfigurationException {
  mySettingsForm.getData(myImportingSettings);

  MavenServerManager.getInstance().setUseMaven2(!myUseMaven3CheckBox.isSelected());
  MavenServerManager.getInstance().setMavenEmbedderVMOptions(myEmbedderVMOptions.getText());

  for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
    additionalConfigurable.apply();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:MavenImportingConfigurable.java


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