本文整理汇总了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()]);
}
示例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);
}
}
}
示例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);
}
}
}
示例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()]);
}
示例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);
}
}
}
示例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()]);
}
示例7: CodeStyleConfigurableWrapper
import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
public CodeStyleConfigurableWrapper(@NotNull CodeStyleSettingsProvider provider, @NotNull CodeStyleSettingsPanelFactory factory) {
myProvider = provider;
myFactory = factory;
myInitialResetInvoked = false;
}
示例8: CodeStyleConfigurableWrapper
import com.intellij.psi.codeStyle.CodeStyleSettingsProvider; //导入依赖的package包/类
public CodeStyleConfigurableWrapper(@Nonnull CodeStyleSettingsProvider provider, @Nonnull CodeStyleSettingsPanelFactory factory) {
myProvider = provider;
myFactory = factory;
myInitialResetInvoked = false;
}