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 #37291] Fri, 04 June 2004 14:58 Go to next message
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--
Re: aspects files in stacktraces not clickable [message #37326 is a reply to message #37291] Tue, 08 June 2004 07:48 Go to previous message
Eclipse UserFriend
Originally posted by: clemas.uk.ibm.com

Michael Moser wrote:
>
> 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? ;-) ).
>

Thanks for the fix Michael. Delivering it in our 1.1.X stream of AJDT
will be hard as these kind of patches to JDT classes are difficult.
This is why we have the Lancaster codebase which is a complete copy of
the JDT in which we can do exactly what you describe. We are wary of
doing something like patching the JDT core classes either directly or
via some kind of aspect - since that *could* affect normal Java
development in Eclipse and we wouldn't be very popular if we
accidentally broke it...

I'll get someone on the team to look at whether we can add your fix in
some way to 1.1.X (our normal approach is subclassing the JDT classes
where we need to - but this only gets us so far depending on whether
they were ever designed for subclassing !).

regards,
Andy.

---
Andy Clement
AspectJ/AJDT Development
Re: aspects files in stacktraces not clickable [message #580673 is a reply to message #37291] Tue, 08 June 2004 07:48 Go to previous message
Andrew Clement is currently offline Andrew ClementFriend
Messages: 162
Registered: July 2009
Senior Member
Michael Moser wrote:
>
> 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? ;-) ).
>

Thanks for the fix Michael. Delivering it in our 1.1.X stream of AJDT
will be hard as these kind of patches to JDT classes are difficult.
This is why we have the Lancaster codebase which is a complete copy of
the JDT in which we can do exactly what you describe. We are wary of
doing something like patching the JDT core classes either directly or
via some kind of aspect - since that *could* affect normal Java
development in Eclipse and we wouldn't be very popular if we
accidentally broke it...

I'll get someone on the team to look at whether we can add your fix in
some way to 1.1.X (our normal approach is subclassing the JDT classes
where we need to - but this only gets us so far depending on whether
they were ever designed for subclassing !).

regards,
Andy.

---
Andy Clement
AspectJ/AJDT Development
Previous Topic:aspects files in stacktraces not clickable
Next Topic:AJ-Editor does work with build I20040609
Goto Forum:
  


Current Time: Fri Apr 19 04:06:08 GMT 2024

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

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

Back to the top