Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » what is the status of JPDA strata (JSR-045) support and SourceLocator support
what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152624] Tue, 06 April 2004 09:08 Go to next message
Dan Jacobs is currently offline Dan JacobsFriend
Messages: 13
Registered: July 2009
Junior Member
Hi all,

I haven't seen any discussion about JPDA strata support in the archives
since two years ago. Does Eclipse support it already? I had assumed that
it didn't (and have been trying to do things the hard way).

If Eclipse does provide JPDA strata support, is there any documentation on
how to work generate SMAP files/data in the build process? Or is it
necessary to post-process the class files manually (not a big deal using
BCEL) after the Java builder runs?

If Eclipse does *not* yet have JPDA strata support, is there a planned
timetable for it?

In either case, are there any examples out there for using ISourceLocator
for a very-close-to-Java language? I know that WebSphere's JSP support
used to use that approach, but from looking at the JDT, it looks like it
might be a thoroughly non-trivial thing to implement from scratch without a
good example.

Thanks in advance,
-- Dan
Re: what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152642 is a reply to message #152624] Tue, 06 April 2004 10:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.rohe.stud.tu-ilmenau.de

"Dan Jacobs" <djacobs@jplates.com> schrieb im Newsbeitrag
news:c4trov$6pl$1@eclipse.org...
> Hi all,
>
> I haven't seen any discussion about JPDA strata support in the archives
> since two years ago. Does Eclipse support it already? I had assumed that
> it didn't (and have been trying to do things the hard way).
>
> If Eclipse does provide JPDA strata support, is there any documentation on
> how to work generate SMAP files/data in the build process? Or is it
> necessary to post-process the class files manually (not a big deal using
> BCEL) after the Java builder runs?
>
> If Eclipse does *not* yet have JPDA strata support, is there a planned
> timetable for it?
>

Strata support is in Eclipse 3.0, i've looked in source code.
Theoretically for JSP the JSP compiler must also have strata support. I
think then the JSP compiler must generate the SMAP based on the generated
Java-File and the given JSP-file.

greetings
Daniel
Re: what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152729 is a reply to message #152642] Tue, 06 April 2004 15:16 Go to previous messageGo to next message
Dan Jacobs is currently offline Dan JacobsFriend
Messages: 13
Registered: July 2009
Junior Member
Well, that's interesting, because I just re-enabled my SMAP generation and
have added the SourceDebugExtension attribute to the class-files, and the
Eclipse debugger completely ignores those attributes.

As far as I can tell, the JavaSourceLocator is still 100% Java-centric, so
extending a Java-project with other languages still seems to require a new
SourceLocator.

Can anyone from the Eclipse project confirm this and offer some guidance on
the right way to direct the debugger to use the *real* source file?

I am modifying the ClassName attribute in the class-file to point to my
JPlates source file, and adding a properly formed SourceDebugExtension SMAP
attribute, but the debugger does not open or use the JPlates sources, but
always resolves classes to the generated Java sources.

Thanks,
-- Dan

news.eclipse.org wrote:
> "Dan Jacobs" <djacobs@jplates.com> schrieb im Newsbeitrag
> news:c4trov$6pl$1@eclipse.org...
>
>>Hi all,
>>
>>I haven't seen any discussion about JPDA strata support in the archives
>>since two years ago. Does Eclipse support it already? I had assumed that
>>it didn't (and have been trying to do things the hard way).
>>
>>If Eclipse does provide JPDA strata support, is there any documentation on
>>how to work generate SMAP files/data in the build process? Or is it
>>necessary to post-process the class files manually (not a big deal using
>>BCEL) after the Java builder runs?
>>
>>If Eclipse does *not* yet have JPDA strata support, is there a planned
>>timetable for it?
>>
>
>
> Strata support is in Eclipse 3.0, i've looked in source code.
> Theoretically for JSP the JSP compiler must also have strata support. I
> think then the JSP compiler must generate the SMAP based on the generated
> Java-File and the given JSP-file.
>
> greetings
> Daniel
>
>
Re: what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152757 is a reply to message #152729] Tue, 06 April 2004 16:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.rohe.stud.tu-ilmenau.de

Excuse me for my name! I've not set up my newsreader correctly. Now it works
correct.

So far i've looked at classes in org.eclipse.jdt.debug.core and
org.eclipse.jdt.internal.debug.core.breakpoints JDT supports stratum
breakpoints. The classes org.eclipse.jdt.debug.core.JDIDebugModel and
org.eclipse.jdt.internal.debug.core.breakpoints.JavaStratumL ineBreakpoint
may be interesting for you.

Correct me if I misunderstand your problem:
You have a project with JPlates template files which are compiled to Java
source files and then the Java compiler creates Java class files. JPlates
says it can generate a mapping between Java source file locations and
JPlates locations, so this would be no problem. Your problem is the lookup
of JPlates files in your project.

