本文整理匯總了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;
}
};
}
示例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));
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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;
}
示例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();
}
}
}
}
示例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);
}
}
示例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()])));
}
}
}
示例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();
}
}));
}
示例12: updateIfCurrent
import com.intellij.openapi.options.Configurable; //導入依賴的package包/類
final boolean updateIfCurrent(Configurable configurable) {
if (myConfigurable != configurable) {
return false;
}
updateCurrent(configurable, false);
return true;
}
示例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();
}
示例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);
}
}
示例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) {
}
};
}