Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » aspects files in stacktraces not clickable
aspects files in stacktraces not clickable [message #580636] Fri, 04 June 2004 14:58
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C44A55.24088430
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Andrew,
I noticed, that aspect code in stacktraces on the console is not =
properly identified and thus also not made "clickable" (i.e. underlined =
when hovering over it in with the mouse) and consequently does not open =
automatically, when clicking onto an aspect codeline in stacktraces.

Since for another reason I just happened to have been looking into the =
code I was able to identify the "culprit" for this and I can even add a =
suggestion how this could be fixed (I colored the additional lines in =
red, but since not all newsreaders might support that I also prefixed =
them with ">>"):
---------------------------------
....
package org.eclipse.jdt.internal.debug.ui.console;
....
public class JavaConsoleTracker implements IConsoleLineTracker {

public void init(IConsole console) {
...
fJavaMatcher =3D new StringMatcher("*(*.java:*)", false, false); =
//$NON-NLS-1$
>> fAspectJMatcher =3D new StringMatcher("*(*.aj:*)", false, false); =
//$NON-NLS-1$
}
...
if (fJavaMatcher.match(text)) {
standardMatch =3D true;
// find the last space in the line
index =3D text.lastIndexOf(' ');
>> } else if (fAspectJMatcher.match(text)) {
>> standardMatch =3D true;
>> // find the last space in the line
>> index =3D text.lastIndexOf(' ');
} else if (fNativeMatcher.match(text)) {
...
---------------------------------

The above is, how I would fix this in the original code. I didn't =
investigate how one could do that by just adding to or extend the =
existing class via the AJDT plugin (maybe using an aspect? ;-) ).

Cheers,
Michael

------=_NextPart_000_003A_01C44A55.24088430
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi Andrew,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I noticed, that aspect code in =
stacktraces on the=20
console is not properly identified and thus also not made "clickable" =
(i.e.=20
underlined when hovering over it in with the mouse) and consequently =
does not=20
open automatically, when clicking onto an aspect codeline in=20
stacktraces.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Since for another reason I just =
happened to have=20
been looking into the code I was able to identify the "culprit" for this =
and I=20
can even add a suggestion how this could be&nbsp;fixed (</FONT><FONT =
face=3DArial=20
size=3D2><FONT face=3DArial size=3D2>I colored the additional lines in =
red, but since=20
not all newsreaders might support that I also prefixed them with=20
"&gt;&gt;"):</FONT></DIV></FONT>
<DIV><FONT face=3DArial =
size=3D2>---------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>package=20
org.eclipse.jdt.internal.debug.ui.console;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>public class JavaConsoleTracker =
implements=20
IConsoleLineTracker {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;public void init(IConsole =
console)=20
{<BR>&nbsp;&nbsp;...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;fJavaMatcher =3D new=20
StringMatcher("*(*.java:*)", false, false); //$NON-NLS-1$<BR><FONT=20
color=3D#ff0000><FONT =
color=3D#000000>&gt;&gt;</FONT>&nbsp;&nbsp;fAspectJMatcher =3D=20
new StringMatcher("*(*.aj:*)", false, false);=20
//$NON-NLS-1$<BR></FONT>&nbsp;}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;if =
(fJavaMatcher.match(text))=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;standardMatch =3D =
true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;//=20
find the last space in the line<BR>&nbsp;&nbsp;&nbsp;&nbsp;index =3D=20
text.lastIndexOf(' ');<BR><FONT color=3D#ff0000><FONT=20
color=3D#000000>&gt;&gt;</FONT>&nbsp;&nbsp;&nbsp;} else if=20
(fAspectJMatcher.match(text)) {<BR><FONT=20
color=3D#000000>&gt;&gt;</FONT>&nbsp;&nbsp;&nbsp;&nbsp;standardMatch =3D =

true;<BR><FONT color=3D#000000>&gt;&gt;</FONT>&nbsp;&nbsp;&nbsp;&nbsp;// =
find the=20
last space in the line<BR><FONT=20
color=3D#000000>&gt;&gt;</FONT>&nbsp;&nbsp;&nbsp;&nbsp;index =3D =
text.lastIndexOf('=20
');<BR></FONT>&nbsp;&nbsp;&nbsp;} else if (fNativeMatcher.match(text))=20
{<BR>&nbsp; ...</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>---------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The above is, how I&nbsp;would fix this =
in the=20
original code.&nbsp;I didn't&nbsp;investigate how one could do that by =
just=20
adding to or extend the existing class via&nbsp;the AJDT plugin (maybe =
using an=20
aspect? ;-) ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_003A_01C44A55.24088430--
Previous Topic:ADJT aspectJ does not wave aspects
Next Topic:aspects files in stacktraces not clickable
Goto Forum:
  


Current Time: Tue Mar 19 09:22:34 GMT 2024

Powered by FUDForum. Page generated in 0.02040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top