|
From: <caw...@us...> - 2007-02-28 13:54:09
|
Revision: 2059
http://svn.sourceforge.net/rubyeclipse/?rev=2059&view=rev
Author: cawilliams
Date: 2007-02-28 05:54:01 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
clean up type safety warnings
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestHierarchyTab.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestUnitView.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestunitPlugin.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/RubyClassSelector.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestSearchEngine.java
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestHierarchyTab.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestHierarchyTab.java 2007-02-28 13:42:58 UTC (rev 2058)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestHierarchyTab.java 2007-02-28 13:54:01 UTC (rev 2059)
@@ -81,11 +81,11 @@
/**
* Vector of SuiteInfo items
*/
- private Vector fSuiteInfos = new Vector();
+ private Vector<SuiteInfo> fSuiteInfos = new Vector<SuiteInfo>();
/**
* Maps test Ids to TreeItems.
*/
- private Map fTreeItemMap = new HashMap();
+ private Map<String, TreeItem> fTreeItemMap = new HashMap<String, TreeItem>();
private TestUnitView fTestRunnerPart;
@@ -209,7 +209,7 @@
}
private void updatePath(TreeItem parent) {
- List newPath = new ArrayList();
+ List<TreeItem> newPath = new ArrayList<TreeItem>();
while (parent != null) {
newPath.add(parent);
parent = parent.getParentItem();
@@ -367,7 +367,7 @@
public void aboutToStart() {
fTree.removeAll();
fSuiteInfos.removeAllElements();
- fTreeItemMap = new HashMap();
+ fTreeItemMap = new HashMap<String, TreeItem>();
fCachedParent = null;
fCachedItems = null;
fMoveSelection = false;
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestUnitView.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestUnitView.java 2007-02-28 13:42:58 UTC (rev 2058)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestUnitView.java 2007-02-28 13:54:01 UTC (rev 2059)
@@ -84,12 +84,12 @@
/**
* The collection of ITestRunTabs
*/
- protected Vector fTestRunTabs = new Vector();
+ protected Vector<TestRunTab> fTestRunTabs = new Vector<TestRunTab>();
/**
* Map storing TestInfos for each executed test keyed by the test name.
*/
- private Map fTestInfos = new HashMap();
+ private Map<String, TestRunInfo> fTestInfos = new HashMap<String, TestRunInfo>();
/**
* Is the UI disposed
@@ -132,7 +132,7 @@
* The first failure of a test run. Used to reveal the first failed tests at
* the end of a run.
*/
- private List fFailures = new ArrayList();
+ private List<TestRunInfo> fFailures = new ArrayList<TestRunInfo>();
protected boolean fShowOnErrorOnly = false;
@@ -561,7 +561,7 @@
fTestCount = testCount;
aboutToStart();
fTestInfos.clear();
- fFailures = new ArrayList();
+ fFailures = new ArrayList<TestRunInfo>();
}
protected void start(final int total) {
@@ -802,8 +802,7 @@
* @see ITestRunListener#testRunStopped
*/
public void testRunStopped(final long elapsedTime) {
- String msg = TestUnitMessages.TestRunnerViewPart_message_stopped;
- setInfoMessage(msg);
+ setInfoMessage(TestUnitMessages.TestRunnerViewPart_message_stopped);
handleStopped();
}
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestunitPlugin.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestunitPlugin.java 2007-02-28 13:42:58 UTC (rev 2058)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/TestunitPlugin.java 2007-02-28 13:54:01 UTC (rev 2059)
@@ -48,7 +48,7 @@
* TestRunner once to a launch. Once a test runner is connected it is
* removed from the set.
*/
- private AbstractSet fTrackedLaunches = new HashSet(20);
+ private AbstractSet<ILaunch> fTrackedLaunches = new HashSet<ILaunch>(20);
private static URL fgIconBaseURL;
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/RubyClassSelector.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/RubyClassSelector.java 2007-02-28 13:42:58 UTC (rev 2058)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/RubyClassSelector.java 2007-02-28 13:54:01 UTC (rev 2059)
@@ -138,7 +138,7 @@
* @return
*/
private IRubyElement[] getAllTypes() {
- List typeList = new ArrayList();
+ List<IRubyElement> typeList = new ArrayList<IRubyElement>();
IProject[] projects = RubyCore.getRubyProjects();
for (int i = 0; i < projects.length; i++) {
IRubyElement[] types = TestSearchEngine.findTests(projects[i]);
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestSearchEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestSearchEngine.java 2007-02-28 13:42:58 UTC (rev 2058)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestSearchEngine.java 2007-02-28 13:54:01 UTC (rev 2059)
@@ -49,9 +49,9 @@
try {
script.reconcile();
IRubyElement[] children = script.getChildren();
- List types = new ArrayList();
+ List<IRubyElement> types = new ArrayList<IRubyElement>();
for (int i = 0; i < children.length; i++) {
- if (children[i].isType(IRubyElement.TYPE) ) types.add(children[i]);
+ if (children[i].isType(IRubyElement.TYPE)) types.add(children[i]);
}
IRubyElement[] array = new IRubyElement[types.size()];
System.arraycopy(types.toArray(), 0, array, 0, types.size());
@@ -68,7 +68,7 @@
public static IRubyElement[] findTests(IProject rubyProject) {
if (rubyProject == null) { return new IRubyElement[0]; }
try {
- List tests = new ArrayList();
+ List<IRubyElement> tests = new ArrayList<IRubyElement>();
RubyElementVisitor visitor = new RubyElementVisitor();
rubyProject.accept(visitor);
Object[] rubyFiles = visitor.getCollectedRubyFiles();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|