Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How does the JDT's Java editor do the "TODO" feature?
How does the JDT's Java editor do the "TODO" feature? [message #249689] Mon, 19 November 2007 19:55 Go to next message
Eclipse UserFriend
Hi,

I am just wondering if the Java editor does it via a builder's help or
just plain text event listener? Could u point to where the code in the
JDT? Thanks.
Re: How does the JDT's Java editor do the "TODO" feature? [message #249694 is a reply to message #249689] Mon, 19 November 2007 20:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"AL" <unbonnevie@yahoo.com> wrote in message
news:fhtba2$sa2$1@build.eclipse.org...
> Hi,
>
> I am just wondering if the Java editor does it via a builder's help or
> just plain text event listener? Could u point to where the code in the
> JDT? Thanks.

What exactly is the "it" to which you're referring? The properties dialog
that lets you specify the text that will be considered a task, the parsing
of the Java code, highlighting in the editor, presentation in the Tasks
pane, indication in the gutter, ...?

At the platform level, TODO items are marker annotations (IMarker), just
like syntax errors. All the compiler has to do is find them in the code and
create the markers. If you look in org.eclipse.jdt.core, at
AbstractImageBuilder.acceptResult(), you'll see where compilation results
(which contain tasks and errors) get translated into markers.
Re: How does the JDT's Java editor do the "TODO" feature? [message #249710 is a reply to message #249689] Tue, 20 November 2007 03:07 Go to previous messageGo to next message
Eclipse UserFriend
AL wrote:

> Hi,
>
> I am just wondering if the Java editor does it via a builder's help or
> just plain text event listener? Could u point to where the code in
> the JDT? Thanks.

- JDT Core defines text tags (that can be set via prefs)
- JDT Core reports them as problems during reconcile
- JDT Core creates markers form them during the build process
- JDT Text displays and marks the tags in the editor

Dani
Re: How does the JDT's Java editor do the "TODO" feature? [message #250122 is a reply to message #249694] Sun, 09 December 2007 21:15 Go to previous message
Eclipse UserFriend
Walter Harley wrote:
> "AL" <unbonnevie@yahoo.com> wrote in message
> news:fhtba2$sa2$1@build.eclipse.org...
>> Hi,
>>
>> I am just wondering if the Java editor does it via a builder's help or
>> just plain text event listener? Could u point to where the code in the
>> JDT? Thanks.
>
> What exactly is the "it" to which you're referring? The properties dialog
> that lets you specify the text that will be considered a task, the parsing
> of the Java code, highlighting in the editor, presentation in the Tasks
> pane, indication in the gutter, ...?
>
> At the platform level, TODO items are marker annotations (IMarker), just
> like syntax errors. All the compiler has to do is find them in the code and
> create the markers. If you look in org.eclipse.jdt.core, at
> AbstractImageBuilder.acceptResult(), you'll see where compilation results
> (which contain tasks and errors) get translated into markers.
>
>

Dani understood the question I was asking...Yeah, I already know how to
do the above and how marker works. Thanks, anyway. My question was
mainly if "TODO" could be not even using a builder, that is, simply
listening to text event changes.
Previous Topic:JUnit remote test server code?
Next Topic:How to migrate my customized perspectives
Goto Forum:
  


Current Time: Fri Apr 18 07:09:44 EDT 2025

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

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

Back to the top