logo

Productivity Tip: TODO Items With Eclipse Java Code

When writing Java code in Domino Designer / Eclipse you can start a comment line like this:

//TODO Must remember to refactor this.

Then you will see a little blue tick mark in the left-hand side of the code pane, like so:

image

You also see blue marks on the right-hand gutter so you can jump to all points in the current code file where work is needed, as below:

image

Adding "todo" comments is a habit I've gotten in to over the years. They're a useful way to remind me to come back and fix something.

Recently I discovered there's also a Tasks view you can add in Eclipse that lists all the TODOs, as below:

image

This is all really useful. Or at least it would be, if it didn't rely on you being inside the code "project" with the TODO items in them. From what I can tell there's no way of showing all TODO items in all code inside the Workspace. It makes sense, I guess, but I'd love to find out it can be done. Anyone?

Anybody know any other coding productivity tips for Domino Designer?

Comments

  1. it's amazing how Lotus Notes developers find those features and create blogs about them whereas it is in the Java community standard knowledge..

    did you also know about the // FIXME tag? it's tracked the same..

    and if you search for "task tags" in the preferences of the designer you will find that you can even add your own Task tags

    1. that was a prodigiously snooty comment.

      Show the rest of this thread

    • avatar
    • ChrisC
    • Tue 21 Aug 2012 05:24 AM

    Yeah, Eclipse is full of lots of little goodies even simple things like code templates type "for" and ctrl-space...or sysout and ctrl-space. Someone on the created a template for iterating over documents (recycling).

    You probably know all of that - most of the community don't...

      • avatar
      • Jake Howlett
      • Tue 21 Aug 2012 05:28 AM

      I was aware of it but don't use it. Like the previous commentor pointed out, us Notes developers barely know how to code.

      Does templating work for LotusScript too? Appears not, which is a shame.

      Do you have the document/recycle loop template to hand?

  2. Thanks for the tip about the tasks view. Didn't know about that one :)

  3. I am a *big* fan of all the refactoring commands in Eclipse.

    Also cool are some code checkers. I use PMD and Checkstyle; they are really good but kind of chatty if you don't use them at the very beginning of your project. (Not sure you can load those in DDE, but they are cool in standalone Eclipses, which I prefer).

    Also, in standalone Eclipse environments you have some really good profilers to see where your code is taking the most time. VisualVM is simple to install and is in the JDK.

    In terms of pure productivity, I think that the keyboard shortcuts are invaluable.

    • avatar
    • ChrisC
    • Tue 21 Aug 2012 06:31 AM

    Jake,

    Sorry dont have the url to hand. I always use ths standard templates (I do a lot of XPages, RCP and Rational / Portal) and find it handy (and quick).

    Also another great little clip is to download a decompiler for eclipse. It will allow you to inspect all the API classes for Domino (and if you ever fancy all the XPages stuff too). I use

    http://java.decompiler.free.fr/?q=jdeclipse

    Since you are a consultant (like me) I find it really handy to use SVN. Should spend a few hours setting it up and finding out about it with Domino. Great for storing revisions, working in a shared environment with client teams etc...The idea is that all domino design elements are converted to files and then can be pushed into an SVN repository. This means that all changes to forms, views, agents etc can be logged and tracked. Helps working with teams too...and is essential I reckon when working with XPages.

      • avatar
      • Jake Howlett
      • Tue 21 Aug 2012 06:33 AM

      Funny you should mention SVN as I setup a github account just yesterday. Love it.

      Show the rest of this thread

    • avatar
    • ursus
    • Tue 21 Aug 2012 06:58 AM

    I would also like to set up Eclipse and SVN for Domino/Notes - do you have an article planed so I can save myself the work of looking it up? Do / can you have Eclipse saving/running directly to a .NSF or do you need to compile and then import it (as we are doing for a project currently)?

    1. While not SVN I use mercurial for source control. Works great. I did a couple of vidoes on how to get started over at xpages.tv.

  4. This is a really cool feature, I just discovered it myself last week.

    Once enabled ( preferences -> General -> Editors - Structured Editors -> Task Tags ) you can also use the comments in other places like css, themes and even in the XML for XPages. Just use the standard comment formatting for that language.

    1. Declan, you saved my day. Have been a happy user of the TODO tags in Java only - to have this working in CSS and XML including XPages source code is just great.

      Now if this would work for .js, .ssjs, .lss etc. additionally...

  5. Nice Tip Jake, Thanks.

    Michael overlooks the fact that many Domino developers who are either not yet or only just on 8x have had little exposure to Eclipse, and welcome such tips, which are what have made Codestore a 'go to' place over the years.

  6. Hi Jake

    I did not use the Tasks view myself - nice tip.

    And then something in return: I have configured the Problems view to only show problems in the current database ("project"). It turns out that this feature (of course) also works for Tasks ;-)

    This is what you do:

    1. Click on the menu icon at the right side of the Tasks view (its a small paper icon with an arrow at the top)

    2. Select "Configure contents...."

    3. Adjust the "Scope" section to suit your needs, e.g. "Any element" or "On working set"...

    Happy coding :-)

    /John

  7. I didn't see anyone mention Mylyn, it's a plug-in for eclipse (isn't everything?) that from what I understand so far, takes the Task List to the next level.

    I watched this video: http://tasktop.com/resources/videos/w-jax/kersten-keynote.html and liked what I saw, but I haven't got it all figured out yet.

    If I do get it figured out for Eclipse, or better yet Domino Designer, I'll post my findings here.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 21 Aug 2012

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content