aspects files in stacktraces not clickable [message #37291] |
Fri, 04 June 2004 10:58  |
Eclipse User |
|
|
|
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> </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 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
">>"):</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> </DIV>
<DIV><FONT face=3DArial size=3D2> public void init(IConsole =
console)=20
{<BR> ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> fJavaMatcher =3D new=20
StringMatcher("*(*.java:*)", false, false); //$NON-NLS-1$<BR><FONT=20
color=3D#ff0000><FONT =
color=3D#000000>>></FONT> fAspectJMatcher =3D=20
new StringMatcher("*(*.aj:*)", false, false);=20
//$NON-NLS-1$<BR></FONT> }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> if =
(fJavaMatcher.match(text))=20
{<BR> standardMatch =3D =
true;<BR> //=20
find the last space in the line<BR> index =3D=20
text.lastIndexOf(' ');<BR><FONT color=3D#ff0000><FONT=20
color=3D#000000>>></FONT> } else if=20
(fAspectJMatcher.match(text)) {<BR><FONT=20
color=3D#000000>>></FONT> standardMatch =3D =
true;<BR><FONT color=3D#000000>>></FONT> // =
find the=20
last space in the line<BR><FONT=20
color=3D#000000>>></FONT> index =3D =
text.lastIndexOf('=20
');<BR></FONT> } else if (fNativeMatcher.match(text))=20
{<BR> ...</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>---------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The above is, how I would fix this =
in the=20
original code. I didn't investigate how one could do that by =
just=20
adding to or extend the existing class via the AJDT plugin (maybe =
using an=20
aspect? ;-) ).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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> </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 03:48  |
Eclipse User |
|
|
|
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 03:48  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02468 seconds