|
From: <mir...@us...> - 2007-01-16 16:37:43
|
Revision: 1779
http://svn.sourceforge.net/rubyeclipse/?rev=1779&view=rev
Author: mirkostocker
Date: 2007-01-16 08:37:33 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
fixed the last test that failed on my machine -> greenbar!, and also fixed some warnings
Modified Paths:
--------------
trunk/org.kxml2/src/org/xmlpull/v1/XmlPullParserException.java
trunk/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/runtime/ShamException.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyCodeAnalyzer.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchAlgorithm.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchCollector.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Scope.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/TypeInferenceVisitor.java
trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/core/tests/AbstractRubyModelTest.java
trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_RubyCodeAnalyzer.java
trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser/ShamNode.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
Modified: trunk/org.kxml2/src/org/xmlpull/v1/XmlPullParserException.java
===================================================================
--- trunk/org.kxml2/src/org/xmlpull/v1/XmlPullParserException.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.kxml2/src/org/xmlpull/v1/XmlPullParserException.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -9,7 +9,8 @@
* @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
*/
public class XmlPullParserException extends Exception {
- protected Throwable detail;
+ private static final long serialVersionUID = 3614579343866398020L;
+ protected Throwable detail;
protected int row = -1;
protected int column = -1;
Modified: trunk/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/runtime/ShamException.java
===================================================================
--- trunk/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/runtime/ShamException.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/runtime/ShamException.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -1,4 +1,5 @@
package org.rubypeople.eclipse.shams.runtime;
public class ShamException extends RuntimeException {
+ private static final long serialVersionUID = 7478278783815573476L;
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -697,7 +697,7 @@
* @return the single instance of the Ruby core plug-in runtime class
*/
public static RubyCore getRubyCore() {
- return (RubyCore) getPlugin();
+ return getPlugin();
}
public static boolean isRubyLikeFileName(String name) {
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -68,7 +68,7 @@
StringBuffer prefix = new StringBuffer();
boolean isMethod = false;
for (int i = offset; i >= 0; i--) {
- char curChar = (char) source.charAt(i);
+ char curChar = source.charAt(i);
if (curChar == '.') {
isMethod = true;
if (offset == i) { // if it's the first character we looked at,
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -950,7 +950,7 @@
// Merge newly found module name(s)
if ( importedModuleNames != null ) {
- mergedModuleNames.addAll( (List<String>)(Arrays.asList( importedModuleNames )));
+ mergedModuleNames.addAll( (Arrays.asList( importedModuleNames )));
}
mergedModuleNames.addAll( mixins );
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyCodeAnalyzer.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyCodeAnalyzer.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyCodeAnalyzer.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -32,7 +32,7 @@
private final IndexUpdater indexUpdater;
public RubyCodeAnalyzer(IMarkerManager markerManager) {
- this(markerManager, new RubyParser(new ImmediateWarnings(markerManager)), new IndexUpdater(((RubyCore) RubyCore.getPlugin()).getSymbolIndex()));
+ this(markerManager, new RubyParser(new ImmediateWarnings(markerManager)), new IndexUpdater((RubyCore.getPlugin()).getSymbolIndex()));
}
public RubyCodeAnalyzer(IMarkerManager markerManager, RubyParser parser, IndexUpdater indexUpdater) {
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchAlgorithm.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchAlgorithm.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchAlgorithm.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -72,9 +72,9 @@
matches = matchCollector.getMatches();
matchCollector = null;
for (Iterator<Match> i = matches.iterator(); i.hasNext();) {
- Match match = (Match) i.next();
+ Match match = i.next();
for (Iterator<TokenEntry> occurrences = match.iterator(); occurrences.hasNext();) {
- TokenEntry mark = (TokenEntry) occurrences.next();
+ TokenEntry mark = occurrences.next();
match.setLineCount(tokens.getLineCount(mark, match));
if (!occurrences.hasNext()) {
int start = mark.getBeginLine();
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchCollector.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchCollector.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/pmd/MatchCollector.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -56,12 +56,12 @@
Set<Match.MatchCode> matchSet = new HashSet<Match.MatchCode>();
Match.MatchCode matchCode = new Match.MatchCode();
for (int i = matchList.size(); i > 1; i--) {
- Match match1 = (Match) matchList.get(i - 1);
- TokenEntry mark1 = (TokenEntry) match1.getMarkSet().iterator().next();
+ Match match1 = matchList.get(i - 1);
+ TokenEntry mark1 = match1.getMarkSet().iterator().next();
matchSet.clear();
matchSet.add(match1.getMatchCode());
for (int j = i - 1; j > 0; j--) {
- Match match2 = (Match) matchList.get(j - 1);
+ Match match2 = matchList.get(j - 1);
if (match1.getTokenCount() != match2.getTokenCount()) {
break;
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -53,7 +53,7 @@
arguments.add(restName);
}
if (hasBlock)
- arguments.add("&" + (String) bodyNode.getVariables()[args.getBlockArgNode().getCount()]);
+ arguments.add("&" + bodyNode.getVariables()[args.getBlockArgNode().getCount()]);
return stringListToArray(arguments);
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Scope.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Scope.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/Scope.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -20,6 +20,7 @@
*/
public class Scope extends LinkedList<Scope> {
+ private static final long serialVersionUID = -575610283102921342L;
private List<Variable> variables;
private List<Scope> childScopes;
private Scope parentScope;
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/TypeInferenceVisitor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/TypeInferenceVisitor.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/TypeInferenceVisitor.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -156,22 +156,6 @@
}
/**
- * Returns the closest Class scope. Used to insert ClassVarDeclNode
- * references.
- *
- * @return closest encompassing ClassScope, or null if there is not one.
- */
- private Scope getNearestClassScope()
- {
- Scope recursiveScope = currentScope;
- while ( !(recursiveScope.getNode() instanceof ClassNode ) )
- {
- recursiveScope = recursiveScope.getParentScope();
- }
- return null;
- }
-
- /**
* Local assignment may provide a concrete type from the rvalue
*/
public Instruction visitLocalAsgnNode(LocalAsgnNode iVisited) {
Modified: trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/core/tests/AbstractRubyModelTest.java
===================================================================
--- trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/core/tests/AbstractRubyModelTest.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/core/tests/AbstractRubyModelTest.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -667,7 +667,7 @@
}
protected IRubyScript getRubyScript(String path) {
- return (IRubyScript)RubyCore.create(getFile(path));
+ return RubyCore.create(getFile(path));
}
public static void waitUntilIndexesReady() {
Modified: trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_RubyCodeAnalyzer.java
===================================================================
--- trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_RubyCodeAnalyzer.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_RubyCodeAnalyzer.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -37,7 +37,9 @@
file.setContents(FILE_CONTENTS);
rootNode = new Node(null, 0) {
- public Instruction accept(NodeVisitor visitor) {
+ private static final long serialVersionUID = 9089679642764992140L;
+
+ public Instruction accept(NodeVisitor visitor) {
return null;
}
Modified: trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser/ShamNode.java
===================================================================
--- trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser/ShamNode.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser/ShamNode.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -18,7 +18,9 @@
public class ShamNode extends Node {
- public ShamNode() {
+ private static final long serialVersionUID = 9194640230446025694L;
+
+ public ShamNode() {
super(null, 0);
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyRuntime.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -159,7 +159,7 @@
public void addInstalledInterpreter(IInterpreter anInterpreter) {
getInstalledInterpreters().add(anInterpreter);
if (getInstalledInterpreters().size() == 1)
- setSelectedInterpreter((RubyInterpreter) getInstalledInterpreters().get(0));
+ setSelectedInterpreter(getInstalledInterpreters().get(0));
else
saveRuntimeConfiguration();
}
@@ -533,17 +533,17 @@
String vmType = element.getAttribute("vmInstallType"); //$NON-NLS-1$
if (vmType == null) {
abort(MessageFormat.format("Missing required vmInstallType attribute for vmInstall contributed by {0}", //$NON-NLS-1$
- new String[]{element.getContributor().getName()}), null);
+ (Object[]) new String[]{element.getContributor().getName()}), null);
}
String id = element.getAttribute("id"); //$NON-NLS-1$
if (id == null) {
abort(MessageFormat.format("Missing required id attribute for vmInstall contributed by {0}", //$NON-NLS-1$
- new String[]{element.getContributor().getName()}), null);
+ (Object[]) new String[]{element.getContributor().getName()}), null);
}
IInterpreterInstallType installType = getInterpreterInstallType(vmType);
if (installType == null) {
abort(MessageFormat.format("vmInstall {0} contributed by {1} references undefined VM install type {2}", //$NON-NLS-1$
- new String[]{id, element.getContributor().getName(), vmType}), null);
+ (Object[]) new String[]{id, element.getContributor().getName(), vmType}), null);
}
IInterpreter install = installType.findInterpreterInstall(id);
if (install == null) {
@@ -551,12 +551,12 @@
String name = element.getAttribute("name"); //$NON-NLS-1$
if (name == null) {
abort(MessageFormat.format("vmInstall {0} contributed by {1} missing required attribute name", //$NON-NLS-1$
- new String[]{id, element.getContributor().getName()}), null);
+ (Object[]) new String[]{id, element.getContributor().getName()}), null);
}
String home = element.getAttribute("home"); //$NON-NLS-1$
if (home == null) {
abort(MessageFormat.format("vmInstall {0} contributed by {1} missing required attribute home", //$NON-NLS-1$
- new String[]{id, element.getContributor().getName()}), null);
+ (Object[]) new String[]{id, element.getContributor().getName()}), null);
}
String vmArgs = element.getAttribute("vmArgs"); //$NON-NLS-1$
VMStandin standin = new VMStandin(installType, id);
@@ -574,7 +574,7 @@
IStatus status = installType.validateInstallLocation(homeDir);
if (!status.isOK()) {
abort(MessageFormat.format("Illegal install location {0} for vmInstall {1} contributed by {2}: {3}", //$NON-NLS-1$
- new String[]{home, id, element.getContributor().getName(), status.getMessage()}), null);
+ (Object[]) new String[]{home, id, element.getContributor().getName(), status.getMessage()}), null);
}
standin.setInstallLocation(homeDir);
if (vmArgs != null) {
@@ -589,7 +589,7 @@
String libPathStr = library.getAttribute("path"); //$NON-NLS-1$
if (libPathStr == null) {
abort(MessageFormat.format("library for vmInstall {0} contributed by {1} missing required attribute libPath", //$NON-NLS-1$
- new String[]{id, element.getContributor().getName()}), null);
+ (Object[]) new String[]{id, element.getContributor().getName()}), null);
}
IPath homePath = new Path(home);
@@ -603,7 +603,7 @@
fgContributedVMs.add(id);
} else {
abort(MessageFormat.format("Illegal element {0} in vmInstalls extension contributed by {1}", //$NON-NLS-1$
- new String[]{element.getName(), element.getContributor().getName()}), null);
+ (Object[]) new String[]{element.getName(), element.getContributor().getName()}), null);
}
} catch (CoreException e) {
RdtLaunchingPlugin.log(e);
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-01-16 15:30:53 UTC (rev 1778)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-01-16 16:37:33 UTC (rev 1779)
@@ -51,11 +51,11 @@
ShamRubyRuntime runtime = new ShamRubyRuntime();
- IInterpreter interpreterOne = new RubyInterpreter("InterpreterOne", new File("C:/RubyInstallRootOne"));
+ IInterpreter interpreterOne = new RubyInterpreter("InterpreterOne", new File("C:\\RubyInstallRootOne"));
runtime.setInstalledInterpreters(Arrays.asList(new IInterpreter[] { interpreterOne }));
assertEquals("XML should indicate only one interpreter with it being the selected.", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:\\RubyInstallRootOne\" selected=\"true\"/></runtimeconfig>", runtimeConfigurationWriter.toString());
- RubyInterpreter interpreterTwo = new RubyInterpreter("InterpreterTwo", new File("C:/RubyInstallRootTwo"));
+ RubyInterpreter interpreterTwo = new RubyInterpreter("InterpreterTwo", new File("C:\\RubyInstallRootTwo"));
runtime.setInstalledInterpreters(Arrays.asList(new IInterpreter[] { interpreterOne, interpreterTwo }));
assertEquals("XML should indicate both interpreters with the first one being selected.", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:\\RubyInstallRootOne\" selected=\"true\"/><interpreter name=\"InterpreterTwo\" path=\"C:\\RubyInstallRootTwo\"/></runtimeconfig>", runtimeConfigurationWriter.toString());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|