public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fix hover over variable(since removal of CDTParser).
@ 2008-05-07 21:34 rmoseley
  0 siblings, 0 replies; only message in thread
From: rmoseley @ 2008-05-07 21:34 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  2dc7d134b4e0dcc7a6b15978a3cb5a7660d71225 (commit)
      from  cd839a736a7ab23d8a5613c2479b6b9f83d055b2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 2dc7d134b4e0dcc7a6b15978a3cb5a7660d71225
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Wed May 7 16:23:06 2008 -0500

    Fix hover over variable(since removal of CDTParser).
    
    * SourceBuffer.java: Fix hover over variable error

-----------------------------------------------------------------------

Summary of changes:
 frysk-gui/frysk/gui/srcwin/ChangeLog         |    4 +++
 frysk-gui/frysk/gui/srcwin/SourceBuffer.java |   31 ++++++-------------------
 2 files changed, 12 insertions(+), 23 deletions(-)

First 500 lines of diff:
diff --git a/frysk-gui/frysk/gui/srcwin/ChangeLog b/frysk-gui/frysk/gui/srcwin/ChangeLog
index 857b916..866379e 100644
--- a/frysk-gui/frysk/gui/srcwin/ChangeLog
+++ b/frysk-gui/frysk/gui/srcwin/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-07  Rick Moseley  <rmoseley@redhat.com>
+
+	* SourceBuffer.java: Fix hover over variable error.
+
 2008-04-17  Andrew Cagney  <cagney@redhat.com>
 
 	* SourceWindowFactory.java: Use frysk.config.Prefix's
diff --git a/frysk-gui/frysk/gui/srcwin/SourceBuffer.java b/frysk-gui/frysk/gui/srcwin/SourceBuffer.java
index 58d49fa..f0a624e 100644
--- a/frysk-gui/frysk/gui/srcwin/SourceBuffer.java
+++ b/frysk-gui/frysk/gui/srcwin/SourceBuffer.java
@@ -620,7 +620,7 @@ public class SourceBuffer extends TextBuffer {
     public String getVariable(TextIter iter) {
 	
 	if (this.scope == null || this.scope.getLine() == SourceLocation.UNKNOWN 
-	    || debugInfo == null)
+	    || debugInfo == null) 
 	    return null;
 
 	DOMSource source = this.scope.getLineXXX().getDOMSource();
@@ -633,22 +633,6 @@ public class SourceBuffer extends TextBuffer {
 	if (line == null)
 	    return null;
 
-	DOMTag tag = line.getTag(iter.getLineOffset());
-
-	// No var (or no tag), do nothing
-	if (tag == null || !tag.getType().equals(DOMTagTypes.LOCAL_VAR))
-	    return null;
-
-	Value var;
-	try {
-	    var = debugInfo.print(line.getText().substring(tag.getStart(),
-		    tag.getStart() + tag.getLength()), scope);
-	    if (var == null)
-		return null;
-	} catch (RuntimeException e) {
-	    return null;
-	}
-	
 	return getWordAtIter(iter);
     }
 
@@ -1305,20 +1289,21 @@ public class SourceBuffer extends TextBuffer {
     {
 	TextIter startIter = this.getIter(iter.getOffset());
 	// First, we back up iter to a point where there is a non-alphanumeric character
-	while(Character.isLetter(startIter.getChar()) ||
-		Character.isDigit(startIter.getChar())){
+	while(Character.isJavaIdentifierPart(startIter.getChar())) {
 	    startIter.moveBackwardChar();
 	}
+	startIter.moveForwardChar();
+	
+	//Now see if the starting character is valid
+	if (!Character.isJavaIdentifierStart(startIter.getChar()))
+	    return null;
 	
 	// Now, find the end of the word
 	TextIter endIter = this.getIter(iter.getOffset()+1);
-	while(Character.isLetter(endIter.getChar()) ||
-		Character.isDigit(endIter.getChar())) {
+	while(Character.isJavaIdentifierPart(endIter.getChar())) {
 	    endIter.moveForwardChar();
 	}
-	
 	String word = this.getText(startIter, endIter, true);
-	
 	return word.trim();
     }
 


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-07 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07 21:34 [SCM] master: Fix hover over variable(since removal of CDTParser) rmoseley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).