If you have problems during build you may create a plugin with a nature for
the JPlates project and a builder which generates the Java source files and
forwards them to the Java builder.

If you have problems when debugging your JPlates project you have to
implement some launching facilities and a source locator. Good help will be
the JDT launching plugin. For source lookups look at the source in the
package org.eclipse.jdt.launching.sourcelookup. There is one source locator
and some source location's. So in my opinion you have to implement the
interface IJavaSourceLocation for your projects which will find the files.

greetings
Daniel

"Dan Jacobs" <djacobs@jplates.com> schrieb im Newsbeitrag
news:4072C9B1.6060300@jplates.com...
> Well, that's interesting, because I just re-enabled my SMAP generation and
> have added the SourceDebugExtension attribute to the class-files, and the
> Eclipse debugger completely ignores those attributes.
>
> As far as I can tell, the JavaSourceLocator is still 100% Java-centric, so
> extending a Java-project with other languages still seems to require a new
> SourceLocator.
>
> Can anyone from the Eclipse project confirm this and offer some guidance
on
> the right way to direct the debugger to use the *real* source file?
>
> I am modifying the ClassName attribute in the class-file to point to my
> JPlates source file, and adding a properly formed SourceDebugExtension
SMAP
> attribute, but the debugger does not open or use the JPlates sources, but
> always resolves classes to the generated Java sources.
>
> Thanks,
> -- Dan
Re: what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152796 is a reply to message #152757] Tue, 06 April 2004 19:10 Go to previous messageGo to next message
Dan Jacobs is currently offline Dan JacobsFriend
Messages: 13
Registered: July 2009
Junior Member
Hi Daniel,

My comments are mixed in below.

-- Dan

Daniel Rohe wrote:
> Excuse me for my name! I've not set up my newsreader correctly. Now it works
> correct.
>
> So far i've looked at classes in org.eclipse.jdt.debug.core and
> org.eclipse.jdt.internal.debug.core.breakpoints JDT supports stratum
> breakpoints. The classes org.eclipse.jdt.debug.core.JDIDebugModel and
> org.eclipse.jdt.internal.debug.core.breakpoints.JavaStratumL ineBreakpoint
> may be interesting for you.

Yes, I see them, but I don't see evidence that they're being used the way I
would have expected.

>
> Correct me if I misunderstand your problem:
> You have a project with JPlates template files which are compiled to Java
> source files and then the Java compiler creates Java class files. JPlates
> says it can generate a mapping between Java source file locations and
> JPlates locations, so this would be no problem. Your problem is the lookup
> of JPlates files in your project.
>
> If you have problems during build you may create a plugin with a nature for
> the JPlates project and a builder which generates the Java source files and
> forwards them to the Java builder.

That's what I'm doing. I have *added* JPlatesNature to a Java project, and
I compile JPlates sources into Java sources. Then, my resource-change
listener watches for class-files being created by the Java-builder, and I
post-process the class-files that were originally from JPlates sources to
store a SMAP-entry and to change the SourceFile attribute.

>
> If you have problems when debugging your JPlates project you have to
> implement some launching facilities and a source locator.

I agree that seems to be necessary, but I don't it's supposed to be. The
class-files have all the information they need for the debugger to know
exactly what line of what file to go to, but the default source-locator for
Java-projects doesn't use that information. That's the problem.

JSR-045 specifies what other-language compilers are supposed to do in order
for debuggers to support them, but Eclipse hasn't [yet] caught up to
supporting it.

> Good help will be
> the JDT launching plugin. For source lookups look at the source in the
> package org.eclipse.jdt.launching.sourcelookup. There is one source locator
> and some source location's. So in my opinion you have to implement the
> interface IJavaSourceLocation for your projects which will find the files.

In principle you're right. But there's an awful lot code that needs to be
nearly duplicated from the JavaSourceLocator and all of its associated
classes. What that default source-locator should be doing is using the
information available to it. For instance, it should used the SourceFile
attribute in the class-file, but instead it assumes a file extension of
".java" in all cases.

Now that I know more about what's going on, I suppose I should submit a bug
report or two.

Thanks again!
-- Dan

