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


Java Configurable类代码示例

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


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

示例1: createSettingsPage

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
@NotNull
@Override
public Configurable createSettingsPage(CodeStyleSettings settings, CodeStyleSettings originalSettings) {
    return new CodeStyleAbstractConfigurable(settings, originalSettings, "Neos Fusion") {
        @Override
        protected CodeStyleAbstractPanel createPanel(CodeStyleSettings codeStyleSettings) {
            return new FusionCodeStyleMainPanel(getCurrentSettings(), codeStyleSettings);
        }

        @Nullable
        @Override
        public String getHelpTopic() {
            return null;
        }
    };
}
 
开发者ID:cvette,项目名称:intellij-neos,代码行数:17,代码来源:FusionCodeStyleSettingsProvider.java

示例2: MavenSettings

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public MavenSettings(Project project) {
  myProject = project;

  myConfigurable = new MavenGeneralConfigurable() {
    protected MavenGeneralSettings getState() {
      return MavenProjectsManager.getInstance(myProject).getGeneralSettings();
    }
  };

  myChildren = new ArrayList<Configurable>();
  myChildren.add(new MavenImportingConfigurable(myProject));
  myChildren.add(new MavenIgnoredFilesConfigurable(myProject));

  myChildren.add(new MyMavenRunnerConfigurable(project));

  myChildren.add(new MavenTestRunningConfigurable(project));

  if (!myProject.isDefault()) {
    myChildren.add(new MavenRepositoriesConfigurable(myProject));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:MavenSettings.java

示例3: isModified

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public boolean isModified() {
  if (!Comparing.equal(mySelectedCompiler, myCompilerConfiguration.getDefaultCompiler())) {
    return true;
  }
  for (Configurable configurable : myConfigurables) {
    if (configurable.isModified()) {
      return true;
    }
  }
  if (!Comparing.equal(myTargetLevelComponent.getProjectBytecodeTarget(), myCompilerConfiguration.getProjectBytecodeTarget())) {
    return true;
  }
  if (!Comparing.equal(myTargetLevelComponent.getModulesBytecodeTargetMap(), myCompilerConfiguration.getModulesBytecodeTargetMap())) {
    return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:JavaCompilersTab.java

示例4: apply

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public void apply() throws ConfigurationException {
  try {
    for (Configurable configurable : myConfigurables) {
      if (configurable.isModified()) {
        configurable.apply();
      }
    }

    myCompilerConfiguration.setDefaultCompiler(mySelectedCompiler);
    myCompilerConfiguration.setProjectBytecodeTarget(myTargetLevelComponent.getProjectBytecodeTarget());
    myCompilerConfiguration.setModulesBytecodeTargetMap(myTargetLevelComponent.getModulesBytecodeTargetMap());

    myTargetLevelComponent.setProjectBytecodeTargetLevel(myCompilerConfiguration.getProjectBytecodeTarget());
    myTargetLevelComponent.setModuleTargetLevels(myCompilerConfiguration.getModulesBytecodeTargetMap());
  }
  finally {
    BuildManager.getInstance().clearState(myProject);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:JavaCompilersTab.java

示例5: createFileTypeConfigurable

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public static Configurable createFileTypeConfigurable(Project project, FileType fileType, TemplateCommentPanel parentPanel) {
  if (fileType.equals(StdFileTypes.JAVA)) {
    return new TemplateCommentPanel(fileType, parentPanel, new String[]{"Before Package", "Before Imports", "Before Class"}, project);
  }
  else if (fileType.equals(StdFileTypes.XML)) {
    return new TemplateCommentPanel(fileType, parentPanel, LOCATIONS_IN_FILE, project);
  }
  else if (fileType.equals(StdFileTypes.HTML)) {
    return new TemplateCommentPanel(fileType, parentPanel, LOCATIONS_IN_FILE, project);
  }
  else if (fileType.equals(StdFileTypes.JSP)) {
    return new TemplateCommentPanel(fileType, parentPanel, LOCATIONS_IN_FILE, project);
  }
  else if (fileType.equals(StdFileTypes.JSPX)) {
    return new TemplateCommentPanel(fileType, parentPanel, LOCATIONS_IN_FILE, project);
  }
  else {
    return new TemplateCommentPanel(fileType, parentPanel, null, project);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:FileTypeCopyrightConfigurableFactory.java

示例6: SingleConfigurableEditor

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public SingleConfigurableEditor(@Nullable Project project,
                                Configurable configurable,
                                @NonNls String dimensionKey,
                                final boolean showApplyButton,
                                @NotNull IdeModalityType ideModalityType) {
  super(project, true, ideModalityType);
  myDimensionKey = dimensionKey;
  myShowApplyButton = showApplyButton;
  String title = createTitleString(configurable);
  if (project != null && project.isDefault()) title = "Default " + title;
  setTitle(title);

  myProject = project;
  myConfigurable = configurable;
  init();
  myConfigurable.reset();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SingleConfigurableEditor.java

示例7: expandGroup

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public static List<Configurable> expandGroup(final ConfigurableGroup group) {
  final Configurable[] configurables = group.getConfigurables();
  List<Configurable> result = new ArrayList<Configurable>();
  ContainerUtil.addAll(result, configurables);
  for (Configurable each : configurables) {
    addChildren(each, result);
  }
  
  result = ContainerUtil.filter(result, new Condition<Configurable>() {
    @Override
    public boolean value(Configurable configurable) {
      return !(configurable instanceof SearchableConfigurable.Parent) || ((SearchableConfigurable.Parent)configurable).isVisible();
    }
  });
 
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SearchUtil.java

示例8: apply

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
@Override
public final void apply() throws ConfigurationException {
  if (root != null) {
    root.apply(getSettings());
    for (DebuggerConfigurableProvider provider : DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions()) {
      provider.generalApplied(getCategory());
    }
  }

  if (isChildrenMerged()) {
    for (Configurable child : children) {
      if (child.isModified()) {
        child.apply();
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SubCompositeConfigurable.java

示例9: updateStatus

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
void updateStatus(Configurable configurable) {
  myFilter.updateSpotlight(configurable == null);
  if (myBanner != null) {
    myBanner.setProject(myTreeView.findConfigurableProject(configurable));
    myBanner.setText(myTreeView.getPathNames(configurable));
  }
  if (myEditor != null) {
    ConfigurationException exception = myFilter.myContext.getErrors().get(configurable);
    myEditor.getApplyAction().setEnabled(!myFilter.myContext.getModified().isEmpty());
    myEditor.getResetAction().setEnabled(myFilter.myContext.isModified(configurable) || exception != null);
    myEditor.setError(exception);
    myEditor.revalidate();
  }
  if (configurable != null) {
    new Alarm().addRequest(new Runnable() {
      @Override
      public void run() {
        if (!myDisposed && mySpotlightPainter != null) {
          mySpotlightPainter.updateNow();
        }
      }
    }, 300);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SettingsEditor.java

示例10: computeMergedConfigurables

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
private static void computeMergedConfigurables(@NotNull DebuggerConfigurableProvider[] providers, @NotNull List<Configurable> result) {
  for (DebuggerSettingsCategory category : MERGED_CATEGORIES) {
    List<Configurable> configurables = getConfigurables(category, providers);
    if (!configurables.isEmpty()) {
      String id = category.name().toLowerCase(Locale.ENGLISH);
      result.add(new MergedCompositeConfigurable("debugger." + id, XDebuggerBundle.message("debugger." + id + ".display.name"),
                                                 configurables.toArray(new Configurable[configurables.size()])));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DebuggerConfigurable.java

示例11: createDataViewsConfigurable

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
@SuppressWarnings("SpellCheckingInspection")
@NotNull
public static List<Configurable> createDataViewsConfigurable() {
  return Arrays.<Configurable>asList(new DebuggerDataViewsConfigurable(null),
                                     SimpleConfigurable.create("reference.idesettings.debugger.typerenderers", DebuggerBundle.message("user.renderers.configurable.display.name"),
                                                               UserRenderersConfigurable.class, new Getter<NodeRendererSettings>() {
                                         @Override
                                         public NodeRendererSettings get() {
                                           return NodeRendererSettings.getInstance();
                                         }
                                       }));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JavaDebuggerSettings.java

示例12: updateIfCurrent

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
final boolean updateIfCurrent(Configurable configurable) {
  if (myConfigurable != configurable) {
    return false;
  }
  updateCurrent(configurable, false);
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ConfigurableEditor.java

示例13: createConfigurables

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
@NotNull
@SuppressWarnings("EnumSwitchStatementWhichMissesCases")
@Override
public Collection<? extends Configurable> createConfigurables(@NotNull DebuggerSettingsCategory category) {
  switch (category) {
    case STEPPING:
      return singletonList(SimpleConfigurable.create("reference.idesettings.debugger.groovy", GroovyBundle.message("groovy.debug.caption"),
                                                     "reference.idesettings.debugger.groovy", GroovySteppingConfigurableUi.class, this));
    case HOTSWAP:
      return singletonList(SimpleConfigurable.create("reference.idesettings.debugger.groovy", GroovyBundle.message("groovy.debug.caption"),
                                                     "reference.idesettings.debugger.groovy", GroovyHotSwapConfigurableUi.class, this));
  }
  return Collections.emptyList();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:GroovyDebuggerSettings.java

示例14: testEditJUnitConfiguration

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
public void testEditJUnitConfiguration() throws ConfigurationException {
  if (PlatformTestUtil.COVERAGE_ENABLED_BUILD) return;

  PsiClass testA = findTestA(getModule2());
  JUnitConfiguration configuration = createConfiguration(testA);
  JUnitConfigurable editor = new JUnitConfigurable(myProject);
  try {
    Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
    configurable.reset();
    final EditorTextFieldWithBrowseButton component =
      ((LabeledComponent<EditorTextFieldWithBrowseButton>)editor.getTestLocation(JUnitConfigurationModel.CLASS)).getComponent();
    assertEquals(testA.getQualifiedName(), component.getText());
    PsiClass otherTest = findClass(getModule2(), "test2.Test2");
    component.setText(otherTest.getQualifiedName());
    configurable.apply();
    assertEquals(otherTest.getName(), configuration.getName());
    String specialName = "My name";
    configuration.setName(specialName);
    configuration.setNameChangedByUser(true);
    configurable.reset();
    component.setText(testA.getQualifiedName());
    configurable.apply();
    assertEquals(specialName, configuration.getName());
  }
  finally {
    Disposer.dispose(editor);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ConfigurationsTest.java

示例15: createOptionsDialog

import com.intellij.openapi.options.Configurable; //导入依赖的package包/类
@Override
public UpdateOrStatusOptionsDialog createOptionsDialog(final Project project, LinkedHashMap<Configurable, AbstractVcs> envToConfMap,
                                                       final String scopeName) {
  return new UpdateOrStatusOptionsDialog(project, envToConfMap) {
    @Override
    protected String getRealTitle() {
      return VcsBundle.message("action.display.name.integrate.scope", scopeName);
    }

    @Override
    protected String getActionNameForDimensions() {
      return "integrate";
    }

    @Override
    protected boolean canBeHidden() {
      return false;
    }

    @Override
    protected boolean isToBeShown() {
      return true;
    }

    @Override
    protected void setToBeShown(boolean value, boolean onOk) {
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ActionInfo.java


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