com.intellij.psi.codeStyle.CodeStyleSettingsProvider Java Examples
The following examples show how to use
com.intellij.psi.codeStyle.CodeStyleSettingsProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CodeStyleSchemesConfigurable.java From consulo with Apache License 2.0 | 6 votes |
@Override protected Configurable[] buildConfigurables() { myPanels = new ArrayList<>(); List<Configurable> result = new ArrayList<>(); for (CodeStyleSettingsProvider provider : CodeStyleSettingsProvider.EXTENSION_POINT_NAME.getExtensions()) { boolean isGeneral = provider instanceof GeneralCodeStyleSettingsProvider; if (provider.hasSettingsPage()) { CodeStyleConfigurableWrapper wrapper = buildWrapper(provider); myPanels.add(wrapper); if (!isGeneral) { result.add(wrapper); } else { myRootConfigurable = wrapper; } } } return result.toArray(new Configurable[result.size()]); }
Example #2
Source File: CSharpCodeStyleMainPanel.java From consulo-csharp with Apache License 2.0 | 5 votes |
@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); } } }
Example #3
Source File: CodeStyleSchemesConfigurable.java From consulo with Apache License 2.0 | 5 votes |
private CodeStyleConfigurableWrapper buildWrapper(CodeStyleSettingsProvider provider) { return new CodeStyleConfigurableWrapper(provider, new CodeStyleSettingsPanelFactory() { @Override public NewCodeStyleSettingsPanel createPanel(final CodeStyleScheme scheme) { return new NewCodeStyleSettingsPanel(provider.createSettingsPage(scheme.getCodeStyleSettings(), ensureModel().getCloneSettings(scheme))); } }); }
Example #4
Source File: CodeStyleSchemesConfigurable.java From consulo with Apache License 2.0 | 4 votes |
public CodeStyleConfigurableWrapper(@Nonnull CodeStyleSettingsProvider provider, @Nonnull CodeStyleSettingsPanelFactory factory) { myProvider = provider; myFactory = factory; myInitialResetInvoked = false; }