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


Java UnnamedConfigurable类代码示例

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


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

示例1: getItemConfigurable

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
@Nullable
protected UnnamedConfigurable getItemConfigurable(final T item) {
  final Ref<UnnamedConfigurable> result = new Ref<UnnamedConfigurable>();
  TreeUtil.traverse((TreeNode)myTree.getModel().getRoot(), new TreeUtil.Traverse() {
    @Override
    public boolean accept(Object node) {
      final NamedConfigurable configurable = (NamedConfigurable)((DefaultMutableTreeNode)node).getUserObject();
      if (configurable.getEditableObject() == item) {
        //noinspection unchecked
        result.set(((ItemConfigurable)configurable).myConfigurable);
        return false;
      }
      else {
        return true;
      }
    }
  });
  return result.get();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:NamedItemsListEditor.java

示例2: updateVcsConfigurable

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
private void updateVcsConfigurable() {
  if (myVcsConfigurable != null) {
    myVcsConfigurablePlaceholder.remove(myVcsConfigurableComponent);
    myVcsConfigurable.disposeUIResources();
    myVcsConfigurable = null;
  }
  VcsDescriptor wrapper = (VcsDescriptor) myVCSComboBox.getSelectedItem();
  if (wrapper != null && (! wrapper.isNone())) {
    final AbstractVcs vcs = myVcsManager.findVcsByName(wrapper.getName());
    if (vcs != null) {
      UnnamedConfigurable configurable = vcs.getRootConfigurable(myMappingCopy);
      if (configurable != null) {
        myVcsConfigurable = configurable;
        myVcsConfigurableComponent = myVcsConfigurable.createComponent();
        myVcsConfigurablePlaceholder.add(myVcsConfigurableComponent, BorderLayout.CENTER);
      }
    }
  }
  pack();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:VcsMappingConfigurationDialog.java

示例3: VcsConfigurationsDialog

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
public VcsConfigurationsDialog(Project project, @Nullable JComboBox vcses, VcsDescriptor selectedVcs) {
  super(project, false);
  myProject = project;

  VcsDescriptor[] abstractVcses = collectAvailableNames();
  initList(abstractVcses);

  initVcsConfigurable(abstractVcses);

  updateConfiguration();
  myVcsesToUpdate = vcses;
  for (String vcsName : myVcsNameToConfigurableMap.keySet()) {
     UnnamedConfigurable configurable = myVcsNameToConfigurableMap.get(vcsName);
     if (configurable != null && configurable.isModified()) configurable.reset();
  }
  updateConfiguration();
  if (selectedVcs != null){
    myVcses.setSelectedValue(selectedVcs, true);
  }
  init();
  setTitle(VcsBundle.message("dialog.title.version.control.configurations"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:VcsConfigurationsDialog.java

示例4: createCenterPanel

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  OptionGroup optionGroup = new OptionGroup(CodeEditorBundle.message("export.to.html.options.group"));

  myCbLineNumbers = new JCheckBox(CodeEditorBundle.message("export.to.html.options.show.line.numbers.checkbox"));
  optionGroup.add(myCbLineNumbers);

  for (UnnamedConfigurable printOption : myExtensions) {
    optionGroup.add(printOption.createComponent());
  }

  myCbOpenInBrowser = new JCheckBox(CodeEditorBundle.message("export.to.html.open.generated.html.checkbox"));
  optionGroup.add(myCbOpenInBrowser);

  return optionGroup.createPanel();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ExportToHTMLDialog.java

示例5: reset

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

  myRbSelectedText.setEnabled(myIsSelectedTextEnabled);
  myRbSelectedText.setSelected(myIsSelectedTextEnabled);
  myRbCurrentFile.setEnabled(myFileName != null);
  myRbCurrentFile.setSelected(myFileName != null && !myIsSelectedTextEnabled);
  myRbCurrentPackage.setEnabled(myDirectoryName != null);
  myRbCurrentPackage.setSelected(myDirectoryName != null && !myIsSelectedTextEnabled && myFileName == null);
  myCbIncludeSubpackages.setSelected(exportToHTMLSettings.isIncludeSubdirectories());
  myCbIncludeSubpackages.setEnabled(myRbCurrentPackage.isSelected());

  myCbLineNumbers.setSelected(exportToHTMLSettings.PRINT_LINE_NUMBERS);
  myCbOpenInBrowser.setSelected(exportToHTMLSettings.OPEN_IN_BROWSER);

  myTargetDirectoryField.setText(exportToHTMLSettings.OUTPUT_DIRECTORY);

  for (UnnamedConfigurable printOption : myExtensions) {
    printOption.reset();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ExportToHTMLDialog.java

示例6: 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

示例7: isModified

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
public boolean isModified() {
  for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
    if (additionalConfigurable.isModified()) {
      return true;
    }
  }

  if (!MavenServerManager.getInstance().getMavenEmbedderVMOptions().equals(myEmbedderVMOptions.getText())) {
    return true;
  }

  if (!MavenServerManager.getInstance().getEmbedderJdk().equals(myEmbedderJdk.getSelectedValue())) {
    return true;
  }

  return mySettingsForm.isModified(myImportingSettings);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:MavenImportingConfigurable.java

示例8: getItemConfigurable

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
@Nullable
protected UnnamedConfigurable getItemConfigurable(final T item) {
  final Ref<UnnamedConfigurable> result = new Ref<UnnamedConfigurable>();
  TreeUtil.traverse((TreeNode)myTree.getModel().getRoot(), new TreeUtil.Traverse() {
    public boolean accept(Object node) {
      final NamedConfigurable configurable = (NamedConfigurable)((DefaultMutableTreeNode)node).getUserObject();
      if (configurable.getEditableObject() == item) {
        result.set(((ItemConfigurable)configurable).myConfigurable);
        return false;
      }
      else {
        return true;
      }
    }
  });
  return result.get();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:NamedItemsListEditor.java

示例9: createComponent

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
public JComponent createComponent() {
  final JPanel panel = mySettingsForm.getAdditionalSettingsPanel();
  panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

  JPanel useMaven3Panel = new JPanel(new BorderLayout());
  useMaven3Panel.add(myUseMaven3CheckBox, BorderLayout.WEST);

  panel.add(useMaven3Panel);

  JPanel embedderVMOptionPanel = new JPanel(new BorderLayout());
  JLabel vmOptionLabel = new JLabel("VM options for importer:");
  embedderVMOptionPanel.add(vmOptionLabel, BorderLayout.WEST);
  vmOptionLabel.setLabelFor(myEmbedderVMOptions);

  embedderVMOptionPanel.add(myEmbedderVMOptions);
  panel.add(embedderVMOptionPanel);

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

示例10: isModified

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
public boolean isModified() {
  for (final UnnamedConfigurable additionalConfigurable : myAdditionalConfigurables) {
    if (additionalConfigurable.isModified()) {
      return true;
    }
  }

  if ((!myUseMaven3CheckBox.isSelected()) != MavenServerManager.getInstance().isUseMaven2()) {
    return true;
  }

  if (!MavenServerManager.getInstance().getMavenEmbedderVMOptions().equals(myEmbedderVMOptions.getText())) {
    return true;
  }

  return mySettingsForm.isModified(myImportingSettings);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:MavenImportingConfigurable.java

示例11: initExtensions

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
private void initExtensions() {
  final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(myModule);
  final HaxeModuleConfigurationExtensionPoint[] extensionPoints = HaxeModuleConfigurationExtensionPoint.EP_NAME.getExtensions();

  if (extensionPoints.length > 0) {
    final GridLayoutManager layoutManager = new GridLayoutManager(extensionPoints.length, 1);
    myAdditionalComponentPanel.setLayout(layoutManager);
  }
  for (int i = 0; i < extensionPoints.length; i++) {
    HaxeModuleConfigurationExtensionPoint extensionPoint = extensionPoints[i];
    final GridConstraints gridConstraints = new GridConstraints();
    gridConstraints.setFill(GridConstraints.FILL_HORIZONTAL);
    gridConstraints.setRow(i);

    final UnnamedConfigurable configurable = extensionPoint.createConfigurable(settings);
    configurables.add(configurable);
    myAdditionalComponentPanel.add(configurable.createComponent(), gridConstraints);
  }
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:20,代码来源:HaxeConfigurationEditor.java

示例12: initExtensions

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
private void initExtensions()
{
	final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(myModule);
	final HaxeModuleConfigurationExtensionPoint[] extensionPoints = HaxeModuleConfigurationExtensionPoint.EP_NAME.getExtensions();

	if(extensionPoints.length > 0)
	{
		final GridLayoutManager layoutManager = new GridLayoutManager(extensionPoints.length, 1);
		myAdditionalComponentPanel.setLayout(layoutManager);
	}
	for(int i = 0; i < extensionPoints.length; i++)
	{
		HaxeModuleConfigurationExtensionPoint extensionPoint = extensionPoints[i];
		final GridConstraints gridConstraints = new GridConstraints();
		gridConstraints.setFill(GridConstraints.FILL_HORIZONTAL);
		gridConstraints.setRow(i);

		final UnnamedConfigurable configurable = extensionPoint.createConfigurable(settings);
		configurables.add(configurable);
		myAdditionalComponentPanel.add(configurable.createComponent(), gridConstraints);
	}
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:23,代码来源:HaxeConfigurationEditor.java

示例13: getItemConfigurable

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
@Nullable
protected UnnamedConfigurable getItemConfigurable(final T item) {
  final Ref<UnnamedConfigurable> result = new Ref<UnnamedConfigurable>();
  TreeUtil.traverse((TreeNode)myTree.getModel().getRoot(), new TreeUtil.Traverse() {
    @Override
    public boolean accept(Object node) {
      final NamedConfigurable configurable = (NamedConfigurable)((DefaultMutableTreeNode)node).getUserObject();
      if (configurable.getEditableObject() == item) {
        result.set(((ItemConfigurable)configurable).myConfigurable);
        return false;
      }
      else {
        return true;
      }
    }
  });
  return result.get();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:NamedItemsListEditor.java

示例14: ConfigurableHandler

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
public ConfigurableHandler(HyperlinkLabel label,
                           final UnnamedConfigurable serverConfigurable,
                           C serverConfiguration,
                           ServerType<C> serverType) {
  myServerConfigurable = serverConfigurable;
  myServerConfiguration = serverConfiguration;
  myServerType = serverType;

  label.setHyperlinkText("Upload Public SSH Key");
  label.addHyperlinkListener(this);
  myLabel = label;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SshKeyChecker.java

示例15: updateConfiguration

import com.intellij.openapi.options.UnnamedConfigurable; //导入依赖的package包/类
private void updateConfiguration() {
  int selectedIndex = myVcses.getSelectionModel().getMinSelectionIndex();
  final VcsDescriptor currentVcs;
  currentVcs = selectedIndex >= 0 ? (VcsDescriptor)(myVcses.getModel()).getElementAt(selectedIndex) : null;
  String currentName = currentVcs == null ? NONE : currentVcs.getName();
  if (currentVcs != null) {
    final UnnamedConfigurable unnamedConfigurable = myVcsNameToConfigurableMap.get(currentName);
    unnamedConfigurable.createComponent();
    unnamedConfigurable.reset();
  }
  final CardLayout cardLayout = (CardLayout)myVcsConfigurationPanel.getLayout();
  cardLayout.show(myVcsConfigurationPanel, currentName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:VcsConfigurationsDialog.java


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