public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: rmoseley@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Fix hover over variable(since removal of CDTParser). Date: Wed, 07 May 2008 21:34:00 -0000 [thread overview] Message-ID: <20080507213415.6140.qmail@sourceware.org> (raw) 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
reply other threads:[~2008-05-07 21:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080507213415.6140.qmail@sourceware.org \ --to=rmoseley@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).