>
> greetings
> Daniel
>
> "Dan Jacobs" <djacobs@jplates.com> schrieb im Newsbeitrag
> news:4072C9B1.6060300@jplates.com...
>
>>Well, that's interesting, because I just re-enabled my SMAP generation and
>>have added the SourceDebugExtension attribute to the class-files, and the
>>Eclipse debugger completely ignores those attributes.
>>
>>As far as I can tell, the JavaSourceLocator is still 100% Java-centric, so
>>extending a Java-project with other languages still seems to require a new
>>SourceLocator.
>>
>>Can anyone from the Eclipse project confirm this and offer some guidance
>
> on
>
>>the right way to direct the debugger to use the *real* source file?
>>
>>I am modifying the ClassName attribute in the class-file to point to my
>>JPlates source file, and adding a properly formed SourceDebugExtension
>
> SMAP
>
>>attribute, but the debugger does not open or use the JPlates sources, but
>>always resolves classes to the generated Java sources.
>>
>>Thanks,
>>-- Dan
>
>
>
Re: what is the status of JPDA strata (JSR-045) support and SourceLocator support [message #152812 is a reply to message #152796] Tue, 06 April 2004 20:32 Go to previous message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Discussion has started in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=57644

HTH
Darins

"Dan Jacobs" <djacobs@jplates.com> wrote in message
news:407300A3.6050500@jplates.com...
> Hi Daniel,
>
> My comments are mixed in below.
>
> -- Dan
>
> Daniel Rohe wrote:
> > Excuse me for my name! I've not set up my newsreader correctly. Now it
works
> > correct.
> >
> > So far i've looked at classes in org.eclipse.jdt.debug.core and
> > org.eclipse.jdt.internal.debug.core.breakpoints JDT supports stratum
> > breakpoints. The classes org.eclipse.jdt.debug.core.JDIDebugModel and
> >
org.eclipse.jdt.internal.debug.core.breakpoints.JavaStratumL ineBreakpoint
> > may be interesting for you.
>
> Yes, I see them, but I don't see evidence that they're being used the way
I
> would have expected.
>
> >
> > Correct me if I misunderstand your problem:
> > You have a project with JPlates template files which are compiled to
Java
> > source files and then the Java compiler creates Java class files.
JPlates
> > says it can generate a mapping between Java source file locations and
> > JPlates locations, so this would be no problem. Your problem is the
lookup
> > of JPlates files in your project.
> >
> > If you have problems during build you may create a plugin with a nature
for
> > the JPlates project and a builder which generates the Java source files
and
> > forwards them to the Java builder.
>
> That's what I'm doing. I have *added* JPlatesNature to a Java project,
and
> I compile JPlates sources into Java sources. Then, my resource-change
> listener watches for class-files being created by the Java-builder, and I
> post-process the class-files that were originally from JPlates sources to
> store a SMAP-entry and to change the SourceFile attribute.
>
> >
> > If you have problems when debugging your JPlates project you have to
> > implement some launching facilities and a source locator.
>
> I agree that seems to be necessary, but I don't it's supposed to be. The
> class-files have all the information they need for the debugger to know
> exactly what line of what file to go to, but the default source-locator
for
> Java-projects doesn't use that information. That's the problem.
>
> JSR-045 specifies what other-language compilers are supposed to do in
order
> for debuggers to support them, but Eclipse hasn't [yet] caught up to
> supporting it.
>
> > Good help will be
> > the JDT launching plugin. For source lookups look at the source in the
> > package org.eclipse.jdt.launching.sourcelookup. There is one source
locator
> > and some source location's. So in my opinion you have to implement the
> > interface IJavaSourceLocation for your projects which will find the
files.
>
> In principle you're right. But there's an awful lot code that needs to be
> nearly duplicated from the JavaSourceLocator and all of its associated
> classes. What that default source-locator should be doing is using the
> information available to it. For instance, it should used the SourceFile
> attribute in the class-file, but instead it assumes a file extension of
> ".java" in all cases.
>
> Now that I know more about what's going on, I suppose I should submit a
bug
> report or two.
>
> Thanks again!
> -- Dan
>
> >
> > greetings
> > Daniel
> >
> > "Dan Jacobs" <djacobs@jplates.com> schrieb im Newsbeitrag
> > news:4072C9B1.6060300@jplates.com...
> >
> >>Well, that's interesting, because I just re-enabled my SMAP generation
and
> >>have added the SourceDebugExtension attribute to the class-files, and
the
> >>Eclipse debugger completely ignores those attributes.
> >>
> >>As far as I can tell, the JavaSourceLocator is still 100% Java-centric,
so
> >>extending a Java-project with other languages still seems to require a
new
> >>SourceLocator.
> >>
> >>Can anyone from the Eclipse project confirm this and offer some guidance
> >
> > on
> >
> >>the right way to direct the debugger to use the *real* source file?
> >>
> >>I am modifying the ClassName attribute in the class-file to point to my
> >>JPlates source file, and adding a properly formed SourceDebugExtension
> >
> > SMAP
> >
> >>attribute, but the debugger does not open or use the JPlates sources,
but
> >>always resolves classes to the generated Java sources.
> >>
> >>Thanks,
> >>-- Dan
> >
> >
> >
>
Previous Topic:Replace JBuilder Pro v5 with Eclipse?
Next Topic:Eclipse M8 + XDoclet
Goto Forum:
  


Current Time: Thu Jul 18 06:40:55 GMT 2024

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

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

Back to the top