You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(41) |
Apr
(9) |
May
|
Jun
|
Jul
(39) |
Aug
(38) |
Sep
(135) |
Oct
(220) |
Nov
(75) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(44) |
Feb
(160) |
Mar
(49) |
Apr
(69) |
May
(40) |
Jun
(52) |
Jul
(47) |
Aug
(51) |
Sep
(19) |
Oct
(22) |
Nov
(36) |
Dec
(76) |
| 2007 |
Jan
(154) |
Feb
(165) |
Mar
(186) |
Apr
(143) |
May
(175) |
Jun
(133) |
Jul
(203) |
Aug
(177) |
Sep
(136) |
Oct
|
Nov
|
Dec
|
|
From: <caw...@us...> - 2007-05-31 16:19:15
|
Revision: 2572
http://svn.sourceforge.net/rubyeclipse/?rev=2572&view=rev
Author: cawilliams
Date: 2007-05-31 09:19:03 -0700 (Thu, 31 May 2007)
Log Message:
-----------
implement 'or' locator
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/OrLocator.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/OrLocator.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/OrLocator.java 2007-05-31 14:29:58 UTC (rev 2571)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/OrLocator.java 2007-05-31 16:19:03 UTC (rev 2572)
@@ -30,20 +30,9 @@
@Override
public void reportMatches(RubyScript script, MatchLocator locator) {
-// PatternLocator closestPattern = null;
-// int level = IMPOSSIBLE_MATCH;
-// for (int i = 0, length = this.patternLocators.length; i < length; i++) {
-// PatternLocator patternLocator = this.patternLocators[i];
-// int newLevel = patternLocator.referenceType() == 0 ? IMPOSSIBLE_MATCH
-// : patternLocator.resolveLevel(reference);
-// if (newLevel > level) {
-// closestPattern = patternLocator;
-// if (newLevel == ACCURATE_MATCH)
-// break;
-// level = newLevel;
-// }
-// }
-// if (closestPattern != null)
-// closestPattern.matchReportReference(reference, element, elementBinding, accuracy, locator);
+ for (int i = 0, length = this.patternLocators.length; i < length; i++) {
+ PatternLocator patternLocator = this.patternLocators[i];
+ patternLocator.reportMatches(script, locator);
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 14:29:59
|
Revision: 2571
http://svn.sourceforge.net/rubyeclipse/?rev=2571&view=rev
Author: cawilliams
Date: 2007-05-31 07:29:58 -0700 (Thu, 31 May 2007)
Log Message:
-----------
if comments/docs have a preceding whitespace indentation, strip common indent off beginnign of all lines (otherwise RDoc will interpret everything as pre-formatted text)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-31 13:52:50 UTC (rev 2570)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-31 14:29:58 UTC (rev 2571)
@@ -116,6 +116,7 @@
public static String getHTMLDocumentation(String docs) {
if (docs == null) return null;
+ docs = removeUnecessaryIndent(docs);
String script = "require 'rdoc/markup/simple_markup'\n" +
"require 'rdoc/markup/simple_markup/to_html'\n" +
"p = SM::SimpleMarkup.new\n" +
@@ -135,6 +136,33 @@
return docs;
}
+ private static String removeUnecessaryIndent(String docs) {
+ int count = 0;
+ String[] lines = docs.split("\n");
+ if (lines == null || lines.length == 0) return docs;
+ String tmp = lines[0];
+ if (tmp != null && tmp.length() > 0) {
+ while(tmp.charAt(0) == ' ') {
+ count++;
+ if (tmp.length() == 1) break;
+ tmp = tmp.substring(1);
+ }
+ }
+ StringBuffer modified = new StringBuffer();
+ for (int i = 0; i < lines.length; i++) {
+ String line = lines[i];
+ if (line.length() > count) {
+ if (line.substring(0, count).trim().length() == 0) {
+ line = line.substring(count);
+ }
+ }
+ modified.append(line);
+ modified.append("\n");
+ }
+ modified.deleteCharAt(modified.length() - 1); // remove last newline
+ return modified.toString();
+ }
+
private static Ruby getJRubyInstance() {
if (fgRuby == null)
fgRuby = Ruby.getDefaultInstance();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:52:51
|
Revision: 2570
http://svn.sourceforge.net/rubyeclipse/?rev=2570&view=rev
Author: cawilliams
Date: 2007-05-31 06:52:50 -0700 (Thu, 31 May 2007)
Log Message:
-----------
fix F3 - Go to Declaration on external ruby scripts
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java 2007-05-31 13:41:24 UTC (rev 2569)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectionConverter.java 2007-05-31 13:52:50 UTC (rev 2570)
@@ -9,6 +9,7 @@
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.corext.util.RubyModelUtil;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.internal.ui.rubyeditor.IRubyScriptEditorInput;
import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
import org.rubypeople.rdt.ui.IWorkingCopyManager;
@@ -23,9 +24,13 @@
}
public static IRubyElement getInput(RubyEditor editor) {
- if (editor == null)
+ if (editor == null)
return null;
IEditorInput input= editor.getEditorInput();
+ if (input instanceof IRubyScriptEditorInput) {
+ IRubyScriptEditorInput scriptEditor = (IRubyScriptEditorInput) input;
+ return scriptEditor.getRubyScript();
+ }
IWorkingCopyManager manager= RubyPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(input);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:41:25
|
Revision: 2569
http://svn.sourceforge.net/rubyeclipse/?rev=2569&view=rev
Author: cawilliams
Date: 2007-05-31 06:41:24 -0700 (Thu, 31 May 2007)
Log Message:
-----------
be more careful to avoid ClassCastExceptions
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-05-31 13:38:43 UTC (rev 2568)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-05-31 13:41:24 UTC (rev 2569)
@@ -9,6 +9,7 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPartitioningException;
+import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension3;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
@@ -47,12 +48,15 @@
}
}
try {
- IDocumentExtension3 extension = (IDocumentExtension3)textViewer.getDocument();
+ IDocument doc = textViewer.getDocument();
String contentType = null;
- try {
- contentType = extension.getContentType(IRubyPartitions.RUBY_PARTITIONING, hoverRegion.getOffset(), false);
- } catch (BadPartitioningException e) {
- // ignore
+ if (doc instanceof IDocumentExtension3) {
+ IDocumentExtension3 extension = (IDocumentExtension3) doc;
+ try {
+ contentType = extension.getContentType(IRubyPartitions.RUBY_PARTITIONING, hoverRegion.getOffset(), false);
+ } catch (BadPartitioningException e) {
+ // ignore
+ }
}
if (contentType != null && (contentType.equals(IRubyPartitions.RUBY_MULTI_LINE_COMMENT) || contentType.equals(IRubyPartitions.RUBY_SINGLE_LINE_COMMENT))) {
return null;
@@ -68,6 +72,7 @@
private String getRIResult(String symbol) {
+ if (symbol == null || symbol.trim().length() == 0) return null;
File ri = RubyRuntime.getRI();
if (ri == null || !ri.exists() || !ri.isFile()) return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:38:46
|
Revision: 2568
http://svn.sourceforge.net/rubyeclipse/?rev=2568&view=rev
Author: cawilliams
Date: 2007-05-31 06:38:43 -0700 (Thu, 31 May 2007)
Log Message:
-----------
modify to try to resolve the code first and grab a suitable name, then if that fails just grab text and pass it to RI. Also avoid running RI for hovers in non-code regions (comments) or for text that will obviously fail (variables and symbols)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-05-31 13:37:17 UTC (rev 2567)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/RiDocHoverProvider.java 2007-05-31 13:38:43 UTC (rev 2568)
@@ -8,15 +8,66 @@
import java.util.List;
import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPartitioningException;
+import org.eclipse.jface.text.IDocumentExtension3;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
+import org.rubypeople.rdt.core.ICodeAssist;
+import org.rubypeople.rdt.core.IMethod;
+import org.rubypeople.rdt.core.IRubyElement;
+import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.internal.ui.text.IRubyPartitions;
import org.rubypeople.rdt.launching.RubyRuntime;
public class RiDocHoverProvider extends AbstractRubyEditorTextHover {
- @Override
+ /*
+ * @see ITextHover#getHoverInfo(ITextViewer, IRegion)
+ */
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+
+ /*
+ * The region should be a word region an not of length 0.
+ * This check is needed because codeSelect(...) also finds
+ * the Ruby element if the offset is behind the word.
+ */
+ if (hoverRegion.getLength() == 0)
+ return null;
+
+ ICodeAssist resolve= getCodeAssist();
+ if (resolve != null) {
+ try {
+ IRubyElement[] result= resolve.codeSelect(hoverRegion.getOffset(), hoverRegion.getLength());
+ if (result != null && result.length > 0) {
+ return getHoverInfo(result);
+ }
+ } catch (RubyModelException x) {
+ return null;
+ }
+ }
+ try {
+ IDocumentExtension3 extension = (IDocumentExtension3)textViewer.getDocument();
+ String contentType = null;
+ try {
+ contentType = extension.getContentType(IRubyPartitions.RUBY_PARTITIONING, hoverRegion.getOffset(), false);
+ } catch (BadPartitioningException e) {
+ // ignore
+ }
+ if (contentType != null && (contentType.equals(IRubyPartitions.RUBY_MULTI_LINE_COMMENT) || contentType.equals(IRubyPartitions.RUBY_SINGLE_LINE_COMMENT))) {
+ return null;
+ }
+ String symbol = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
+ if (symbol != null && (symbol.startsWith("@") || symbol.startsWith("$") || symbol.startsWith(":"))) return null; // don't try class/instance/global variables or symbols
+ return getRIResult(symbol);
+ } catch (BadLocationException e) {
+ // ignore
+ }
+ return null;
+ }
+
+
+ private String getRIResult(String symbol) {
File ri = RubyRuntime.getRI();
if (ri == null || !ri.exists() || !ri.isFile()) return null;
@@ -29,8 +80,7 @@
BufferedReader br = null;
try {
- String symbol = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
- args.add(symbol);
+ args.add('"' + symbol + '"');
String[] argArray= (String[]) args.toArray(new String[args.size()]);
Process p = Runtime.getRuntime().exec(argArray);
if (p == null) return null;
@@ -50,9 +100,7 @@
// If ambiguous, return nothing
if (buf.indexOf("More than one method matched your request") > -1) return null;
return "" + buf.toString();
- } catch (BadLocationException e) {
- RubyPlugin.log(e);
- } catch (IOException e) {
+ } catch (IOException e) {
RubyPlugin.log(e);
} finally {
if(br != null){
@@ -65,4 +113,26 @@
}
return null;
}
+
+ @Override
+ protected String getHoverInfo(IRubyElement[] rubyElements) {
+ if (rubyElements == null || rubyElements.length == 0) return null;
+ String symbol = getRICompatibleName(rubyElements[0]);
+ if (symbol == null) return null;
+ return getRIResult(symbol);
+ }
+
+ private String getRICompatibleName(IRubyElement element) {
+ switch (element.getElementType()) {
+ case IRubyElement.TYPE:
+ return element.getElementName();
+ case IRubyElement.METHOD:
+ IMethod method = (IMethod) element;
+ String delimeter = method.isSingleton() ? "::" : "#";
+ return method.getDeclaringType().getElementName() + delimeter + element.getElementName();
+
+ default:
+ return null;
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:37:26
|
Revision: 2567
http://svn.sourceforge.net/rubyeclipse/?rev=2567&view=rev
Author: cawilliams
Date: 2007-05-31 06:37:17 -0700 (Thu, 31 May 2007)
Log Message:
-----------
for variables check for following comment, then check for preceding
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-31 13:36:53 UTC (rev 2566)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-31 13:37:17 UTC (rev 2567)
@@ -47,9 +47,16 @@
RubyParser parser = new RubyParser();
parser.parse(src); // parse so we can grab the comment nodes
Collection<CommentNode> comments = parser.getComments();
- if (member.isType(IRubyElement.TYPE) || member.isType(IRubyElement.METHOD) || member.isType(IRubyElement.CONSTANT)) {
+ if (member.isType(IRubyElement.TYPE) || member.isType(IRubyElement.METHOD)) {
return getPrecedingComment(comments, elementOffset, src);
}
+ // for variables try to get the following comment, if it's null grab the leading/preceding comment
+ if (member.isType(IRubyElement.CLASS_VAR) || member.isType(IRubyElement.INSTANCE_VAR) ||
+ member.isType(IRubyElement.LOCAL_VARIABLE) || member.isType(IRubyElement.CONSTANT)) {
+ String comment = getFollowingComment(comments, elementOffset, src);
+ if (comment != null) return comment;
+ return getPrecedingComment(comments, elementOffset, src);
+ }
return getFollowingComment(comments, elementOffset, src);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:36:54
|
Revision: 2566
http://svn.sourceforge.net/rubyeclipse/?rev=2566&view=rev
Author: cawilliams
Date: 2007-05-31 06:36:53 -0700 (Thu, 31 May 2007)
Log Message:
-----------
if we hit a class variable declaration just use RubyScript.getElementAt to grab equivalent from RubyModel
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-05-31 13:36:24 UTC (rev 2565)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-05-31 13:36:53 UTC (rev 2566)
@@ -118,8 +118,9 @@
return possible.toArray(new IRubyElement[possible.size()]);
}
// We're already on the declaration, just return it
- if ((selected instanceof DefnNode) || (selected instanceof DefsNode)
- || (selected instanceof ConstDeclNode) || (selected instanceof ClassNode) || (selected instanceof ModuleNode)) {
+ if ((selected instanceof DefnNode) || (selected instanceof DefsNode) ||
+ (selected instanceof ConstDeclNode) || (selected instanceof ClassNode) ||
+ (selected instanceof ModuleNode) || (selected instanceof ClassVarDeclNode)) {
IRubyElement element = ((RubyScript)script).getElementAt(start);
return new IRubyElement[] {element};
}
@@ -315,7 +316,7 @@
}
private boolean isClassVarRef(Node node) {
- return ((node instanceof ClassVarAsgnNode) || (node instanceof ClassVarNode)|| (node instanceof ClassVarDeclNode));
+ return ((node instanceof ClassVarAsgnNode) || (node instanceof ClassVarNode));
}
private boolean isLocalVarRef(Node node) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 13:36:25
|
Revision: 2565
http://svn.sourceforge.net/rubyeclipse/?rev=2565&view=rev
Author: cawilliams
Date: 2007-05-31 06:36:24 -0700 (Thu, 31 May 2007)
Log Message:
-----------
oops we should probably report class variable declarations
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceElementParser.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceElementParser.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceElementParser.java 2007-05-31 04:36:10 UTC (rev 2564)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceElementParser.java 2007-05-31 13:36:24 UTC (rev 2565)
@@ -35,6 +35,7 @@
import org.jruby.ast.CallNode;
import org.jruby.ast.ClassNode;
import org.jruby.ast.ClassVarAsgnNode;
+import org.jruby.ast.ClassVarDeclNode;
import org.jruby.ast.ClassVarNode;
import org.jruby.ast.Colon2Node;
import org.jruby.ast.ConstDeclNode;
@@ -285,6 +286,15 @@
}
@Override
+ public Instruction visitClassVarDeclNode(ClassVarDeclNode iVisited) {
+ FieldInfo field = createFieldInfo(iVisited);
+ field.name = iVisited.getName();
+ requestor.enterField(field);
+ exitField(iVisited);
+ return super.visitClassVarDeclNode(iVisited);
+ }
+
+ @Override
public Instruction visitClassVarNode(ClassVarNode iVisited) {
requestor.acceptFieldReference(iVisited.getName(), iVisited.getPosition().getStartOffset());
return super.visitClassVarNode(iVisited);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-31 04:36:12
|
Revision: 2564
http://svn.sourceforge.net/rubyeclipse/?rev=2564&view=rev
Author: cawilliams
Date: 2007-05-30 21:36:10 -0700 (Wed, 30 May 2007)
Log Message:
-----------
more fixing of hyperlinked stack traces
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-05-30 20:16:38 UTC (rev 2563)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-05-31 04:36:10 UTC (rev 2564)
@@ -105,7 +105,12 @@
public SourceElement(String aFilename, RubySourceLocator pSourceLocator) {
filename = aFilename;
workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFileForLocation(new Path(filename));
- if (workspaceFile == null) workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFile(new Path(filename));
+ if (workspaceFile == null) {
+ workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFile(new Path(filename));
+ if (workspaceFile != null && !workspaceFile.exists()) {
+ workspaceFile = null;
+ }
+ }
if (workspaceFile == null) {
// using slash here is platform independent
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 20:16:50
|
Revision: 2563
http://svn.sourceforge.net/rubyeclipse/?rev=2563&view=rev
Author: cawilliams
Date: 2007-05-30 13:16:38 -0700 (Wed, 30 May 2007)
Log Message:
-----------
fix Trac ticket #4588 - Error Stack Track Hypering Linking
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyConsoleTracker.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java
trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_StackTraceLine.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyConsoleTracker.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyConsoleTracker.java 2007-05-30 19:36:18 UTC (rev 2562)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/console/RubyConsoleTracker.java 2007-05-30 20:16:38 UTC (rev 2563)
@@ -22,12 +22,18 @@
import java.io.File;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
import org.eclipse.debug.ui.console.IConsole;
import org.eclipse.debug.ui.console.IConsoleLineTracker;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.console.IHyperlink;
import org.rubypeople.rdt.internal.ui.util.StackTraceLine;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
/**
* Provides links for stack traces, eg:
@@ -49,7 +55,10 @@
public boolean fileExists(String filename) {
File file = new File(filename);
- return file.exists();
+ if (file.exists()) return true;
+ IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(filename));
+ if (iFile != null) return true;
+ return false;
}
}
private final FileExistanceChecker existanceChecker;
@@ -89,17 +98,30 @@
String text = fConsole.getDocument().get(offset, length);
while (StackTraceLine.isTraceLine(text)) {
- StackTraceLine stackTraceLine = new StackTraceLine(text);
+ String projectName = null;
+ try {
+ projectName = fConsole.getProcess().getLaunch().getLaunchConfiguration().getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null);
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ StackTraceLine stackTraceLine = new StackTraceLine(text, project);
if (! existanceChecker.fileExists(stackTraceLine.getFilename()))
return;
IHyperlink link = new RubyStackTraceHyperlink(fConsole, stackTraceLine);
fConsole.addLink(link, line.getOffset() + prefix + stackTraceLine.offset() , stackTraceLine.length());
prefix = stackTraceLine.offset() + stackTraceLine.length();
- text = text.substring(stackTraceLine.offset() + stackTraceLine.length());
- if (text.startsWith(":in `require':")) {
- text = text.substring(14);
- prefix += 14;
+ int substring = stackTraceLine.offset() + stackTraceLine.length();
+ if (text.length() < substring - 1) {
+ text = "";
+ } else {
+ text = text.substring(substring);
+ if (text.startsWith(":in `require':")) {
+ text = text.substring(14);
+ prefix += 14;
+ }
}
}
} catch (BadLocationException e) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java 2007-05-30 19:36:18 UTC (rev 2562)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java 2007-05-30 20:16:38 UTC (rev 2563)
@@ -15,9 +15,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.eclipse.core.resources.IProject;
import org.rubypeople.rdt.core.IRubyProject;
-import org.rubypeople.rdt.internal.ui.rubyeditor.EditorUtility;
-import org.rubypeople.rdt.ui.actions.OpenEditorActionGroup;
@@ -38,10 +37,14 @@
}
public StackTraceLine(String traceLine) {
- this(traceLine, null);
+ this(traceLine, (IProject) null);
}
+
+ public StackTraceLine(String traceLine, IRubyProject launchedProject) {
+ this(traceLine, launchedProject.getProject());
+ }
- public StackTraceLine(String traceLine, IRubyProject launchedProject) {
+ public StackTraceLine(String traceLine, IProject launchedProject) {
int prefix = 0;
Matcher matcher = OPTIONAL_PREFIX.matcher(traceLine);
if (matcher.find()) {
@@ -56,17 +59,37 @@
return;
}
- fFilename = matcher.group(1);
- if (fFilename.startsWith("./") && launchedProject != null) {
- fFilename = launchedProject.getPath().toPortableString() + fFilename.substring(1);
+ fFilename = matcher.group(1);
+ offset = matcher.start(1) + prefix;
+ if (fFilename.startsWith("[")) {
+ fFilename = fFilename.substring(1);
+ offset++;
}
String lineNumber = matcher.group(2);
fLineNumber = Integer.parseInt(lineNumber);
+ length = fFilename.length()+lineNumber.length()+1;
+ if (isRelativePath() && launchedProject != null) {
+ makeRelativeToWorkspace(launchedProject);
+ }
- offset = matcher.start(1) + prefix;
- length = fFilename.length()+lineNumber.length()+1;
}
+ private void makeRelativeToWorkspace(IProject launchedProject) {
+ if (fFilename.startsWith("./")) {
+ fFilename = launchedProject.getFullPath().toPortableString() + fFilename.substring(1);
+ return;
+ } else {
+ fFilename = launchedProject.getFullPath().toPortableString() + '/' + fFilename;
+ }
+
+ }
+
+ private boolean isRelativePath() {
+ if (fFilename.startsWith("./")) return true;
+ if (!fFilename.startsWith("/") && fFilename.charAt(fFilename.indexOf('/') - 1) != ':' ) return true;
+ return false;
+ }
+
public void openEditor() {
if (fFilename == null)
return;
Modified: trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_StackTraceLine.java
===================================================================
--- trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_StackTraceLine.java 2007-05-30 19:36:18 UTC (rev 2562)
+++ trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_StackTraceLine.java 2007-05-30 20:16:38 UTC (rev 2563)
@@ -26,6 +26,14 @@
public void testWithFrom() {
assertFalse("has a stack trace", StackTraceLine.isTraceLine(WITH_TRAILING_SPACE));
}
+
+ public void testRelativePathWithPeriod() {
+ assertTrue("has a stack trace", StackTraceLine.isTraceLine(" ./content/scripts/WatirScripts/byFeature/../lib/lib_atf_base.rb:240:in `treeNavigation'"));
+ }
+
+ public void testRelativePathWithoutPeriod() {
+ assertTrue("has a stack trace", StackTraceLine.isTraceLine("content/scripts/WatirScripts/byFeature/serialized_framework_validation_IT13_script.rb:43:in `test_tc85'"));
+ }
public void testWithTrailingSpace() {
assertTrue("has a stack trace", StackTraceLine.isTraceLine(WITH_FROM));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 19:36:40
|
Revision: 2562
http://svn.sourceforge.net/rubyeclipse/?rev=2562&view=rev
Author: cawilliams
Date: 2007-05-30 12:36:18 -0700 (Wed, 30 May 2007)
Log Message:
-----------
fix Trac ticket # 4350 - fix opening editors on relative paths in stack trace for Test::Unit stack traces
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/FailureTrace.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-05-30 19:35:25 UTC (rev 2561)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-05-30 19:36:18 UTC (rev 2562)
@@ -105,7 +105,8 @@
public SourceElement(String aFilename, RubySourceLocator pSourceLocator) {
filename = aFilename;
workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFileForLocation(new Path(filename));
-
+ if (workspaceFile == null) workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFile(new Path(filename));
+
if (workspaceFile == null) {
// using slash here is platform independent
workspaceFile = RdtDebugCorePlugin.getWorkspace().getRoot().getFileForLocation(new Path(pSourceLocator.getAbsoluteWorkingDirectory() + "/" + filename)); //$NON-NLS-1$
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/FailureTrace.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/FailureTrace.java 2007-05-30 19:35:25 UTC (rev 2561)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/ui/FailureTrace.java 2007-05-30 19:36:18 UTC (rev 2562)
@@ -28,7 +28,6 @@
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
@@ -50,6 +49,7 @@
private final Clipboard fClipboard;
private TestRunInfo fFailure;
private CompareResultsAction fCompareAction;
+ private TestUnitView fTestRunner;
public FailureTrace(Composite parent, Clipboard clipboard, TestUnitView testRunner, ToolBar toolBar) {
@@ -64,6 +64,7 @@
failureToolBarmanager.add(fCompareAction);
failureToolBarmanager.update(true);
+ fTestRunner = testRunner;
fTable= new Table(parent, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
fClipboard= clipboard;
@@ -82,15 +83,7 @@
});
initMenu();
- fTable.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {}
-
- public void widgetDefaultSelected(SelectionEvent e) {
- new StackTraceLine(getSelectedText()).openEditor();
- }
- });
-
parent.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
disposeIcons();
@@ -127,7 +120,8 @@
}
private Action createOpenEditorAction(String traceLine) {
- return new OpenEditorAction(new StackTraceLine(traceLine));
+ StackTraceLine stack = new StackTraceLine(traceLine, fTestRunner.getLaunchedProject());
+ return new OpenEditorAtLineAction(fTestRunner, stack.getFilename(), stack.getLineNumber());
}
private void disposeIcons(){
@@ -246,17 +240,4 @@
public Shell getShell() {
return fTable.getShell();
}
-
- private class OpenEditorAction extends Action {
- private final StackTraceLine trace;
-
- public OpenEditorAction(StackTraceLine trace) {
- super(TestUnitMessages.OpenEditor_action_label);
- this.trace = trace;
- }
-
- public void run() {
- trace.openEditor();
- }
- }
}
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java 2007-05-30 19:35:25 UTC (rev 2561)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util/StackTraceLine.java 2007-05-30 19:36:18 UTC (rev 2562)
@@ -15,8 +15,12 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.rubypeople.rdt.core.IRubyProject;
+import org.rubypeople.rdt.internal.ui.rubyeditor.EditorUtility;
+import org.rubypeople.rdt.ui.actions.OpenEditorActionGroup;
+
public class StackTraceLine {
// for better matching with 1.8, append /:in `(.*)'/ to the regex
private static Pattern OPEN_TRACE_LINE_PATTERN = Pattern.compile("\\s*(\\S.*?):(\\d+)(:|$)");
@@ -34,7 +38,11 @@
}
public StackTraceLine(String traceLine) {
- int prefix = 0;
+ this(traceLine, null);
+ }
+
+ public StackTraceLine(String traceLine, IRubyProject launchedProject) {
+ int prefix = 0;
Matcher matcher = OPTIONAL_PREFIX.matcher(traceLine);
if (matcher.find()) {
traceLine = traceLine.substring(matcher.group(0).length());
@@ -48,15 +56,18 @@
return;
}
- fFilename = matcher.group(1);
+ fFilename = matcher.group(1);
+ if (fFilename.startsWith("./") && launchedProject != null) {
+ fFilename = launchedProject.getPath().toPortableString() + fFilename.substring(1);
+ }
String lineNumber = matcher.group(2);
fLineNumber = Integer.parseInt(lineNumber);
offset = matcher.start(1) + prefix;
length = fFilename.length()+lineNumber.length()+1;
}
-
- public void openEditor() {
+
+ public void openEditor() {
if (fFilename == null)
return;
new LineBasedEditorOpener(fFilename, fLineNumber).open();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 19:35:26
|
Revision: 2561
http://svn.sourceforge.net/rubyeclipse/?rev=2561&view=rev
Author: cawilliams
Date: 2007-05-30 12:35:25 -0700 (Wed, 30 May 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-30 13:26:51 UTC (rev 2560)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-05-30 19:35:25 UTC (rev 2561)
@@ -123,7 +123,7 @@
} catch (IOException e) {
// ignore
} catch (RaiseException e) {
- e.printStackTrace();
+ // ignore
}
return docs;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:26:55
|
Revision: 2560
http://svn.sourceforge.net/rubyeclipse/?rev=2560&view=rev
Author: cawilliams
Date: 2007-05-30 06:26:51 -0700 (Wed, 30 May 2007)
Log Message:
-----------
change way we search for external types. Since we don't have package name, we need to just do an exhaustive search for a sourcefolder root which seems like a match for the fulel file path. then we use that to break down teh path into it's root/src folders/filename and use that to grab the actual file in the model.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/ExternalFileTypeInfo.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/ExternalFileTypeInfo.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/ExternalFileTypeInfo.java 2007-05-30 13:25:39 UTC (rev 2559)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/ExternalFileTypeInfo.java 2007-05-30 13:26:51 UTC (rev 2560)
@@ -61,15 +61,18 @@
IRubyModel jmodel= RubyCore.create(ResourcesPlugin.getWorkspace().getRoot());
IPath[] enclosedPaths= scope.enclosingProjectsAndJars();
- // TODO Remove the last segment of the path, it's the filename. Also remove "package names" from path
- String rootPath = new File(fPath).getParent();
+ IPath filePath = new Path(fPath);
for (int i= 0; i < enclosedPaths.length; i++) {
IPath curr= enclosedPaths[i];
- if (curr.segmentCount() == 1) {
+ if (curr.segmentCount() == 1) { // check the project
IRubyProject jproject= jmodel.getRubyProject(curr.segment(0));
- ISourceFolderRoot root= jproject.getSourceFolderRoot(rootPath);
- if (root.exists()) {
- return findElementInRoot(root);
+ ISourceFolderRoot[] roots = jproject.getSourceFolderRoots();
+ for (int j = 0; j < roots.length; j++) {
+ ISourceFolderRoot root = roots[j];
+ if (root.isExternal() && root.getPath().isPrefixOf(filePath)) {
+ IPath relative = filePath.removeFirstSegments(root.getPath().segmentCount());
+ return findElementInRoot(root, relative);
+ }
}
}
}
@@ -78,18 +81,22 @@
for (int i= 0; i < projects.length; i++) {
IRubyProject jproject= projects[i];
if (!paths.contains(jproject.getPath())) {
- ISourceFolderRoot root= jproject.getSourceFolderRoot(fPath);
- if (root.exists()) {
- return findElementInRoot(root);
+ ISourceFolderRoot[] roots = jproject.getSourceFolderRoots();
+ for (int j = 0; j < roots.length; j++) {
+ ISourceFolderRoot root = roots[j];
+ if (root.isExternal() && root.getPath().isPrefixOf(filePath)) {
+ IPath relative = filePath.removeFirstSegments(root.getPath().segmentCount());
+ return findElementInRoot(root, relative);
+ }
}
}
}
return null;
}
- private IRubyElement findElementInRoot(ISourceFolderRoot root) {
+ private IRubyElement findElementInRoot(ISourceFolderRoot root, IPath relative) {
IRubyElement res;
- ISourceFolder frag= root.getSourceFolder(getPackageName());
+ ISourceFolder frag= root.getSourceFolder(relative.removeLastSegments(1).segments());
String extension= getExtension();
String fullName= getFileName() + '.' + extension;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:25:44
|
Revision: 2559
http://svn.sourceforge.net/rubyeclipse/?rev=2559&view=rev
Author: cawilliams
Date: 2007-05-30 06:25:39 -0700 (Wed, 30 May 2007)
Log Message:
-----------
clean up old todo, add new one
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/RubySearchParticipant.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/RubySearchParticipant.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/RubySearchParticipant.java 2007-05-30 13:25:15 UTC (rev 2558)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/RubySearchParticipant.java 2007-05-30 13:25:39 UTC (rev 2559)
@@ -24,9 +24,8 @@
@Override
public void indexDocument(SearchDocument document, IPath indexLocation) {
- // TODO must verify that the document + indexPath match, when this is not called from scheduleDocumentIndexing
document.removeAllIndexEntries(); // in case the document was already indexed
-
+ // FIXME We can cheat and use indexLocation as the source folder root path, and determine the "src folder" names from the diff between it and documentPath!
String documentPath = document.getPath();
if (org.rubypeople.rdt.internal.core.util.Util.isRubyLikeFileName(documentPath)) {
new SourceIndexer(document).indexDocument();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:25:16
|
Revision: 2558
http://svn.sourceforge.net/rubyeclipse/?rev=2558&view=rev
Author: cawilliams
Date: 2007-05-30 06:25:15 -0700 (Wed, 30 May 2007)
Log Message:
-----------
clean up old todo
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/TypeInfoFactory.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/TypeInfoFactory.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/TypeInfoFactory.java 2007-05-30 13:25:07 UTC (rev 2557)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/TypeInfoFactory.java 2007-05-30 13:25:15 UTC (rev 2558)
@@ -40,8 +40,7 @@
String pn= getPackageName(packageName);
String tn= new String(typeName);
TypeInfo result= null;
- // FIXME If the type is in an external file we need to handle that!
- String project = getProject(path);
+ String project = getProject(path);
if (project != null) {
result = createIFileTypeInfo(pn, tn, enclosingName, isModule, path, getIFileTypeInfo(fLast), project);
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:25:08
|
Revision: 2557
http://svn.sourceforge.net/rubyeclipse/?rev=2557&view=rev
Author: cawilliams
Date: 2007-05-30 06:25:07 -0700 (Wed, 30 May 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java 2007-05-30 13:22:47 UTC (rev 2556)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs/OpenTypeSelectionDialog2.java 2007-05-30 13:25:07 UTC (rev 2557)
@@ -35,7 +35,7 @@
private Point fLocation;
private Point fSize;
- private static final String DIALOG_SETTINGS= "org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog2"; //$NON-NLS-1$
+ private static final String DIALOG_SETTINGS= "org.rubypeople.rdt.internal.ui.dialogs.OpenTypeSelectionDialog2"; //$NON-NLS-1$
private static final String WIDTH= "width"; //$NON-NLS-1$
private static final String HEIGHT= "height"; //$NON-NLS-1$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:22:54
|
Revision: 2556
http://svn.sourceforge.net/rubyeclipse/?rev=2556&view=rev
Author: cawilliams
Date: 2007-05-30 06:22:47 -0700 (Wed, 30 May 2007)
Log Message:
-----------
when saving type name, handle case where name may already have qualifying info in it (i.e. it has Something::ClassName). So we break that up into simple name and enclosing type name. This fixes #4356
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/indexing/SourceIndexerRequestor.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/indexing/SourceIndexerRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/indexing/SourceIndexerRequestor.java 2007-05-30 13:21:51 UTC (rev 2555)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/indexing/SourceIndexerRequestor.java 2007-05-30 13:22:47 UTC (rev 2556)
@@ -5,6 +5,7 @@
import org.rubypeople.rdt.core.Flags;
import org.rubypeople.rdt.core.compiler.CategorizedProblem;
import org.rubypeople.rdt.internal.compiler.ISourceElementRequestor;
+import org.rubypeople.rdt.internal.core.util.Util;
public class SourceIndexerRequestor implements ISourceElementRequestor {
@@ -76,21 +77,32 @@
for (int i = 0; i < modules.length; i++) {
mod[i] = modules[i].toCharArray();
}
- char[] packName = new char[0];
+ char[] packName = new char[0]; // XXX We need to know the relative path from the source folder root!
char[] superclass = new char[0];
if (type.superclass != null) {
superclass = type.superclass.toCharArray();
}
- indexer.addClassDeclaration(type.isModule ? Flags.AccModule : 0, packName, type.name.toCharArray(), getEnclosingTypeNames(), superclass, mod, type.secondary);
+ char[]simpleName = getSimpleName(type.name);
+ char[][] enclosingTypes = getEnclosingTypeNames(type.name);
+ indexer.addClassDeclaration(type.isModule ? Flags.AccModule : 0, packName, simpleName, enclosingTypes, superclass, mod, type.secondary);
typeStack.push(type.name);
}
- private char[][] getEnclosingTypeNames() {
- char[][] names = new char[typeStack.size()][];
+ private char[] getSimpleName(String name) {
+ return Util.getSimpleName(name).toCharArray();
+ }
+
+ private char[][] getEnclosingTypeNames(String typeName) {
+ String[] parts = typeName.split("::");
+
+ char[][] names = new char[typeStack.size() + parts.length - 1][];
int i = 0;
for (String name : typeStack) {
names[i++] = name.toCharArray();
}
+ for (int j = 0; j < parts.length - 1; j++) {
+ names[i++] = parts[j].toCharArray();
+ }
return names;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-30 13:21:58
|
Revision: 2555
http://svn.sourceforge.net/rubyeclipse/?rev=2555&view=rev
Author: cawilliams
Date: 2007-05-30 06:21:51 -0700 (Wed, 30 May 2007)
Log Message:
-----------
build path with file seperator
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/InternalSearchPattern.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/InternalSearchPattern.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/InternalSearchPattern.java 2007-05-29 20:58:25 UTC (rev 2554)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/InternalSearchPattern.java 2007-05-30 13:21:51 UTC (rev 2555)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.rubypeople.rdt.internal.core.search.matching;
+import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -60,7 +61,7 @@
return (SearchPattern) this;
}
String documentPath(String containerPath, String relativePath) {
- String separator = "/"; //$NON-NLS-1$
+ String separator = File.separator; //$NON-NLS-1$
StringBuffer buffer = new StringBuffer(containerPath.length() + separator.length() + relativePath.length());
buffer.append(containerPath);
buffer.append(separator);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 20:58:26
|
Revision: 2554
http://svn.sourceforge.net/rubyeclipse/?rev=2554&view=rev
Author: cawilliams
Date: 2007-05-29 13:58:25 -0700 (Tue, 29 May 2007)
Log Message:
-----------
just add the Test::Unit test case wizard to the ruby category
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/plugin.xml
Modified: trunk/org.rubypeople.rdt.testunit/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.testunit/plugin.xml 2007-05-29 15:40:38 UTC (rev 2553)
+++ trunk/org.rubypeople.rdt.testunit/plugin.xml 2007-05-29 20:58:25 UTC (rev 2554)
@@ -143,15 +143,10 @@
<extension
point="org.eclipse.ui.newWizards">
- <category
- name="%WizardCategory.name"
- parentCategory="org.rubypeople.rdt.ui"
- id="org.rubypeople.rdt.testunit">
- </category>
<wizard
name="%NewWizardRubyTestCase.name"
icon="$nl$/icons/full/etool16/new_testcase.gif"
- category="org.rubypeople.rdt.testunit"
+ category="org.rubypeople.rdt.ui"
class="org.rubypeople.rdt.internal.testunit.wizards.NewTestCaseCreationWizard"
preferredPerspectives="org.rubypeople.rdt.ui.PerspectiveRuby"
id="org.rubypeople.rdt.testunit.wizards.RubyNewTestCaseWizard">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 15:40:42
|
Revision: 2553
http://svn.sourceforge.net/rubyeclipse/?rev=2553&view=rev
Author: cawilliams
Date: 2007-05-29 08:40:38 -0700 (Tue, 29 May 2007)
Log Message:
-----------
fix up translations
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ExtractConstantPage.java
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java 2007-05-29 15:31:48 UTC (rev 2552)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java 2007-05-29 15:40:38 UTC (rev 2553)
@@ -19,6 +19,8 @@
public static String ExtractConstantAction_extract_constant;
public static String ExtractConstantAction_label;
public static String ExtractConstantInputPage_constant_name;
+ public static String ExtractConstantInputPage_enter_name;
+ public static String ExtractConstantInputPage_invalid_name;
public static String ExtractConstantWizard_defaultPageTitle;
public static String PullUpMethod_Wizard_title;
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties 2007-05-29 15:31:48 UTC (rev 2552)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties 2007-05-29 15:40:38 UTC (rev 2553)
@@ -9,9 +9,9 @@
ExtractConstantInputPage_enter_name=Enter a name for the new constant
ExtractConstantInputPage_constant_name=&Constant name:
-ExtractConstantInputPage_signature_preview=Signature Preview:
-ExtractConstantInputPage_exception=An unexpected exception occurred. See the error log for more details
+ExtractConstantInputPage_invalid_name=''{0}'' is not a valid constant name in Ruby.
ExtractConstantWizard_defaultPageTitle=Extract Constant
PullUpMethod_Wizard_title=Select methods to pull up
+
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ExtractConstantPage.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ExtractConstantPage.java 2007-05-29 15:31:48 UTC (rev 2552)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ExtractConstantPage.java 2007-05-29 15:40:38 UTC (rev 2553)
@@ -28,6 +28,7 @@
public ExtractConstantPage(ConstantExtractor extractor) {
super(RefactoringMessages.ExtractConstantWizard_defaultPageTitle);
+ setDescription(RefactoringMessages.ExtractConstantInputPage_enter_name);
this.extractor = extractor;
}
@@ -55,7 +56,7 @@
ExtractConstantPage.this.setMessage(null);
ExtractConstantPage.this.setPageComplete(true);
} else {
- ExtractConstantPage.this.setMessage("'" + newName + "' is not a valid local variable name in Ruby.", IMessageProvider.ERROR);
+ ExtractConstantPage.this.setMessage(RefactoringMessages.bind(RefactoringMessages.ExtractConstantInputPage_invalid_name, newName), IMessageProvider.ERROR);
ExtractConstantPage.this.setPageComplete(false);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 15:32:43
|
Revision: 2552
http://svn.sourceforge.net/rubyeclipse/?rev=2552&view=rev
Author: cawilliams
Date: 2007-05-29 08:31:48 -0700 (Tue, 29 May 2007)
Log Message:
-----------
fix some translation strings
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java 2007-05-29 15:05:48 UTC (rev 2551)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.java 2007-05-29 15:31:48 UTC (rev 2552)
@@ -33,17 +33,14 @@
public static String Editor_FoldingMenu_name;
public static String ToggleComment_error_title;
public static String ToggleComment_error_message;
- public static String CompletionProcessor_ContextInfo_value_pattern;
- public static String CompletionProcessor_ContextInfo_display_pattern;
public static String EditorUtility_concatModifierStrings;
+ public static String ShowRDoc_label;
private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
private static final String BUNDLE_FOR_CONSTRUCTED_KEYS= "org.rubypeople.rdt.internal.ui.rubyeditor.ConstructedRubyEditorMessages";//$NON-NLS-1$
private static ResourceBundle fgBundleForConstructedKeys= ResourceBundle.getBundle(BUNDLE_FOR_CONSTRUCTED_KEYS);
- public static String ShowRDoc_label;
-
/**
* Returns the message bundle which contains constructed keys.
*
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties 2007-05-29 15:05:48 UTC (rev 2551)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditorMessages.properties 2007-05-29 15:31:48 UTC (rev 2552)
@@ -21,4 +21,6 @@
ToggleComment_error_title=Toggle Comment
ToggleComment_error_message=An error occurred while toggling comments.
-EditorUtility_concatModifierStrings= {0} + {1}
\ No newline at end of file
+EditorUtility_concatModifierStrings= {0} + {1}
+
+ShowRDoc_label=Show T&ooltip Description
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 15:05:49
|
Revision: 2551
http://svn.sourceforge.net/rubyeclipse/?rev=2551&view=rev
Author: cawilliams
Date: 2007-05-29 08:05:48 -0700 (Tue, 29 May 2007)
Log Message:
-----------
fix to show HTML properly after hover gains focus via F2
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/CommentHoverProvider.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/CommentHoverProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/CommentHoverProvider.java 2007-05-29 14:58:33 UTC (rev 2550)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/hover/CommentHoverProvider.java 2007-05-29 15:05:48 UTC (rev 2551)
@@ -3,6 +3,7 @@
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.information.IInformationProviderExtension2;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
import org.rubypeople.rdt.core.IMember;
@@ -11,12 +12,9 @@
import org.rubypeople.rdt.internal.ui.text.HTMLPrinter;
import org.rubypeople.rdt.internal.ui.text.HTMLTextPresenter;
import org.rubypeople.rdt.internal.ui.text.ruby.IInformationControlExtension4;
-import org.rubypeople.rdt.internal.ui.text.ruby.hover.AbstractReusableInformationControlCreator;
-import org.rubypeople.rdt.internal.ui.text.ruby.hover.AbstractRubyEditorTextHover;
-import org.rubypeople.rdt.internal.ui.text.ruby.hover.BrowserInformationControl;
import org.rubypeople.rdt.ui.RubyElementLabels;
-public class CommentHoverProvider extends AbstractRubyEditorTextHover {
+public class CommentHoverProvider extends AbstractRubyEditorTextHover implements IInformationProviderExtension2 {
private final long LABEL_FLAGS= RubyElementLabels.ALL_FULLY_QUALIFIED | RubyElementLabels.M_PARAMETER_NAMES | RubyElementLabels.USE_RESOLVED;
private final long LOCAL_VARIABLE_FLAGS= LABEL_FLAGS & ~RubyElementLabels.F_FULLY_QUALIFIED | RubyElementLabels.F_POST_QUALIFIED;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 14:58:39
|
Revision: 2550
http://svn.sourceforge.net/rubyeclipse/?rev=2550&view=rev
Author: cawilliams
Date: 2007-05-29 07:58:33 -0700 (Tue, 29 May 2007)
Log Message:
-----------
when trying to resolve a singleton method definition, just grab the method.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-05-29 14:29:11 UTC (rev 2549)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/SelectionEngine.java 2007-05-29 14:58:33 UTC (rev 2550)
@@ -19,6 +19,7 @@
import org.jruby.ast.ConstDeclNode;
import org.jruby.ast.ConstNode;
import org.jruby.ast.DefnNode;
+import org.jruby.ast.DefsNode;
import org.jruby.ast.FCallNode;
import org.jruby.ast.InstAsgnNode;
import org.jruby.ast.InstVarNode;
@@ -117,7 +118,8 @@
return possible.toArray(new IRubyElement[possible.size()]);
}
// We're already on the declaration, just return it
- if ((selected instanceof DefnNode) || (selected instanceof ConstDeclNode) || (selected instanceof ClassNode) || (selected instanceof ModuleNode)) {
+ if ((selected instanceof DefnNode) || (selected instanceof DefsNode)
+ || (selected instanceof ConstDeclNode) || (selected instanceof ClassNode) || (selected instanceof ModuleNode)) {
IRubyElement element = ((RubyScript)script).getElementAt(start);
return new IRubyElement[] {element};
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 14:29:14
|
Revision: 2549
http://svn.sourceforge.net/rubyeclipse/?rev=2549&view=rev
Author: cawilliams
Date: 2007-05-29 07:29:11 -0700 (Tue, 29 May 2007)
Log Message:
-----------
extract UI string
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MethodUpPullerSelectionPage.java
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java 2007-05-29 13:45:45 UTC (rev 2548)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.java 2007-05-29 14:29:11 UTC (rev 2549)
@@ -20,6 +20,7 @@
public static String ExtractConstantAction_label;
public static String ExtractConstantInputPage_constant_name;
public static String ExtractConstantWizard_defaultPageTitle;
+ public static String PullUpMethod_Wizard_title;
private RefactoringMessages() {}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties 2007-05-29 13:45:45 UTC (rev 2548)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/internal/refactoring/RefactoringMessages.properties 2007-05-29 14:29:11 UTC (rev 2549)
@@ -13,3 +13,5 @@
ExtractConstantInputPage_exception=An unexpected exception occurred. See the error log for more details
ExtractConstantWizard_defaultPageTitle=Extract Constant
+
+PullUpMethod_Wizard_title=Select methods to pull up
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MethodUpPullerSelectionPage.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MethodUpPullerSelectionPage.java 2007-05-29 13:45:45 UTC (rev 2548)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MethodUpPullerSelectionPage.java 2007-05-29 14:29:11 UTC (rev 2549)
@@ -13,18 +13,18 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.rubypeople.rdt.internal.refactoring.RefactoringMessages;
import org.rubypeople.rdt.refactoring.core.pullup.MethodUpPuller;
import org.rubypeople.rdt.refactoring.ui.NotifiedContainerCheckedTree;
public class MethodUpPullerSelectionPage extends UserInputWizardPage {
- private static final String TITLE = "Selcet methods to pull up";
private NotifiedContainerCheckedTree tree;
private MethodUpPuller methodUpPuller;
public MethodUpPullerSelectionPage(MethodUpPuller methodUpPuller) {
- super(TITLE);
- setTitle(TITLE);
+ super(RefactoringMessages.PullUpMethod_Wizard_title);
+ setTitle(RefactoringMessages.PullUpMethod_Wizard_title);
this.methodUpPuller = methodUpPuller;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-05-29 13:45:47
|
Revision: 2548
http://svn.sourceforge.net/rubyeclipse/?rev=2548&view=rev
Author: cawilliams
Date: 2007-05-29 06:45:45 -0700 (Tue, 29 May 2007)
Log Message:
-----------
try to capture more information in the logs about when we might hit problems parsing out local gem info
Modified Paths:
--------------
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/core/gems/GemManager.java
Modified: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/core/gems/GemManager.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/core/gems/GemManager.java 2007-05-29 13:22:45 UTC (rev 2547)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/core/gems/GemManager.java 2007-05-29 13:45:45 UTC (rev 2548)
@@ -322,24 +322,29 @@
private Set<Gem> parseOutGems(List<String> lines) {
Set<Gem> gems = new HashSet<Gem>();
for (int i = 0; i < lines.size();) {
- String nameAndVersion = lines.get(i);
- String description = lines.get(i + 1);
- int j = 2;
- if ((i + 2) < lines.size()) {
- String nextLine = lines.get(i + 2);
- while (nextLine.trim().length() != 0) {
- j++;
- description += " " + nextLine.trim();
- nextLine = lines.get(i + j);
+ try {
+ String nameAndVersion = lines.get(i);
+ String description = lines.get(i + 1);
+ int j = 2;
+ if ((i + 2) < lines.size()) {
+ String nextLine = lines.get(i + 2);
+ while (nextLine.trim().length() != 0) {
+ j++;
+ description += " " + nextLine.trim();
+ nextLine = lines.get(i + j);
+ }
}
+ int openParen = nameAndVersion.indexOf('(');
+ int closeParen = nameAndVersion.indexOf(')');
+ String name = nameAndVersion.substring(0, openParen);
+ String version = nameAndVersion
+ .substring(openParen + 1, closeParen);
+ gems.add(new Gem(name.trim(), version, description.trim()));
+ i += (j + 1);
+ } catch (RuntimeException e) {
+ AptanaRDTPlugin.log(new IllegalStateException("Was unable to parse local gems correctly from: " + lines.toString()));
+ AptanaRDTPlugin.log(e);
}
- int openParen = nameAndVersion.indexOf('(');
- int closeParen = nameAndVersion.indexOf(')');
- String name = nameAndVersion.substring(0, openParen);
- String version = nameAndVersion
- .substring(openParen + 1, closeParen);
- gems.add(new Gem(name.trim(), version, description.trim()));
- i += (j + 1);
}
return gems;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|