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


Java CodeStyleSettingsProvider类代码示例

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


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

示例1: buildConfigurables

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected Configurable[] buildConfigurables() {
  myPanels = new ArrayList<CodeStyleConfigurableWrapper>();

  for (final CodeStyleSettingsProvider provider : CodeStyleSettingsProvider.EXTENSION_POINT_NAME.getExtensions()) {
    if (provider.hasSettingsPage()) {
      myPanels.add(new CodeStyleConfigurableWrapper(provider, new CodeStyleSettingsPanelFactory() {
        @Override
        public NewCodeStyleSettingsPanel createPanel(final CodeStyleScheme scheme) {
          return new NewCodeStyleSettingsPanel(provider.createSettingsPage(scheme.getCodeStyleSettings(), ensureModel().getCloneSettings(scheme)));
        }
      }));
    }
  }

  return myPanels.toArray(new Configurable[myPanels.size()]);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:CodeStyleSchemesConfigurable.java

示例2: initTabs

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected void initTabs(CodeStyleSettings settings) {
  super.initTabs(settings);
  addTab(new JavaDocFormattingPanel(settings));
  addTab(new CodeStyleImportsPanelWrapper(settings));
  addTab(new JavaArrangementPanel(settings));
  for (CodeStyleSettingsProvider provider : Extensions.getExtensions(CodeStyleSettingsProvider.EXTENSION_POINT_NAME)) {
    if (provider.getLanguage() == JavaLanguage.INSTANCE && !provider.hasSettingsPage()) {
      createTab(provider);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JavaCodeStyleMainPanel.java

示例3: initTabs

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected void initTabs(CodeStyleSettings settings) {
  addIndentOptionsTab(settings);
  addTab(new CodeStyleXmlPanel(settings));
  addTab(new XmlArrangementPanel(settings));

  for (CodeStyleSettingsProvider provider : Extensions.getExtensions(CodeStyleSettingsProvider.EXTENSION_POINT_NAME)) {
    if (provider.getLanguage() == XMLLanguage.INSTANCE && !provider.hasSettingsPage()) {
      createTab(provider);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XmlCodeStyleMainPanel.java

示例4: buildConfigurables

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected Configurable[] buildConfigurables() {
  myPanels = new ArrayList<CodeStyleConfigurableWrapper>();

  final List<CodeStyleSettingsProvider> providers =
    Arrays.asList(Extensions.getExtensions(CodeStyleSettingsProvider.EXTENSION_POINT_NAME));
  Collections.sort(providers, new Comparator<CodeStyleSettingsProvider>() {
    @Override
    public int compare(CodeStyleSettingsProvider p1, CodeStyleSettingsProvider p2) {
      if (!p1.getPriority().equals(p2.getPriority())) {
        return p1.getPriority().compareTo(p2.getPriority());
      }
      String name1 = p1.getConfigurableDisplayName();
      if (name1 == null) name1 = "";
      String name2 = p2.getConfigurableDisplayName();
      if (name2 == null) name2 = "";
      return name1.compareToIgnoreCase(name2);
    }
  });

  for (final CodeStyleSettingsProvider provider : providers) {
    if (provider.hasSettingsPage()) {
      myPanels.add(new CodeStyleConfigurableWrapper(provider, new CodeStyleSettingsPanelFactory() {
        @Override
        public NewCodeStyleSettingsPanel createPanel(final CodeStyleScheme scheme) {
          return new NewCodeStyleSettingsPanel(provider.createSettingsPage(scheme.getCodeStyleSettings(), ensureModel().getCloneSettings(scheme)));
        }
      }));
    }
  }

  return myPanels.toArray(new Configurable[myPanels.size()]);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:34,代码来源:CodeStyleSchemesConfigurable.java

示例5: initTabs

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected void initTabs(CodeStyleSettings settings)
{
	super.initTabs(settings);
	for(CodeStyleSettingsProvider provider : Extensions.getExtensions(CodeStyleSettingsProvider.EXTENSION_POINT_NAME))
	{
		if(provider.getLanguage() == CSharpLanguage.INSTANCE && !provider.hasSettingsPage())
		{
			createTab(provider);
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:13,代码来源:CSharpCodeStyleMainPanel.java

示例6: buildConfigurables

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
@Override
protected Configurable[] buildConfigurables() {
  myPanels = new ArrayList<CodeStyleConfigurableWrapper>();

  final List<CodeStyleSettingsProvider> providers =
    Arrays.asList(Extensions.getExtensions(CodeStyleSettingsProvider.EXTENSION_POINT_NAME));
  Collections.sort(providers, new Comparator<CodeStyleSettingsProvider>() {
    @Override
    public int compare(CodeStyleSettingsProvider p1, CodeStyleSettingsProvider p2) {
      if (!p1.getPriority().equals(p2.getPriority())) {
        return p1.getPriority().compareTo(p2.getPriority());
      }
      String name1 = p1.getConfigurableDisplayName();
      if (name1 == null) name1 = "";
      String name2 = p2.getConfigurableDisplayName();
      if (name2 == null) name2 = "";
      return name1.compareToIgnoreCase(name2);
    }
  });

  for (final CodeStyleSettingsProvider provider : providers) {
    if (provider.hasSettingsPage()) {
      myPanels.add(new CodeStyleConfigurableWrapper(provider, new CodeStyleSettingsPanelFactory() {
        @Override
        public NewCodeStyleSettingsPanel createPanel(final CodeStyleScheme scheme) {
          return new NewCodeStyleSettingsPanel(provider.createSettingsPage(scheme.getCodeStyleSettings(), ensureModel().getCloneSettings(scheme)));
        }
      }));
    }
  }

  if (Registry.is("ide.new.settings.dialog")) {
    int size = myPanels.size();
    Configurable[] result = new Configurable[size > 0 ? size - 1 : 0];
    for (int i = 0; i < result.length; i++) {
      result[i] = myPanels.get(i + 1);
    }
    return result;
  }
  return myPanels.toArray(new Configurable[myPanels.size()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:CodeStyleSchemesConfigurable.java

示例7: CodeStyleConfigurableWrapper

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
public CodeStyleConfigurableWrapper(@NotNull CodeStyleSettingsProvider provider, @NotNull CodeStyleSettingsPanelFactory factory) {
  myProvider = provider;
  myFactory = factory;
  myInitialResetInvoked = false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CodeStyleSchemesConfigurable.java

示例8: CodeStyleConfigurableWrapper

import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
public CodeStyleConfigurableWrapper(@Nonnull CodeStyleSettingsProvider provider, @Nonnull CodeStyleSettingsPanelFactory factory) {
  myProvider = provider;
  myFactory = factory;
  myInitialResetInvoked = false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:CodeStyleSchemesConfigurable.java


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