mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
1.9 compilable
This commit is contained in:
+17
-2
@@ -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<T extends FrameworkOrGroup> exten
|
||||
}
|
||||
});
|
||||
for (FrameworkSupportNodeBase node : nodes) {
|
||||
sortByName(node.children, null);
|
||||
sortByName((List)node.children, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +83,7 @@ public abstract class FrameworkSupportNodeBase<T extends FrameworkOrGroup> exten
|
||||
|
||||
@NotNull
|
||||
public List<FrameworkSupportNodeBase> getChildren() {
|
||||
return children != null ? children : Collections.<FrameworkSupportNodeBase>emptyList();
|
||||
return children != null ? (List)children : Collections.<FrameworkSupportNodeBase>emptyList();
|
||||
}
|
||||
|
||||
public FrameworkSupportNodeBase getParentNode() {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class JavaDocLocalInspection extends JavaDocLocalInspectionBase {
|
||||
InspectionsBundle.message("inspection.scope.for.title"), true),
|
||||
BorderFactory.createEmptyBorder(0, 3, 3, 3)));
|
||||
|
||||
final Hashtable<Integer, JLabel> sliderLabels = new Hashtable<Integer, JLabel>();
|
||||
final Hashtable<Integer, JComponent> sliderLabels = new Hashtable<Integer, JComponent>();
|
||||
for (int i = 0; i < modifiers.length; i++) {
|
||||
sliderLabels.put(i + 1, new JLabel(modifiers[i]));
|
||||
}
|
||||
|
||||
@@ -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<Integer, JLabel> labelTable = new Hashtable<Integer, JLabel>();
|
||||
Hashtable<Integer, JComponent> labelTable = new Hashtable<Integer, JComponent>();
|
||||
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));
|
||||
|
||||
@@ -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<Integer, JLabel> sliderLabels = new Hashtable<Integer, JLabel>();
|
||||
final Hashtable<Integer, JComponent> sliderLabels = new Hashtable<Integer, JComponent>();
|
||||
sliderLabels.put(1, new JLabel(EditorBundle.message("hector.none.slider.label")));
|
||||
sliderLabels.put(2, new JLabel(EditorBundle.message("hector.syntax.slider.label")));
|
||||
if (notInLibrary) {
|
||||
|
||||
@@ -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<T extends ClassMember> extends DialogWrapper implemen
|
||||
protected void doSort() {
|
||||
Pair<ElementNode, List<ElementNode>> pair = storeSelection();
|
||||
|
||||
Enumeration<ParentNode> children = getRootNodeChildren();
|
||||
Enumeration<TreeNode> 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<T extends ClassMember> extends DialogWrapper implemen
|
||||
|
||||
private static void sortNode(ParentNode node, final Comparator<ElementNode> sortComparator) {
|
||||
ArrayList<MemberNode> arrayList = new ArrayList<MemberNode>();
|
||||
Enumeration<MemberNode> children = node.children();
|
||||
Enumeration<TreeNode> 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<T extends ClassMember> extends DialogWrapper implemen
|
||||
DefaultMutableTreeNode root = getRootNode();
|
||||
if (!myShowClasses || myContainerNodes.isEmpty()) {
|
||||
List<ParentNode> otherObjects = new ArrayList<ParentNode>();
|
||||
Enumeration<ParentNode> children = getRootNodeChildren();
|
||||
Enumeration<TreeNode> children = getRootNodeChildren();
|
||||
ParentNode newRoot = new ParentNode(null, new MemberChooserObjectBase(getAllContainersNodeName()), new Ref<Integer>(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<MemberNode> memberNodes = containerNode.children();
|
||||
Enumeration<TreeNode> memberNodes = containerNode.children();
|
||||
List<MemberNode> memberNodesList = new ArrayList<MemberNode>();
|
||||
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<T extends ClassMember> extends DialogWrapper implemen
|
||||
if (newRoot.children().hasMoreElements()) root.add(newRoot);
|
||||
}
|
||||
else {
|
||||
Enumeration<ParentNode> children = getRootNodeChildren();
|
||||
Enumeration<TreeNode> children = getRootNodeChildren();
|
||||
while (children.hasMoreElements()) {
|
||||
ParentNode allClassesNode = children.nextElement();
|
||||
Enumeration<MemberNode> memberNodes = allClassesNode.children();
|
||||
ParentNode allClassesNode = (ParentNode)children.nextElement();
|
||||
Enumeration<TreeNode> memberNodes = allClassesNode.children();
|
||||
ArrayList<MemberNode> arrayList = new ArrayList<MemberNode>();
|
||||
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<T extends ClassMember> extends DialogWrapper implemen
|
||||
return IdeBundle.message("node.memberchooser.all.classes");
|
||||
}
|
||||
|
||||
private Enumeration<ParentNode> getRootNodeChildren() {
|
||||
private Enumeration<TreeNode> getRootNodeChildren() {
|
||||
return getRootNode().children();
|
||||
}
|
||||
|
||||
|
||||
@@ -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<DefaultMutableTreeNode> children = node.children();
|
||||
Enumeration<TreeNode> 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));
|
||||
|
||||
@@ -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<Integer, JLabel> delayDictionary = new Hashtable<Integer, JLabel>();
|
||||
Dictionary<Integer, JComponent> delayDictionary = new Hashtable<Integer, JComponent>();
|
||||
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<Integer, JLabel> dictionary = new Hashtable<Integer, JLabel>();
|
||||
Dictionary<Integer, JComponent> dictionary = new Hashtable<Integer, JComponent>();
|
||||
dictionary.put(new Integer(0), new JLabel("0%"));
|
||||
dictionary.put(new Integer(50), new JLabel("50%"));
|
||||
dictionary.put(new Integer(100), new JLabel("100%"));
|
||||
|
||||
+1
-1
@@ -549,7 +549,7 @@ public class ChangesFragmentedDiffPanel implements Disposable {
|
||||
}
|
||||
|
||||
private static final int[] ourMarks = {1,2,4,8,-1};
|
||||
public static final Hashtable<Integer,JLabel> LABELS = new Hashtable<Integer, JLabel>();
|
||||
public static final Hashtable<Integer, JComponent> LABELS = new Hashtable<Integer, JComponent>();
|
||||
public static final int ALL_VALUE = 5;
|
||||
|
||||
static {
|
||||
|
||||
Reference in New Issue
Block a user