From 18ca1f0c459fc6dc94d5b3cd7058b6de84751197 Mon Sep 17 00:00:00 2001 From: nik Date: Fri, 17 Jun 2011 11:24:02 +0400 Subject: [PATCH] war against zombies: 18 killed --- .../ant/artifacts/ArtifactsGenerator.java | 2 - .../impl/packagingCompiler/MapCache.java | 139 ------------------ .../PackagingCompilerCache.java | 87 ----------- .../autodetecting/FacetDetectionIndex.java | 5 - .../facetsTree/DetectedFacetsTree.java | 9 +- .../facet/impl/ui/FacetTreeModel.java | 8 - .../LibrariesValidatorContextImpl.java | 18 +-- .../FrameworkSupportNode.java | 6 - .../ModuleCreationPromptStep.java | 83 ----------- .../configuration/ActionsHeaderComponent.java | 71 --------- .../configuration/LibraryDependantsPanel.java | 99 ------------- .../ui/configuration/ModuleCreationInfo.java | 26 ---- .../configuration/ModuleDependantsPanel.java | 77 ---------- .../ui/configuration/ModuleEditorState.java | 60 -------- .../MoveTableRowButtonListener.java | 67 --------- .../artifacts/nodes/PackagingNodeSource.java | 10 -- .../sourceItems/ModuleSourceItemGroup.java | 11 +- .../libraryEditor/LibraryRootsComponent.java | 4 - .../LibraryTableTreeBuilder.java | 8 - .../GlobalResourcesConfigurable.java | 84 ----------- .../projectRoot/HistoryAware.java | 41 ------ .../LibrariesContainerFactory.java | 5 - .../projectRoot/ModulesConfigurable.java | 90 ------------ .../daemon/UsageInModuleClasspath.java | 4 - .../impl/ConfigFileInfoSetImpl.java | 11 -- .../printing/HyperlinksToClassesOption.java | 12 +- .../icons/src/modules/globalResources.png | Bin 820 -> 0 bytes .../options/editor/EditorOptionsPanel.java | 5 - .../completion/impl/SwapComparator.java | 33 ----- .../impl/ui/libraries/LibraryDownloader.java | 12 -- .../ide/fileTemplates/impl/UrlUtil.java | 2 - .../openapi/roots/impl/OrderEntryUtil.java | 10 -- .../openapi/roots/impl/OrderRootsCache.java | 14 -- .../src/messages/IdeBundle.properties | 3 - .../src/messages/ProjectBundle.properties | 4 - .../quick/common/AbstractValueHint.java | 4 - .../xdebugger/impl/frame/XValueMarkers.java | 4 +- .../xdebugger/impl/ui/tree/ValueMarkup.java | 4 - .../impl/ui/tree/XDebuggerTreeState.java | 9 -- .../src/messages/CompilerBundle.properties | 1 - resources/src/componentSets/Configurables.xml | 5 - 41 files changed, 16 insertions(+), 1131 deletions(-) delete mode 100644 java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/MapCache.java delete mode 100644 java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/PackagingCompilerCache.java delete mode 100644 java/idea-ui/src/com/intellij/ide/util/projectWizard/ModuleCreationPromptStep.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ActionsHeaderComponent.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LibraryDependantsPanel.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleCreationInfo.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleDependantsPanel.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleEditorState.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/MoveTableRowButtonListener.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/GlobalResourcesConfigurable.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/HistoryAware.java delete mode 100644 java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModulesConfigurable.java delete mode 100644 platform/icons/src/modules/globalResources.png delete mode 100644 platform/lang-impl/src/com/intellij/codeInsight/completion/impl/SwapComparator.java diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactsGenerator.java b/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactsGenerator.java index 3e160fbb40e5..51ce1f42c516 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactsGenerator.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactsGenerator.java @@ -47,10 +47,8 @@ public class ArtifactsGenerator { private final PackagingElementResolvingContext myResolvingContext; private final ArtifactAntGenerationContextImpl myContext; private final List myAllArtifacts; - private final GenerationOptions myGenOptions; public ArtifactsGenerator(Project project, GenerationOptions genOptions) { - myGenOptions = genOptions; myResolvingContext = ArtifactManager.getInstance(project).getResolvingContext(); myAllArtifacts = new ArrayList(Arrays.asList(ArtifactManager.getInstance(project).getSortedArtifacts())); diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/MapCache.java b/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/MapCache.java deleted file mode 100644 index 82ba10ad35c0..000000000000 --- a/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/MapCache.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2000-2009 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.compiler.impl.packagingCompiler; - -/* - * @author: Eugene Zhuravlev - * Date: Jan 23, 2003 - * Time: 2:58:25 PM - */ - -import com.intellij.CommonBundle; -import com.intellij.compiler.CompilerConfigurationImpl; -import com.intellij.compiler.CompilerIOUtil; -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.compiler.CompilerBundle; -import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.ui.Messages; -import com.intellij.openapi.util.io.FileUtil; - -import java.io.*; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -public abstract class MapCache { - private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.impl.MapCache"); - - protected Map myMap = null; - protected final File myStoreFile; - private boolean myIsDirty = false; - - MapCache(String storePath) { - myStoreFile = new File(storePath); - } - - public boolean isDirty() { - return myIsDirty; - } - - protected void setDirty() { - myIsDirty = true; - } - - protected boolean load() { - if (myMap == null) { - myMap = new HashMap(); - myIsDirty = false; - if (myStoreFile.exists() && myStoreFile.length() > 0L) { - try { - byte[] bytes = FileUtil.loadFileBytes(myStoreFile); - DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(bytes)); - try { - int version = inputStream.readInt(); - if (version == CompilerConfigurationImpl.DEPENDENCY_FORMAT_VERSION) { - int size = inputStream.readInt(); - myMap = new HashMap(); - - for (int i = 0; i < size; i++) { - String key = CompilerIOUtil.readString(inputStream); - T value = read(inputStream); - myMap.put(key, value); - } - } - } - finally { - inputStream.close(); - } - } - catch (Throwable e) { - LOG.info(e); - } - } - } - return true; - } - - protected abstract T read(DataInputStream stream) throws IOException; - - protected abstract void write(T t, DataOutputStream stream) throws IOException; - - public void save() { - if (myMap == null) { - return; // nothing to save - } - try { - FileUtil.createParentDirs(myStoreFile); - final DataOutputStream outStream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myStoreFile))); - - try { - outStream.writeInt(CompilerConfigurationImpl.DEPENDENCY_FORMAT_VERSION); - final Iterator keysIterator = myMap.keySet().iterator(); - outStream.writeInt(myMap.size()); - while (keysIterator.hasNext()) { - final String key = keysIterator.next(); - final T value = myMap.get(key); - CompilerIOUtil.writeString(key, outStream); - write(value, outStream); - } - myIsDirty = false; - } - finally { - outStream.close(); - } - } - catch (IOException e) { - if (LOG.isDebugEnabled()) { - LOG.debug(e); - } - if (!ApplicationManager.getApplication().isUnitTestMode()) { - final String message = CompilerBundle.message("error.saving.data.to.file", myStoreFile.getPath(), e.getMessage()); - ApplicationManager.getApplication().invokeLater(new Runnable() { - public void run() { - Messages.showMessageDialog(message, CommonBundle.getWarningTitle(), Messages.getWarningIcon()); - } - }); - } - } - } - - public boolean wipe() { - myMap = null; - myIsDirty = false; - return myStoreFile.delete(); - } - -} diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/PackagingCompilerCache.java b/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/PackagingCompilerCache.java deleted file mode 100644 index cc1d1dae9cf0..000000000000 --- a/java/compiler/impl/src/com/intellij/compiler/impl/packagingCompiler/PackagingCompilerCache.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2000-2009 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.compiler.impl.packagingCompiler; - -import com.intellij.util.ArrayUtil; -import org.jetbrains.annotations.NonNls; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.Arrays; -import java.util.Iterator; - -public class PackagingCompilerCache extends MapCache { - public PackagingCompilerCache(@NonNls String storePath) { - super(storePath); - } - - public Long read(DataInputStream stream) throws IOException { - return stream.readLong(); - } - - public void write(Long aLong, DataOutputStream stream) throws IOException { - stream.writeLong(aLong.longValue()); - } - - public void update(@NonNls String url, Long state){ - if (!load()) { - return; - } - if (state != null) { - myMap.put(url, state); - setDirty(); - } - else { - remove(url); - } - } - - public void remove(String url){ - if (!load()) { - return; - } - myMap.remove(url); - setDirty(); - } - - public Long getState(String url){ - if (!load()) { - return null; - } - return myMap.get(url); - } - - public String[] getUrls() { - if (!load()) { - return ArrayUtil.EMPTY_STRING_ARRAY; - } - String[] urls = ArrayUtil.newStringArray(myMap.size()); - int idx = 0; - for (final String s : myMap.keySet()) { - urls[idx++] = s; - } - return urls; - } - - public Iterator getUrlsIterator() { - if (!load()) { - return Arrays.asList(ArrayUtil.EMPTY_STRING_ARRAY).iterator(); - } - return myMap.keySet().iterator(); - } - -} \ No newline at end of file diff --git a/java/idea-ui/src/com/intellij/facet/impl/autodetecting/FacetDetectionIndex.java b/java/idea-ui/src/com/intellij/facet/impl/autodetecting/FacetDetectionIndex.java index fe87963b467d..0d448a06c2c4 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/autodetecting/FacetDetectionIndex.java +++ b/java/idea-ui/src/com/intellij/facet/impl/autodetecting/FacetDetectionIndex.java @@ -145,11 +145,6 @@ public class FacetDetectionIndex extends AbstractFileIndex getFiles(final FacetPointer pointer) { - return myFacets.getKeys(pointer); - } - @Nullable public Set getFiles(final Facet facet) { return myFacets.getKeys(myFacetPointersManager.create(facet)); diff --git a/java/idea-ui/src/com/intellij/facet/impl/autodetecting/facetsTree/DetectedFacetsTree.java b/java/idea-ui/src/com/intellij/facet/impl/autodetecting/facetsTree/DetectedFacetsTree.java index 4fda5644870c..b52d6ada48ea 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/autodetecting/facetsTree/DetectedFacetsTree.java +++ b/java/idea-ui/src/com/intellij/facet/impl/autodetecting/facetsTree/DetectedFacetsTree.java @@ -20,9 +20,9 @@ import com.intellij.facet.FacetType; import com.intellij.facet.autodetecting.DetectedFacetPresentation; import com.intellij.facet.impl.autodetecting.FacetDetectorRegistryEx; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.project.ProjectBundle; import com.intellij.openapi.util.IconLoader; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.project.ProjectBundle; import com.intellij.ui.CheckboxTreeBase; import com.intellij.ui.CheckedTreeNode; import com.intellij.ui.ColoredTreeCellRenderer; @@ -30,7 +30,6 @@ import com.intellij.ui.SimpleTextAttributes; import org.jetbrains.annotations.Nullable; import javax.swing.*; -import javax.swing.tree.TreePath; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -58,12 +57,6 @@ public class DetectedFacetsTree extends CheckboxTreeBase { return root; } - @Nullable - public CheckedTreeNode getSelectedNode() { - TreePath path = getSelectionPath(); - return path != null ? (CheckedTreeNode)path.getLastPathComponent() : null; - } - private static class FacetsCheckboxTreeCellRenderer extends CheckboxTreeCellRendererBase { public void customizeCellRenderer(final JTree tree, final Object value, diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/FacetTreeModel.java b/java/idea-ui/src/com/intellij/facet/impl/ui/FacetTreeModel.java index 2993fce0cbf6..8271a54f27b3 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/ui/FacetTreeModel.java +++ b/java/idea-ui/src/com/intellij/facet/impl/ui/FacetTreeModel.java @@ -79,14 +79,6 @@ public class FacetTreeModel { return getChildren(null); } - public void deleteFacetWithChildren(final FacetInfo info) { - final List children = getChildren(info); - for (FacetInfo child : children) { - deleteFacetWithChildren(child); - } - removeFacetInfo(info); - } - @Nullable public FacetInfo findNearestFacet(@NotNull FacetInfo info) { final FacetInfo parent = getParent(info); diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidatorContextImpl.java b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidatorContextImpl.java index 0324395ee4e0..6081b507aa4f 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidatorContextImpl.java +++ b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidatorContextImpl.java @@ -16,18 +16,16 @@ package com.intellij.facet.impl.ui.libraries; -import org.jetbrains.annotations.Nullable; -import org.jetbrains.annotations.NotNull; -import com.intellij.openapi.roots.ModuleRootModel; +import com.intellij.openapi.module.Module; import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ModuleRootManager; -import com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable; -import com.intellij.openapi.roots.ui.configuration.ModulesProvider; +import com.intellij.openapi.roots.ModuleRootModel; import com.intellij.openapi.roots.ui.configuration.DefaultModulesProvider; -import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory; +import com.intellij.openapi.roots.ui.configuration.ModulesProvider; import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer; -import com.intellij.openapi.roots.libraries.LibraryTable; -import com.intellij.openapi.module.Module; +import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * @author nik @@ -51,10 +49,6 @@ public class LibrariesValidatorContextImpl implements LibrariesValidatorContext return null; } - private LibraryTable getProjectLibraryTable() { - return ProjectLibraryTable.getInstance(myModule.getProject()); - } - @NotNull public ModulesProvider getModulesProvider() { return new DefaultModulesProvider(myModule.getProject()); diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNode.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNode.java index f99b04676f58..23dc2ff501d5 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNode.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNode.java @@ -17,7 +17,6 @@ package com.intellij.ide.util.newProjectWizard; import com.intellij.facet.impl.ui.libraries.LibraryCompositionSettings; import com.intellij.facet.impl.ui.libraries.LibraryOptionsPanel; -import com.intellij.facet.ui.libraries.LibraryInfo; import com.intellij.ide.util.frameworkSupport.*; import com.intellij.ide.util.newProjectWizard.impl.FrameworkSupportModelImpl; import com.intellij.openapi.Disposable; @@ -121,11 +120,6 @@ public class FrameworkSupportNode extends CheckedTreeNode { || !Comparing.equal(settings.getLibraryDescription(), getOrCreateLibraryDescription()); } - public LibraryInfo[] getLibraries() { - final FrameworkVersion version = myConfigurable.getSelectedVersion(); - return version != null ? version.getLibraries() : LibraryInfo.EMPTY_ARRAY; - } - public boolean isSettingsObsolete() { return myLibraryCompositionSettings == null || isObsolete(myLibraryCompositionSettings); } diff --git a/java/idea-ui/src/com/intellij/ide/util/projectWizard/ModuleCreationPromptStep.java b/java/idea-ui/src/com/intellij/ide/util/projectWizard/ModuleCreationPromptStep.java deleted file mode 100644 index 1f5d6937c4f2..000000000000 --- a/java/idea-ui/src/com/intellij/ide/util/projectWizard/ModuleCreationPromptStep.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2000-2009 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.ide.util.projectWizard; - -import com.intellij.openapi.ui.MultiLineLabelUI; -import com.intellij.openapi.util.IconLoader; -import com.intellij.openapi.application.ApplicationNamesInfo; -import com.intellij.ide.IdeBundle; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.ItemListener; - -/** - * @author Eugene Zhuravlev - * Date: Jan 21, 2004 - */ -public class ModuleCreationPromptStep extends ModuleWizardStep { - private static final Icon NEW_PROJECT_ICON = IconLoader.getIcon("/newprojectwizard.png"); - private final JPanel myPanel; - private final JRadioButton myRbCreateSingle; - private final JRadioButton myRbCreateMultiple; - - public ModuleCreationPromptStep() { - myPanel = new JPanel(new GridBagLayout()); - myPanel.setBorder(BorderFactory.createEtchedBorder()); - final String promptText = - IdeBundle.message("prompt.single.or.multi.module.project", ApplicationNamesInfo.getInstance().getProductName()); - final JLabel promptLabel = new JLabel(promptText); - promptLabel.setUI(new MultiLineLabelUI()); - myPanel.add(promptLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(8, 10, 8, 10), 0, 0)); - - myRbCreateSingle = new JRadioButton(IdeBundle.message("radio.create.&single.module.project"), true); - myRbCreateMultiple = new JRadioButton(IdeBundle.message("radio.create.configure.&multi.module.project")); - myPanel.add(myRbCreateSingle, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(8, 6, 0, 6), 0, 0)); - myPanel.add(myRbCreateMultiple, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 6, 0, 6), 0, 0)); - - ButtonGroup group = new ButtonGroup(); - group.add(myRbCreateSingle); - group.add(myRbCreateMultiple); - - } - - public JComponent getPreferredFocusedComponent() { - return myRbCreateSingle; - } - - public String getHelpId() { - return "project.new.page3"; - } - - public JComponent getComponent() { - return myPanel; - } - - public void updateDataModel() { - } - - public Icon getIcon() { - return NEW_PROJECT_ICON; - } - - public boolean isCreateModule() { - return myRbCreateSingle.isSelected(); - } - - public void addCreateModuleChoiceListener(ItemListener listener) { - myRbCreateSingle.addItemListener(listener); - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ActionsHeaderComponent.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ActionsHeaderComponent.java deleted file mode 100644 index 79b4f823f878..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ActionsHeaderComponent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2000-2009 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.util.ui.UIUtil; - -import javax.swing.*; -import java.awt.*; - -/** - * @author Eugene Zhuravlev - * Date: Oct 31 - * @author 2003 - */ -public class ActionsHeaderComponent extends JPanel/*ScalableIconComponent*/ { - private static final int HEADER_Y_OFFSET = 4; - private JLabel myHeaderLabel; - - public void addNotify() { - super.addNotify(); - final Dimension preferredSize = new Dimension(0, 0); - calcPreferredSize(this, preferredSize); - preferredSize.height += HEADER_Y_OFFSET; - this.setPreferredSize(preferredSize); - } - - public void setHeaderTextColor(Color color) { - myHeaderLabel.setForeground(color); - } - - private void calcPreferredSize(Container container, Dimension dimension) { - final Component[] components = container.getComponents(); - int maxWidth = 0; - int maxHeight = 0; - for (Component component : components) { - if (component instanceof Container) { - calcPreferredSize((Container)component, dimension); - maxWidth = Math.max(maxWidth, dimension.width); - maxHeight = Math.max(maxHeight, dimension.height); - } - else { - final Dimension preferredSize = component.getPreferredSize(); - maxWidth = Math.max(maxWidth, preferredSize.width); - maxHeight = Math.max(maxHeight, preferredSize.height); - } - } - final Dimension preferredSize = container.getPreferredSize(); - dimension.width = Math.max(maxWidth, preferredSize.width); - dimension.height = Math.max(maxHeight, preferredSize.height); - } - - public final void setSelected(boolean isSelected) { - setBackground(isSelected? UIUtil.getTableSelectionBackground() : UIUtil.getTableBackground()); - myHeaderLabel.setForeground(isSelected? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground()); - this.revalidate(); - this.repaint(); - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LibraryDependantsPanel.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LibraryDependantsPanel.java deleted file mode 100644 index a536e60297fb..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LibraryDependantsPanel.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2000-2009 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. - */ - -/* - * Created by IntelliJ IDEA. - * User: Anna.Kozlova - * Date: 14-Aug-2006 - * Time: 15:50:48 - */ -package com.intellij.openapi.roots.ui.configuration; - -import com.intellij.openapi.module.Module; -import com.intellij.openapi.roots.LibraryOrderEntry; -import com.intellij.openapi.roots.ModifiableRootModel; -import com.intellij.openapi.roots.OrderEntry; -import com.intellij.openapi.roots.libraries.Library; -import com.intellij.openapi.util.Comparing; -import com.intellij.ui.BooleanTableCellRenderer; -import com.intellij.ui.OrderPanel; - -import javax.swing.*; -import javax.swing.table.DefaultTableCellRenderer; -import java.awt.*; - -/** - * Dead code now - */ -public class LibraryDependantsPanel extends OrderPanel { - private final Library myLibrary; - - public LibraryDependantsPanel(final Library library) { - super(ModifiableRootModel.class, true); - myLibrary = library; - getEntryTable().setDefaultRenderer(ModifiableRootModel.class, new DefaultTableCellRenderer(){ - public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - final Component cellRendererComponent = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - if (value instanceof ModifiableRootModel){ - final ModifiableRootModel model = (ModifiableRootModel)value; - final Module module = model.getModule(); - setText(module.getName()); - setIcon(module.getModuleType().getNodeIcon(false)); - } - return cellRendererComponent; - } - }); - getEntryTable().setDefaultRenderer(Boolean.class, new BooleanTableCellRenderer()); - - setBorder(BorderFactory.createTitledBorder("Used In")); - } - - - public boolean isCheckable(final ModifiableRootModel entry) { - return true; - } - - public boolean isChecked(final ModifiableRootModel model) { - final OrderEntry[] entries = model.getOrderEntries(); - for (OrderEntry entry : entries) { - if (entry instanceof LibraryOrderEntry) { - final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry)entry; - if (Comparing.equal(libraryOrderEntry.getLibrary(), myLibrary)) { - return true; - } - } - } - return false; - } - - public void setChecked(final ModifiableRootModel model, final boolean checked) { - if (checked) { - model.addLibraryEntry(myLibrary); - } - else { - final OrderEntry[] entries = model.getOrderEntries(); - for (OrderEntry entry : entries) { - if (entry instanceof LibraryOrderEntry) { - final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry)entry; - if (Comparing.equal(libraryOrderEntry.getLibrary(), myLibrary)) { - model.removeOrderEntry(libraryOrderEntry); - break; - } - } - } - } - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleCreationInfo.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleCreationInfo.java deleted file mode 100644 index dbb51e2c19a1..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleCreationInfo.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2000-2009 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; - -/** - * @author Eugene Zhuravlev - * Date: Dec 15, 2003 - */ -public class ModuleCreationInfo { - public String name; - public String path; - public String moduleType; -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleDependantsPanel.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleDependantsPanel.java deleted file mode 100644 index 80fb61abc6a2..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleDependantsPanel.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2000-2009 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. - */ - -/* - * Created by IntelliJ IDEA. - * User: Anna.Kozlova - * Date: 14-Aug-2006 - * Time: 15:31:35 - */ -package com.intellij.openapi.roots.ui.configuration; - -import com.intellij.openapi.module.Module; -import com.intellij.openapi.roots.ModifiableRootModel; -import com.intellij.openapi.roots.ModuleOrderEntry; -import com.intellij.openapi.roots.OrderEntry; -import com.intellij.ui.OrderPanel; - -/** - * Dead code now - */ -public class ModuleDependantsPanel extends OrderPanel { - private final Module myModule; - - public ModuleDependantsPanel(final Module module) { - super(ModifiableRootModel.class, true); - myModule = module; - } - - - public boolean isCheckable(final ModifiableRootModel entry) { - return true; - } - - public boolean isChecked(final ModifiableRootModel model) { - final OrderEntry[] entries = model.getOrderEntries(); - for (OrderEntry entry : entries) { - if (entry instanceof ModuleOrderEntry) { - final ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry)entry; - if (moduleOrderEntry.getModule() == myModule) { - return true; - } - } - } - return false; - } - - public void setChecked(final ModifiableRootModel model, final boolean checked) { - if (checked) { - model.addModuleOrderEntry(myModule); - } - else { - final OrderEntry[] entries = model.getOrderEntries(); - for (OrderEntry entry : entries) { - if (entry instanceof ModuleOrderEntry) { - final ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry)entry; - if (moduleOrderEntry.getModule() == myModule) { - model.removeOrderEntry(moduleOrderEntry); - break; - } - } - } - } - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleEditorState.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleEditorState.java deleted file mode 100644 index f8bb89f71ac2..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModuleEditorState.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2000-2009 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.components.ProjectComponent; -import com.intellij.openapi.util.*; -import com.intellij.openapi.project.Project; -import org.jdom.Element; -import org.jetbrains.annotations.NotNull; - -/** - * @author Eugene Zhuravlev - * Date: Jul 22, 2004 - */ -public class ModuleEditorState implements ProjectComponent, JDOMExternalizable{ - - public String LAST_EDITED_MODULE_NAME; - public String LAST_EDITED_TAB_NAME; - - public static ModuleEditorState getInstance(Project project) { - return (ModuleEditorState)project.getComponent(ModuleEditorState.class); - } - - public void readExternal(Element element) throws InvalidDataException { - DefaultJDOMExternalizer.readExternal(this, element); - } - - public void writeExternal(Element element) throws WriteExternalException { - DefaultJDOMExternalizer.writeExternal(this, element); - } - - public void projectOpened() { - } - - public void projectClosed() { - } - - @NotNull - public String getComponentName() { - return "ModuleEditorState"; - } - - public void initComponent() { } - - public void disposeComponent() { - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/MoveTableRowButtonListener.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/MoveTableRowButtonListener.java deleted file mode 100644 index bed822850aef..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/MoveTableRowButtonListener.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2000-2009 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.ui.TableUtil; - -import javax.swing.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -/** - * @author Eugene Zhuravlev - * Date: May 21, 2004 - */ -class MoveTableRowButtonListener implements ActionListener { - private final int myDelta; - private final JTable myTable; - private final Runnable myOnRowMoveAction; - - public MoveTableRowButtonListener(int delta, JTable table, Runnable onRowMoveAction) { - myDelta = delta; - myTable = table; - myOnRowMoveAction = onRowMoveAction; - } - - public void actionPerformed(ActionEvent e) { - final int moveCount = Math.abs(myDelta); - for (int idx = 0; idx < moveCount; idx++) { - if (myDelta < 0) { - TableUtil.moveSelectedItemsUp(myTable); - } - else { - TableUtil.moveSelectedItemsDown(myTable); - } - } - /* - final int selectedIndex = myTable.getSelectedRow(); - if (selectedIndex < 0) { - return; - } - final DefaultTableModel tableModel = (DefaultTableModel)myTable.getModel(); - final int nextIndex = calcNextIndex(selectedIndex, tableModel.getRowCount(), myDelta); - if (selectedIndex == nextIndex) { - return; - } - tableModel.moveRow(selectedIndex, selectedIndex, nextIndex); - myTable.getSelectionModel().setSelectionInterval(nextIndex, nextIndex); - */ - if (myOnRowMoveAction != null) { - myOnRowMoveAction.run(); - } - myTable.requestFocus(); - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingNodeSource.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingNodeSource.java index 7bf8c2da7303..bc095edf7c50 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingNodeSource.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingNodeSource.java @@ -15,10 +15,8 @@ */ package com.intellij.openapi.roots.ui.configuration.artifacts.nodes; -import com.intellij.packaging.artifacts.Artifact; import com.intellij.packaging.elements.ComplexPackagingElement; import com.intellij.packaging.elements.CompositePackagingElement; -import com.intellij.packaging.impl.elements.ArtifactPackagingElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -48,14 +46,6 @@ public class PackagingNodeSource { return mySourceElement; } - @Nullable - public Artifact getSourceArtifact() { - if (mySourceElement instanceof ArtifactPackagingElement) { - return ((ArtifactPackagingElement)mySourceElement).findArtifact(mySourceParentNode.getContext()); - } - return null; - } - @NotNull public PackagingElementNode getSourceParentNode() { return mySourceParentNode; diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/sourceItems/ModuleSourceItemGroup.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/sourceItems/ModuleSourceItemGroup.java index 45a5ae41ebcb..aecfe28092cf 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/sourceItems/ModuleSourceItemGroup.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/sourceItems/ModuleSourceItemGroup.java @@ -25,11 +25,13 @@ import com.intellij.packaging.artifacts.ArtifactType; import com.intellij.packaging.elements.PackagingElement; import com.intellij.packaging.elements.PackagingElementFactory; import com.intellij.packaging.ui.*; -import com.intellij.ui.ColoredTreeCellRenderer; import com.intellij.ui.SimpleTextAttributes; import org.jetbrains.annotations.NotNull; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; /** * @author nik @@ -103,11 +105,6 @@ public class ModuleSourceItemGroup extends PackagingSourceItem { return myModule; } - public void render(@NotNull ColoredTreeCellRenderer renderer) { - renderer.append(myModule.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); - renderer.setIcon(myModule.getModuleType().getNodeIcon(false)); - } - private static class ModuleSourceItemPresentation extends SourceItemPresentation { private final Module myModule; private final ArtifactEditorContext myContext; 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 1fd0900aa4af..435e2ccfcda6 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 @@ -172,10 +172,6 @@ public class LibraryRootsComponent implements Disposable, LibraryEditorComponent Disposer.register(this, myTreeBuilder); } - public Tree getTree() { - return myTree; - } - public JComponent getComponent() { return myPanel; } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableTreeBuilder.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableTreeBuilder.java index ed4e9f365c2d..e7924d2fabeb 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableTreeBuilder.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraryEditor/LibraryTableTreeBuilder.java @@ -50,12 +50,4 @@ class LibraryTableTreeBuilder extends AbstractTreeBuilder { protected ProgressIndicator createProgressIndicator() { return new StatusBarProgress(); } - - public void updateAndSelect(final LibraryTableTreeContentElement element) { - updateFromRootCB().doWhenDone(new Runnable() { - public void run() { - select(element); - } - }); - } } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/GlobalResourcesConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/GlobalResourcesConfigurable.java deleted file mode 100644 index ff65953ddb40..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/GlobalResourcesConfigurable.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2000-2009 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. - */ - -/* - * Created by IntelliJ IDEA. - * User: Anna.Kozlova - * Date: 17-Aug-2006 - * Time: 14:13:02 - */ -package com.intellij.openapi.roots.ui.configuration.projectRoot; - -import com.intellij.openapi.options.ConfigurationException; -import com.intellij.openapi.project.ProjectBundle; -import com.intellij.openapi.ui.NamedConfigurable; -import com.intellij.openapi.ui.PanelWithText; -import com.intellij.openapi.util.IconLoader; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; - -public class GlobalResourcesConfigurable extends NamedConfigurable { - public static final Icon ICON = IconLoader.getIcon("/modules/globalResources.png"); - - public void setDisplayName(final String name) { - //do nothing - } - - @Nullable - public Object getEditableObject() { - return null; - } - - public String getBannerSlogan() { - return ProjectBundle.message("project.roots.global.resources.display.name"); - } - - public JComponent createOptionsPanel() { - return new PanelWithText(ProjectBundle.message("project.roots.global.resources.description")); - } - - public String getDisplayName() { - return ProjectBundle.message("project.roots.global.resources.display.name"); - } - - public Icon getIcon() { - return ICON; - } - - @Nullable - @NonNls - public String getHelpTopic() { - return "preferences.jdkGlobalLibs"; - } - - public boolean isModified() { - return false; - } - - public void apply() throws ConfigurationException { - //do nothing - } - - public void reset() { - //do nothing - } - - public void disposeUIResources() { - //do nothing - } -} \ No newline at end of file diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/HistoryAware.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/HistoryAware.java deleted file mode 100644 index 0430b61bc1d4..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/HistoryAware.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2000-2009 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.projectRoot; - -import com.intellij.openapi.options.Configurable; -import com.intellij.openapi.util.ActionCallback; -import com.intellij.ui.navigation.History; - -public interface HistoryAware { - - - interface Config { - - void setHistoryFacade(Facade facade); - - } - - interface Facade { - - boolean isHistoryNavigatedNow(); - - History getHistory(); - - ActionCallback select(Configurable configurable); - - } - -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/LibrariesContainerFactory.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/LibrariesContainerFactory.java index 97755fdca547..ee501ca47225 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/LibrariesContainerFactory.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/LibrariesContainerFactory.java @@ -63,11 +63,6 @@ public class LibrariesContainerFactory { return new LibrariesContainerImpl(module.getProject(), module, rootModel); } - @NotNull - public static LibrariesContainer createContainer() { - return new LibrariesContainerImpl(null, null, null); - } - public static LibrariesContainer createContainer(StructureConfigurableContext context) { return new StructureConfigurableLibrariesContainer(context); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModulesConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModulesConfigurable.java deleted file mode 100644 index b14141fcf05f..000000000000 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModulesConfigurable.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2000-2009 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. - */ - -/* - * Created by IntelliJ IDEA. - * User: Anna.Kozlova - * Date: 17-Aug-2006 - * Time: 14:10:54 - */ -package com.intellij.openapi.roots.ui.configuration.projectRoot; - -import com.intellij.openapi.module.ModuleManager; -import com.intellij.openapi.options.ConfigurationException; -import com.intellij.openapi.project.ProjectBundle; -import com.intellij.openapi.ui.NamedConfigurable; -import com.intellij.openapi.ui.PanelWithText; -import com.intellij.openapi.util.IconLoader; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; - -public class ModulesConfigurable extends NamedConfigurable { - private static final Icon PROJECT_ICON = IconLoader.getIcon("/modules/modulesNode.png"); - - private final ModuleManager myManager; - - public ModulesConfigurable(ModuleManager manager) { - myManager = manager; - } - - public void setDisplayName(final String name) { - //do nothing - } - - public ModuleManager getEditableObject() { - return myManager; - } - - public String getBannerSlogan() { - return ProjectBundle.message("project.roots.modules.display.name"); - } - - public JComponent createOptionsPanel() { - return new PanelWithText(ProjectBundle.message("project.roots.modules.description")); - } - - public String getDisplayName() { - return ProjectBundle.message("project.roots.modules.display.name"); - } - - public Icon getIcon() { - return PROJECT_ICON; - } - - @Nullable - @NonNls - public String getHelpTopic() { - return "project.structureModulesPage"; - } - - public boolean isModified() { - return false; - } - - public void apply() throws ConfigurationException { - //do nothing - } - - public void reset() { - //do nothing - } - - public void disposeUIResources() { - //do nothing - } -} diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/UsageInModuleClasspath.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/UsageInModuleClasspath.java index c9d170c6e619..30351e7b0215 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/UsageInModuleClasspath.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/UsageInModuleClasspath.java @@ -43,10 +43,6 @@ public class UsageInModuleClasspath extends ProjectStructureElementUsage { return myModule.getName(); } - public String getModuleName() { - return myModule.getName(); - } - @Override public void navigate() { ModulesConfigurator modulesConfigurator = myContext.getModulesConfigurator(); diff --git a/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileInfoSetImpl.java b/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileInfoSetImpl.java index 89546d3db9f3..d86bbe51637a 100644 --- a/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileInfoSetImpl.java +++ b/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileInfoSetImpl.java @@ -41,11 +41,6 @@ public class ConfigFileInfoSetImpl implements ConfigFileInfoSet { private @Nullable ConfigFileContainerImpl myContainer; private final ConfigFileMetaDataProvider myMetaDataProvider; - public ConfigFileInfoSetImpl(final @NotNull ConfigFileContainerImpl container) { - myContainer = container; - myMetaDataProvider = container.getMetaDataProvider(); - } - public ConfigFileInfoSetImpl(final ConfigFileMetaDataProvider metaDataProvider) { myMetaDataProvider = metaDataProvider; } @@ -84,12 +79,6 @@ public class ConfigFileInfoSetImpl implements ConfigFileInfoSet { onChange(); } - @NotNull - public Collection getDescriptors(ConfigFileMetaData metaData) { - final Collection collection = myConfigFiles.get(metaData); - return collection != null ? Collections.unmodifiableCollection(collection) : Collections.emptyList(); - } - @Nullable public ConfigFileInfo getConfigFileInfo(ConfigFileMetaData metaData) { final Collection descriptors = myConfigFiles.get(metaData); diff --git a/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java b/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java index 1c9e484498d3..3326e97fe2f6 100644 --- a/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java +++ b/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java @@ -36,19 +36,11 @@ public class HyperlinksToClassesOption extends PrintOption { private JCheckBox myCbGenerateHyperlinksToClasses; private boolean isGenerateHyperlinksToClasses = false; - public boolean isGenerateHyperlinksToClasses() { - return isGenerateHyperlinksToClasses; - } - - public void setGenerateHyperlinksToClasses(boolean generateHyperlinksToClasses) { - isGenerateHyperlinksToClasses = generateHyperlinksToClasses; - } - @Nullable public TreeMap collectReferences(PsiFile psiFile, Map filesMap) { - if (isGenerateHyperlinksToClasses()) { + if (isGenerateHyperlinksToClasses) { FileType fileType = psiFile.getFileType(); - if(StdFileTypes.JAVA == fileType || StdFileTypes.JSP == fileType) { + if (StdFileTypes.JAVA == fileType || StdFileTypes.JSP == fileType) { final TreeMap refMap = new TreeMap(); findClassReferences(psiFile, refMap, filesMap, psiFile); return refMap; diff --git a/platform/icons/src/modules/globalResources.png b/platform/icons/src/modules/globalResources.png deleted file mode 100644 index 2f9cefeff0b2182d401a81829410e7ad5a145cdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 820 zcmV-41Izr0P)H+0jVH>0AfMY+_rb>FE>;Fs^@39_4v$L zU*10XTU-@JTM4~eeq>5kilIw_7Xt%h1yKECfB<5GYBmB=?Pr(Cdp^0chv6R^v&78u z2(Bw{g!Pf>6Q89Lt(=0+u>AkkaADSGTcDoT00G1Z3Im`4J1?v=?NJaxr{o_`tx;D8TUb{|5$PHZF!#lNAhy_p^WBGE41a&WW?=Xw$S|{I zDMO$*1H<$;X&+$v00Ial8W|WFff|1@FudQ#@c-{ehF`yaF@U`F^XoSTUU374e?Td9 zSq6rGZ_a6q9-@h4{ ze*a})1F~6ve_~(2{{CWM z{{5LjfSrM%^lAPFF)`-3Fg*YPgkk^}ufU1=j`xgz|NH?))_-Q8gMp$#41X9o7``$J y|G)YC_XiCP-uasrH_w6T0SF*QO0zRSfB^tN8Z@dHC=Yf30000 implements Comparator { - private final Comparator myComparator; - - public SwapComparator(final Comparator comparator) { - myComparator = comparator; - } - - public int compare(final V o1, final V o2) { - return myComparator.compare(o2, o1); - } -} diff --git a/platform/lang-impl/src/com/intellij/facet/impl/ui/libraries/LibraryDownloader.java b/platform/lang-impl/src/com/intellij/facet/impl/ui/libraries/LibraryDownloader.java index 33fcfcc6e12a..623b3698f388 100644 --- a/platform/lang-impl/src/com/intellij/facet/impl/ui/libraries/LibraryDownloader.java +++ b/platform/lang-impl/src/com/intellij/facet/impl/ui/libraries/LibraryDownloader.java @@ -17,7 +17,6 @@ package com.intellij.facet.impl.ui.libraries; import com.intellij.facet.ui.libraries.LibraryDownloadInfo; -import com.intellij.facet.ui.libraries.LibraryInfo; import com.intellij.ide.IdeBundle; import com.intellij.openapi.application.PathManager; import com.intellij.openapi.application.Result; @@ -304,15 +303,4 @@ public class LibraryDownloader { } return true; } - - public static LibraryDownloadInfo[] getDownloadingInfos(final LibraryInfo[] libraries) { - List downloadInfos = new ArrayList(); - for (LibraryInfo library : libraries) { - LibraryDownloadInfo downloadInfo = library.getDownloadingInfo(); - if (downloadInfo != null) { - downloadInfos.add(downloadInfo); - } - } - return downloadInfos.toArray(new LibraryDownloadInfo[downloadInfos.size()]); - } } diff --git a/platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/UrlUtil.java b/platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/UrlUtil.java index 48c6c0a204a1..dab6273e9358 100644 --- a/platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/UrlUtil.java +++ b/platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/UrlUtil.java @@ -40,8 +40,6 @@ class UrlUtil { private static final String URL_PATH_SEPARATOR = "/"; private static final String FILE_PROTOCOL = "file"; private static final String FILE_PROTOCOL_PREFIX = FILE_PROTOCOL + ":"; - private static final String JAR_PROTOCOL = "jar"; - private static final String JAR_PROTOCOL_PREFIX = JAR_PROTOCOL + ":"; public static String loadText(URL url) throws IOException { final InputStream stream = new BufferedInputStream(URLUtil.openStream(url)); diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderEntryUtil.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderEntryUtil.java index f1eb679aeacb..61ab227795af 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderEntryUtil.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderEntryUtil.java @@ -58,16 +58,6 @@ public class OrderEntryUtil { return null; } - public static void detachModuleLibrary(@NotNull ModifiableRootModel model, @Nullable OrderEntry entry) { - if (entry == null) { - model.dispose(); - } - else { - model.removeOrderEntry(entry); - model.commit(); - } - } - @Nullable public static ModuleOrderEntry findModuleOrderEntry(@NotNull ModuleRootModel model, @Nullable Module module) { if (module == null) return null; diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderRootsCache.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderRootsCache.java index 821c64f77425..be2c92e84dd9 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderRootsCache.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/OrderRootsCache.java @@ -18,16 +18,13 @@ package com.intellij.openapi.roots.impl; import com.intellij.openapi.Disposable; import com.intellij.openapi.roots.OrderRootType; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.vfs.pointers.VirtualFilePointer; import com.intellij.openapi.vfs.pointers.VirtualFilePointerContainer; import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager; import com.intellij.util.containers.StripedLockConcurrentHashMap; import org.jetbrains.annotations.Nullable; import java.util.Collection; -import java.util.LinkedHashSet; import java.util.Map; -import java.util.Set; /** * @author nik @@ -68,17 +65,6 @@ public class OrderRootsCache { myRoots.clear(); } - public static Set convertPointersToFiles(Set cachedFiles) { - final LinkedHashSet result = new LinkedHashSet(); - for (VirtualFilePointer cachedFile : cachedFiles) { - final VirtualFile virtualFile = cachedFile.getFile(); - if (virtualFile != null) { - result.add(virtualFile); - } - } - return result; - } - private static final class CacheKey { private final OrderRootType myRootType; private int myFlags; diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index 364ee3d3931b..54df223c4182 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -677,9 +677,6 @@ title.directory.does.not.exist=Directory Does Not Exist error.failed.to.create.directory=Failed to create directory \"{0}\" label.select.compiler.output.path=Select c&ompiler output path: title.select.compiler.output.path=Select compiler output path -prompt.single.or.multi.module.project=A functional {0} project must have at least one module. In most cases, one module would be quite enough.\nTo quickly create a single-module project and start working right away, select the \"Create single-module project\" option.\nFor creating a more complex project, with multiple modules, use the \"Create/configure multi-module project\" option. -radio.create.&single.module.project=Create single-module project -radio.create.configure.&multi.module.project=Create/configure multi-module project label.project.name=N&ame: label.component.file.location={0} file &location: label.project.files.location=Project files &location: diff --git a/platform/platform-resources-en/src/messages/ProjectBundle.properties b/platform/platform-resources-en/src/messages/ProjectBundle.properties index 72ffb62ef9c6..fb4f6f4e9645 100644 --- a/platform/platform-resources-en/src/messages/ProjectBundle.properties +++ b/platform/platform-resources-en/src/messages/ProjectBundle.properties @@ -352,16 +352,12 @@ project.roots.module.jdk.problem.message=Module SDK is not defined. project.roots.module.duplicate.name.message=Duplicate module name project.roots.library.problem.message=Classpath entry is invalid: {0} project.roots.project.display.name=Project -project.roots.global.resources.display.name=Global Resources -project.roots.modules.display.name=Modules sdk.configuration.exception=SDK ''{0}'' is invalid. project.roots.project.jdk.inherited=Project SDK add.new.header.text=New add.new.module.text.full=Module project.roots.replace.library.entry.message=Do you really want to replace old library ''{0}'' project.roots.replace.library.entry.title=Library already added -project.roots.global.resources.description=Global resources are referenced through the entire project and can be used from all modules within it.

They are as well available to all other projects created on the local computer.

Global resources include the Global Libraries (sets of classes that add up various functionality to your applications) and JDKs (packages required for writing, debugging and compiling the Java code). -project.roots.modules.description=Module represents the set of files, logically grouped to help organize various parts of your projects.

Each module hosts all the required files: source code, resources and optional descriptors that might be necessary to compile and deploy your application. project.roots.classpath.format.label=Dependencies storage format: project.roots.classpath.format.default.descr=IntelliJ IDEA (.iml) external.annotations.root.chooser.title=Select external annotations root for {0} diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java index 0ec6f21e2c00..58e5c49bf25e 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/common/AbstractValueHint.java @@ -302,10 +302,6 @@ public abstract class AbstractValueHint { } } - protected Point getPoint() { - return myPoint; - } - protected TextRange getCurrentRange() { return myCurrentRange; } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XValueMarkers.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XValueMarkers.java index 56d34dafd6fa..6fb9647d8573 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XValueMarkers.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XValueMarkers.java @@ -69,8 +69,10 @@ public class XValueMarkers { public void unmarkValue(@NotNull XValue value) { //noinspection unchecked - M m = myProvider.getMarker((V)value); + final V v = (V)value; + M m = myProvider.getMarker(v); if (m != null) { + myProvider.unmarkValue(v, m); myMarkers.remove(m); } } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/ValueMarkup.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/ValueMarkup.java index 06a45c48b09b..ab389af9860a 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/ValueMarkup.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/ValueMarkup.java @@ -30,10 +30,6 @@ public class ValueMarkup { @Nullable private final String myToolTipText; - public ValueMarkup(final String text, final Color color) { - this(text, color, null); - } - public ValueMarkup(final String text, final Color color, @Nullable String toolTipText) { myText = text; myColor = color; diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/XDebuggerTreeState.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/XDebuggerTreeState.java index 02b4847feb2d..e3f7463f96bf 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/XDebuggerTreeState.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/XDebuggerTreeState.java @@ -113,10 +113,6 @@ public class XDebuggerTreeState { return myExpanded; } - public String getName() { - return myName; - } - public boolean isSelected() { return mySelected; } @@ -125,11 +121,6 @@ public class XDebuggerTreeState { return myValue; } - @Nullable - public NodeInfo getChild(@NotNull String name) { - return myChidlren != null ? myChidlren.get(name) : null; - } - @Nullable public NodeInfo removeChild(@NotNull String name) { return myChidlren != null ? myChidlren.remove(name) : null; diff --git a/resources-en/src/messages/CompilerBundle.properties b/resources-en/src/messages/CompilerBundle.properties index 154f2e72dc1c..bf3b783ec92d 100644 --- a/resources-en/src/messages/CompilerBundle.properties +++ b/resources-en/src/messages/CompilerBundle.properties @@ -77,7 +77,6 @@ error.annotation.processing.not.supported.for.module.cycles=Annotation processor warning.sources.under.output.paths=Compiler option \"Clear output directory on rebuild\" is currently on.\nHowever, source files may exist in the following output paths:\n{0}\nCompilation will proceed without clearing output directories. action.compiler.properties.text=Compiler Properties actions.exclude.from.compile.text=Exclude from Compile -error.saving.data.to.file=Error storing data to {0}:\n{1} progress.deleting.temp.files=Deleting temp files... progress.checking.dependencies=Checking dependencies... progress.found.dependent.files=Found {0} dependent files diff --git a/resources/src/componentSets/Configurables.xml b/resources/src/componentSets/Configurables.xml index 2dc65706f863..dcd01b8a8a0e 100644 --- a/resources/src/componentSets/Configurables.xml +++ b/resources/src/componentSets/Configurables.xml @@ -1,10 +1,5 @@ - - com.intellij.openapi.roots.ui.configuration.ModuleEditorState - -