diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java new file mode 100644 index 000000000000..2e2860c9f047 --- /dev/null +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java @@ -0,0 +1,73 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.roots.ui.configuration; + +import com.intellij.openapi.options.Configurable; +import com.intellij.openapi.options.ConfigurationException; +import com.intellij.openapi.project.Project; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.Nullable; + +import javax.swing.*; + +/** + * @author Konstantin Bulenkov + */ +public class ErrorPaneConfigurable implements Configurable { + private final Project myProject; + + public ErrorPaneConfigurable(Project project) { + myProject = project; + } + + @Nls + @Override + public String getDisplayName() { + return "Problems"; + } + + @Nullable + @Override + public String getHelpTopic() { + return null; + } + + @Nullable + @Override + public JComponent createComponent() { + return new JLabel("Demo"); + } + + @Override + public boolean isModified() { + return false; + } + + @Override + public void apply() throws ConfigurationException { + + } + + @Override + public void reset() { + + } + + @Override + public void disposeUIResources() { + + } +} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java index 928f0cd82bef..131a15858eab 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java @@ -209,7 +209,9 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se myComponent.add(mySplitter, BorderLayout.CENTER); myErrorsComponent = new ConfigurationErrorsComponent(myProject); - myComponent.add(myErrorsComponent, BorderLayout.SOUTH); + if (!Registry.is("ide.new.project.settings")) { + myComponent.add(myErrorsComponent, BorderLayout.SOUTH); + } myUiInitialized = true; @@ -238,6 +240,9 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se addConfigurable(configurable, true); } } + if (Registry.is("ide.new.project.settings")) { + addErrorPane(); + } mySidePanel.addSeparator("Platform Settings"); addJdkListConfig(); @@ -294,6 +299,10 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se addConfigurable(myProjectLibrariesConfig, ConfigurableId.PROJECT_LIBRARIES); } + private void addErrorPane() { + addConfigurable(new ErrorPaneConfigurable(myProject), true); + } + private void addGlobalLibrariesConfig() { addConfigurable(myGlobalLibrariesConfig, ConfigurableId.GLOBAL_LIBRARIES); }