diff options
Diffstat (limited to 'java/idea-ui/src/com/intellij/openapi/roots/ui')
15 files changed, 63 insertions, 66 deletions
diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java index cbfd826d8462..73f9f7f39807 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -26,6 +26,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectBundle; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.roots.ModifiableRootModel; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VirtualFile; @@ -140,6 +141,7 @@ public class JavaContentEntriesEditor extends CommonContentEntriesEditor { @Override protected JPanel createBottomControl(Module module) { + if (Registry.is("ide.new.project.settings")) return null; final JPanel innerPanel = new JPanel(new GridBagLayout()); innerPanel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 6)); return innerPanel; diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form index 292c1f6c81c6..576d5146ff89 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.openapi.roots.ui.configuration.ProjectConfigurable"> <grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="10"> - <margin top="14" left="4" bottom="4" right="4"/> + <margin top="0" left="0" bottom="0" right="0"/> <constraints> - <xy x="20" y="20" width="907" height="282"/> + <xy x="20" y="20" width="907" height="288"/> </constraints> <properties/> - <border type="none"/> + <border type="none"> + <size top="14" left="10" bottom="14" right="10"/> + </border> <children> <vspacer id="2fb9d"> <constraints> diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java index 9c46d56ce21e..2bc8499e6c01 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -39,6 +39,7 @@ import com.intellij.openapi.ui.DetailsComponent; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.EmptyRunnable; import com.intellij.openapi.util.io.FileUtil; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.pom.java.LanguageLevel; @@ -49,6 +50,7 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable; import javax.swing.*; +import javax.swing.border.EmptyBorder; import javax.swing.event.DocumentEvent; import java.awt.*; import java.io.IOException; @@ -108,7 +110,7 @@ public class ProjectConfigurable extends ProjectStructureElementConfigurable<Pro @Override public JComponent createOptionsPanel() { - myDetailsComponent = new DetailsComponent(); + myDetailsComponent = new DetailsComponent(!Registry.is("ide.new.project.settings"), !Registry.is("ide.new.project.settings")); myDetailsComponent.setContent(myPanel); myDetailsComponent.setText(getBannerSlogan()); @@ -152,7 +154,7 @@ public class ProjectConfigurable extends ProjectStructureElementConfigurable<Pro myPanel.add(myWholePanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(4, 0, 0, 0), 0, 0)); - + myPanel.setBorder(new EmptyBorder(0, 10, 0, 10)); myProjectCompilerOutput.getTextField().getDocument().addDocumentListener(new DocumentAdapter() { @Override protected void textChanged(DocumentEvent e) { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java index d78731b0a3c8..f24153739031 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -161,6 +161,9 @@ public class ProjectJdksConfigurable extends MasterDetailsComponent { @Override @Nullable protected ArrayList<AnAction> createActions(final boolean fromPopup) { + if (myProjectJdksModel == null) { + return null; + } final ArrayList<AnAction> actions = new ArrayList<AnAction>(); DefaultActionGroup group = new DefaultActionGroup(ProjectBundle.message("add.new.jdk.text"), true); group.getTemplatePresentation().setIcon(IconUtil.getAddIcon()); 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 bf083f92c66c..a5867d66d176 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 @@ -44,6 +44,7 @@ import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy; import com.intellij.packaging.artifacts.Artifact; import com.intellij.ui.JBSplitter; +import com.intellij.ui.OnePixelSplitter; import com.intellij.ui.components.panels.Wrapper; import com.intellij.ui.navigation.BackAction; import com.intellij.ui.navigation.ForwardAction; @@ -174,12 +175,9 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se public JComponent createComponent() { myComponent = new MyPanel(); - mySplitter = new JBSplitter(false, .15f); + mySplitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false, .15f) : new JBSplitter(false, .15f); mySplitter.setSplitterProportionKey("ProjectStructure.TopLevelElements"); mySplitter.setHonorComponentsMinimumSize(true); - if (Registry.is("ide.new.project.settings")) { - mySplitter.setOnePixelMode(); - } initSidePanel(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java index 290f35e561b5..355888b02a42 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java @@ -20,7 +20,10 @@ import com.intellij.openapi.ui.GraphicsConfig; import com.intellij.openapi.ui.popup.ListItemDescriptor; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.ui.*; +import com.intellij.ui.Gray; +import com.intellij.ui.JBColor; +import com.intellij.ui.ScrollPaneFactory; +import com.intellij.ui.SeparatorWithText; import com.intellij.ui.components.JBList; import com.intellij.ui.components.panels.NonOpaquePanel; import com.intellij.ui.navigation.History; @@ -172,16 +175,14 @@ public class SidePanel extends JPanel { protected JComponent createItemComponent() { myExtraPanel = new NonOpaquePanel(new BorderLayout()); myCountLabel = new CountLabel(); - + final JComponent component = super.createItemComponent(); if (Registry.is("ide.new.project.settings")) { - myTextLabel = new EngravedLabel(); - myTextLabel.setFont(myTextLabel.getFont().deriveFont(Font.BOLD)); myTextLabel.setForeground(Gray._240); myTextLabel.setOpaque(true); - return layoutComponent(myTextLabel); } - return super.createItemComponent(); + + return component; } @Override diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java index 69b490828f0b..618f085f00bb 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * 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. @@ -34,12 +34,12 @@ import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.Library import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.ModuleOutputSourceItem; import com.intellij.openapi.roots.ui.configuration.artifacts.sourceItems.SourceItemsTree; import com.intellij.openapi.ui.FixedSizeButton; -import com.intellij.openapi.ui.Splitter; import com.intellij.openapi.ui.TextFieldWithBrowseButton; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.io.FileUtilRt; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.packaging.artifacts.Artifact; @@ -83,6 +83,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { private JPanel myErrorPanelPlace; private ThreeStateCheckBox myShowContentCheckBox; private FixedSizeButton myShowSpecificContentOptionsButton; + private JPanel myTopPanel; private final ActionGroup myShowSpecificContentOptionsGroup; private final Project myProject; private final ComplexElementSubstitutionParameters mySubstitutionParameters = new ComplexElementSubstitutionParameters(); @@ -106,6 +107,9 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { myPropertiesEditors = new ArtifactPropertiesEditors(myContext, myOriginalArtifact, myOriginalArtifact); Disposer.register(this, mySourceItemsTree); Disposer.register(this, myLayoutTreeComponent); + if (Registry.is("ide.new.project.settings")) { + myTopPanel.setBorder(new EmptyBorder(0, 10, 0, 10)); + } myBuildOnMakeCheckBox.setSelected(artifact.isBuildOnMake()); final String outputPath = artifact.getOutputPath(); myOutputDirectoryField.addBrowseFolderListener(CompilerBundle.message("dialog.title.output.directory.for.artifact"), @@ -202,7 +206,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { myErrorPanelPlace.add(myValidationManager.getMainErrorPanel(), BorderLayout.CENTER); - Splitter splitter = new Splitter(false); + final JBSplitter splitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false) : new JBSplitter(false); final JPanel leftPanel = new JPanel(new BorderLayout()); JPanel treePanel = myLayoutTreeComponent.getTreePanel(); if (UIUtil.isUnderDarcula()) { @@ -213,7 +217,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { leftPanel.add(treePanel, BorderLayout.CENTER); if (UIUtil.isUnderDarcula()) { CompoundBorder border = - new CompoundBorder(new CustomLineBorder(UIUtil.getBorderColor(), 0, 0, 0, 1), BorderFactory.createEmptyBorder(0, 0, 0, 0)); + new CompoundBorder(new CustomLineBorder(0, 0, 0, 1), BorderFactory.createEmptyBorder(0, 0, 0, 0)); leftPanel.setBorder(border); } else { leftPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 0)); @@ -241,7 +245,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { labelPanel.add(link); rightTopPanel.add(labelPanel, BorderLayout.CENTER); rightPanel.add(rightTopPanel, BorderLayout.NORTH); - JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(mySourceItemsTree, UIUtil.isUnderDarcula()); + JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(mySourceItemsTree, UIUtil.isUnderDarcula() || Registry.is("ide.new.project.settings")); JPanel scrollPaneWrap = new JPanel(new BorderLayout()); scrollPaneWrap.add(scrollPane, BorderLayout.CENTER); if (UIUtil.isUnderDarcula()) { @@ -257,6 +261,13 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { rightPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 3)); } splitter.setSecondComponent(rightPanel); + if (Registry.is("ide.new.project.settings")) { + splitter.getDivider().setBackground(UIUtil.getPanelBackground()); + treePanel.setBorder(new EmptyBorder(0, 0, 0, 0)); + rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0)); + scrollPaneWrap.setBorder(new EmptyBorder(0,0,0,0)); + leftPanel.setBorder(new EmptyBorder(0,0,0,0)); + } myShowContentCheckBox.addActionListener(new ActionListener() { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsEditorImpl.form b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsEditorImpl.form index d3edac73dcf3..17c98953e52a 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsEditorImpl.form +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsEditorImpl.form @@ -8,7 +8,7 @@ <properties/> <border type="none"/> <children> - <grid id="6e544" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> + <grid id="6e544" binding="myTopPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <margin top="0" left="0" bottom="0" right="0"/> <constraints> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsStructureConfigurable.java index 52b601e4d9fe..5deea9c75f74 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactsStructureConfigurable.java @@ -286,25 +286,7 @@ public class ArtifactsStructureConfigurable extends BaseStructureConfigurable { } private void addArtifact(@NotNull ArtifactType type, @NotNull ArtifactTemplate artifactTemplate) { - final ArtifactTemplate.NewArtifactConfiguration configuration = artifactTemplate.createArtifact(); - if (configuration == null) { - return; - } - - final String baseName = configuration.getArtifactName(); - String name = baseName; - int i = 2; - while (myPackagingEditorContext.getArtifactModel().findArtifact(name) != null) { - name = baseName + i; - i++; - } - - ArtifactType actualType = configuration.getArtifactType(); - if (actualType == null) { - actualType = type; - } - final ModifiableArtifact artifact = myPackagingEditorContext.getOrCreateModifiableArtifactModel().addArtifact(name, actualType, configuration.getRootElement()); - artifactTemplate.setUpArtifact(artifact, configuration); + Artifact artifact = ArtifactUtil.addArtifact(myPackagingEditorContext.getOrCreateModifiableArtifactModel(), type, artifactTemplate); selectNodeInTree(findNodeByObject(myRoot, artifact)); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java index ff1fdd393961..d8392ea73e63 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * 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. @@ -47,7 +47,6 @@ import com.intellij.ui.treeStructure.SimpleTreeStructure; import com.intellij.ui.treeStructure.WeightBasedComparator; import com.intellij.util.ArrayUtil; import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.ui.UIUtil; import com.intellij.util.ui.tree.TreeUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -132,7 +131,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable { emptyPanel.setPreferredSize(new Dimension(0, 0)); myPropertiesPanelWrapper = new JPanel(new CardLayout()); - myPropertiesPanel.setBorder(new CustomLineBorder(UIUtil.getBorderColor(), 1, 0, 0, 0)); + myPropertiesPanel.setBorder(new CustomLineBorder(1, 0, 0, 0)); myPropertiesPanelWrapper.add(EMPTY_CARD, emptyPanel); myPropertiesPanelWrapper.add(PROPERTIES_CARD, myPropertiesPanel); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryRootsComponent.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryRootsComponent.java index 5d884a6f9bc8..e47e955fff24 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryRootsComponent.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryRootsComponent.java @@ -41,6 +41,7 @@ import com.intellij.openapi.ui.ex.MultiLineLabel; import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.Disposer; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vfs.JarFileSystem; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; @@ -48,6 +49,7 @@ import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.ui.AnActionButton; import com.intellij.ui.AnActionButtonRunnable; import com.intellij.ui.ToolbarDecorator; +import com.intellij.ui.border.CustomLineBorder; import com.intellij.ui.treeStructure.Tree; import com.intellij.util.ArrayUtil; import com.intellij.util.IconUtil; @@ -157,7 +159,9 @@ public class LibraryRootsComponent implements Disposable, LibraryEditorComponent ToolbarDecorator toolbarDecorator = ToolbarDecorator.createDecorator(myTree).disableUpDownActions() .setRemoveActionName(ProjectBundle.message("library.remove.action")) .disableRemoveAction(); - + if (Registry.is("ide.new.project.settings")) { + toolbarDecorator.setPanelBorder(new CustomLineBorder(1, 0, 0, 0)); + } final List<AttachRootButtonDescriptor> popupItems = new ArrayList<AttachRootButtonDescriptor>(); for (AttachRootButtonDescriptor descriptor : myDescriptor.createAttachButtons()) { Icon icon = descriptor.getToolbarIcon(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseStructureConfigurable.java index b88f92474fcf..a3b1db0dcf24 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseStructureConfigurable.java @@ -38,7 +38,6 @@ import com.intellij.openapi.ui.NamedConfigurable; import com.intellij.openapi.util.ActionCallback; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Disposer; -import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.registry.Registry; import com.intellij.packaging.artifacts.Artifact; import com.intellij.ui.TreeSpeedSearch; @@ -302,7 +301,7 @@ public abstract class BaseStructureConfigurable extends MasterDetailsComponent i result.addAll(copyActions); result.add(Separator.getInstance()); - if (fromPopup || !(SystemInfo.isMac && Registry.is("ide.new.project.settings"))) { + if (fromPopup || !Registry.is("ide.new.project.settings")) { result.add(new MyFindUsagesAction(myTree)); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetStructureConfigurable.java index e5a008d3dcbb..d5248a55e7ad 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetStructureConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -35,6 +35,7 @@ import com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.FacetProje import com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ProjectStructureElement; import com.intellij.openapi.ui.DetailsComponent; import com.intellij.openapi.ui.NamedConfigurable; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.treeStructure.filtered.FilteringTreeBuilder; import com.intellij.util.ui.tree.TreeUtil; @@ -277,8 +278,10 @@ public class FacetStructureConfigurable extends BaseStructureConfigurable { actions.add(new MyNavigateAction()); } actions.add(new MyRemoveAction()); - actions.add(Separator.getInstance()); - addCollapseExpandActions(actions); + if (fromPopup || !(Registry.is("ide.new.project.settings"))) { + actions.add(Separator.getInstance()); + addCollapseExpandActions(actions); + } return actions; } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetsTreeCellRenderer.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetsTreeCellRenderer.java index d89fe3797478..216ad982bbd3 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetsTreeCellRenderer.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FacetsTreeCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * 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. @@ -54,15 +54,7 @@ public class FacetsTreeCellRenderer extends GroupedElementsRenderer.Tree { if (configurable != null) { final Icon icon = configurable.getIcon(expanded); final boolean showSeparator = configurable instanceof FrameworkDetectionConfigurable; - int width = -1; - if (showSeparator && tree.isVisible()) { - final int treeWidth = tree.getVisibleRect().width; - if (treeWidth > 0) { - width = treeWidth; - } - } - final JComponent component = configureComponent(node.getDisplayName(), null, icon, icon, selected, showSeparator, null, - width); + final JComponent component = configureComponent(node.getDisplayName(), null, icon, icon, selected, showSeparator, null, -1); myTextLabel.setOpaque(selected); return component; diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java index 1c313c1077ee..a2a7e6b5c76f 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java @@ -53,7 +53,6 @@ import com.intellij.openapi.ui.*; import com.intellij.openapi.util.ActionCallback; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.NullableComputable; -import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; @@ -149,9 +148,9 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple @NotNull protected ArrayList<AnAction> createActions(final boolean fromPopup) { final ArrayList<AnAction> result = super.createActions(fromPopup); - result.add(Separator.getInstance()); - result.add(new MyGroupAction()); - if (fromPopup || !(SystemInfo.isMac && Registry.is("ide.new.project.settings"))) { + if (fromPopup || !Registry.is("ide.new.project.settings")) { + result.add(Separator.getInstance()); + result.add(new MyGroupAction()); addCollapseExpandActions(result); } return result; |