diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java index 72e793e53903..2fee50a4301b 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java @@ -1,3 +1,18 @@ +/* + * 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.ide.util.newProjectWizard; import com.intellij.framework.FrameworkOrGroup; @@ -47,7 +62,7 @@ public abstract class FrameworkSupportNodeBase exten } }); for (FrameworkSupportNodeBase node : nodes) { - sortByName(node.children, null); + sortByName((List)node.children, null); } } @@ -68,7 +83,7 @@ public abstract class FrameworkSupportNodeBase exten @NotNull public List getChildren() { - return children != null ? children : Collections.emptyList(); + return children != null ? (List)children : Collections.emptyList(); } public FrameworkSupportNodeBase getParentNode() { diff --git a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java index ba5b40120a32..0cf9bbbbd255 100644 --- a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java @@ -100,7 +100,7 @@ public class JavaDocLocalInspection extends JavaDocLocalInspectionBase { InspectionsBundle.message("inspection.scope.for.title"), true), BorderFactory.createEmptyBorder(0, 3, 3, 3))); - final Hashtable sliderLabels = new Hashtable(); + final Hashtable sliderLabels = new Hashtable(); for (int i = 0; i < modifiers.length; i++) { sliderLabels.put(i + 1, new JLabel(modifiers[i])); } diff --git a/java/java-impl/src/com/intellij/javadoc/JavadocGenerationPanel.java b/java/java-impl/src/com/intellij/javadoc/JavadocGenerationPanel.java index 5cc096016683..d15ce5804170 100644 --- a/java/java-impl/src/com/intellij/javadoc/JavadocGenerationPanel.java +++ b/java/java-impl/src/com/intellij/javadoc/JavadocGenerationPanel.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. @@ -69,7 +69,7 @@ final class JavadocGenerationPanel extends JPanel { ); //noinspection UseOfObsoleteCollectionType - Hashtable labelTable = new Hashtable(); + Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(1), new JLabel(PsiKeyword.PUBLIC)); labelTable.put(new Integer(2), new JLabel(PsiKeyword.PROTECTED)); labelTable.put(new Integer(3), new JLabel(PsiKeyword.PACKAGE)); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/HectorComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/HectorComponent.java index 0483d5a05027..825e72bc98e6 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/HectorComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/HectorComponent.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. @@ -91,7 +91,7 @@ public class HectorComponent extends JPanel { Collections.sort(languages, PsiUtilBase.LANGUAGE_COMPARATOR); for (Language language : languages) { @SuppressWarnings("UseOfObsoleteCollectionType") - final Hashtable sliderLabels = new Hashtable(); + final Hashtable sliderLabels = new Hashtable(); sliderLabels.put(1, new JLabel(EditorBundle.message("hector.none.slider.label"))); sliderLabels.put(2, new JLabel(EditorBundle.message("hector.syntax.slider.label"))); if (notInLibrary) { diff --git a/platform/lang-impl/src/com/intellij/ide/util/MemberChooser.java b/platform/lang-impl/src/com/intellij/ide/util/MemberChooser.java index 80099b35c3d8..fd75f4c65381 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/MemberChooser.java +++ b/platform/lang-impl/src/com/intellij/ide/util/MemberChooser.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. @@ -47,8 +47,6 @@ import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; import java.awt.*; import java.awt.event.*; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import java.util.*; import java.util.List; @@ -536,9 +534,9 @@ public class MemberChooser extends DialogWrapper implemen protected void doSort() { Pair> pair = storeSelection(); - Enumeration children = getRootNodeChildren(); + Enumeration children = getRootNodeChildren(); while (children.hasMoreElements()) { - ParentNode classNode = children.nextElement(); + ParentNode classNode = (ParentNode)children.nextElement(); sortNode(classNode, myComparator); myTreeModel.nodeStructureChanged(classNode); } @@ -548,9 +546,9 @@ public class MemberChooser extends DialogWrapper implemen private static void sortNode(ParentNode node, final Comparator sortComparator) { ArrayList arrayList = new ArrayList(); - Enumeration children = node.children(); + Enumeration children = node.children(); while (children.hasMoreElements()) { - arrayList.add(children.nextElement()); + arrayList.add((MemberNode)children.nextElement()); } Collections.sort(arrayList, sortComparator); @@ -571,16 +569,16 @@ public class MemberChooser extends DialogWrapper implemen DefaultMutableTreeNode root = getRootNode(); if (!myShowClasses || myContainerNodes.isEmpty()) { List otherObjects = new ArrayList(); - Enumeration children = getRootNodeChildren(); + Enumeration children = getRootNodeChildren(); ParentNode newRoot = new ParentNode(null, new MemberChooserObjectBase(getAllContainersNodeName()), new Ref(0)); while (children.hasMoreElements()) { - final ParentNode nextElement = children.nextElement(); + final ParentNode nextElement = (ParentNode)children.nextElement(); if (nextElement instanceof ContainerNode) { final ContainerNode containerNode = (ContainerNode)nextElement; - Enumeration memberNodes = containerNode.children(); + Enumeration memberNodes = containerNode.children(); List memberNodesList = new ArrayList(); while (memberNodes.hasMoreElements()) { - memberNodesList.add(memberNodes.nextElement()); + memberNodesList.add((MemberNode)memberNodes.nextElement()); } for (MemberNode memberNode : memberNodesList) { newRoot.add(memberNode); @@ -595,13 +593,13 @@ public class MemberChooser extends DialogWrapper implemen if (newRoot.children().hasMoreElements()) root.add(newRoot); } else { - Enumeration children = getRootNodeChildren(); + Enumeration children = getRootNodeChildren(); while (children.hasMoreElements()) { - ParentNode allClassesNode = children.nextElement(); - Enumeration memberNodes = allClassesNode.children(); + ParentNode allClassesNode = (ParentNode)children.nextElement(); + Enumeration memberNodes = allClassesNode.children(); ArrayList arrayList = new ArrayList(); while (memberNodes.hasMoreElements()) { - arrayList.add(memberNodes.nextElement()); + arrayList.add((MemberNode)memberNodes.nextElement()); } Collections.sort(arrayList, myComparator); for (MemberNode memberNode : arrayList) { @@ -626,7 +624,7 @@ public class MemberChooser extends DialogWrapper implemen return IdeBundle.message("node.memberchooser.all.classes"); } - private Enumeration getRootNodeChildren() { + private Enumeration getRootNodeChildren() { return getRootNode().children(); } diff --git a/platform/lang-impl/src/com/intellij/ui/DuplicateNodeRenderer.java b/platform/lang-impl/src/com/intellij/ui/DuplicateNodeRenderer.java index 3083ffed6de9..663dccce5ed8 100644 --- a/platform/lang-impl/src/com/intellij/ui/DuplicateNodeRenderer.java +++ b/platform/lang-impl/src/com/intellij/ui/DuplicateNodeRenderer.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. @@ -21,6 +21,7 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import java.awt.*; import java.util.Enumeration; @@ -84,9 +85,9 @@ public class DuplicateNodeRenderer { private static Rectangle getExpandedNodesRect(JTree tree, DefaultMutableTreeNode node, TreePath path) { Rectangle rect = tree.getRowBounds(tree.getRowForPath(path)); if (tree.isExpanded(path)) { - Enumeration children = node.children(); + Enumeration children = node.children(); while (children.hasMoreElements()) { - DefaultMutableTreeNode child = children.nextElement(); + DefaultMutableTreeNode child = (DefaultMutableTreeNode)children.nextElement(); TreePath childPath = path.pathByAddingChild(child); assert !path.equals(childPath) : path+";"+child; rect = union(rect, getExpandedNodesRect(tree, child, childPath)); diff --git a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java index c60ddc44748d..cc6e16aba6c2 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.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. @@ -70,7 +70,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab myComponent.myLafComboBox.setModel(new DefaultComboBoxModel(LafManager.getInstance().getInstalledLookAndFeels())); myComponent.myLafComboBox.setRenderer(new LafComboBoxRenderer()); - Dictionary delayDictionary = new Hashtable(); + Dictionary delayDictionary = new Hashtable(); delayDictionary.put(new Integer(0), new JLabel("0")); delayDictionary.put(new Integer(1200), new JLabel("1200")); //delayDictionary.put(new Integer(2400), new JLabel("2400")); @@ -94,7 +94,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab myComponent.myAlphaModeRatioSlider.setSize(100, 50); @SuppressWarnings({"UseOfObsoleteCollectionType"}) - Dictionary dictionary = new Hashtable(); + Dictionary dictionary = new Hashtable(); dictionary.put(new Integer(0), new JLabel("0%")); dictionary.put(new Integer(50), new JLabel("50%")); dictionary.put(new Integer(100), new JLabel("100%")); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesFragmentedDiffPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesFragmentedDiffPanel.java index 025795eb08ed..731634b85080 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesFragmentedDiffPanel.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesFragmentedDiffPanel.java @@ -549,7 +549,7 @@ public class ChangesFragmentedDiffPanel implements Disposable { } private static final int[] ourMarks = {1,2,4,8,-1}; - public static final Hashtable LABELS = new Hashtable(); + public static final Hashtable LABELS = new Hashtable(); public static final int ALL_VALUE = 5; static {