當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。