Solved

To Do in java

Posted on 2014-02-28
12
583 Views
Last Modified: 2014-04-03
Hi,

I am working in eclipse and coding on it some java web applications. My question is how to put to do so that i can comeback to that part of the code later. How do i come back for that particular To Do if there are 100 To D0 I put. can I uniquely name or number them?



please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
  • 4
  • 3
  • 3
  • +1
12 Comments
 
LVL 14

Assisted Solution

by:CPColin
CPColin earned 100 total points
ID: 39895289
Eclipse will highlight lines that contain the word "TODO" or "FIXME" in a comment. Usually when I wrap up a project, I do a text search for the word "TODO" and clean up what I have left over. You can definitely number them or put extra explanations next to them.

I think Eclipse even shows TODO's in the "Markers" view.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39895867
how to automcatically add TODO without typing. Any shortcut for that?
0
 
LVL 14

Expert Comment

by:CPColin
ID: 39895886
Not that I know of.
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 19

Assisted Solution

by:Ken Butters
Ken Butters earned 100 total points
ID: 39896235
Another thing you can do is add bookmarks.

You can add a bookmark in similar way that you can add a break-point.

When you add a bookmark you can name it anything you want.

Then to go to that bookmark, you just open up the bookmark view, and click on the named bookmark that you want to go to.

This doesn't impact your code... it's just part of eclipse.

Go to eclipse Help / search for "bookmark" for more detailed information.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39900757
How to type TODO

just type like

// TODO

or do i need to give space in between TO and DO and also space after //
Please advise
0
 
LVL 14

Expert Comment

by:CPColin
ID: 39900783
Just try it; Eclipse will make the font bold and put a blue mark along the right edge of the window when you get it right.
0
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39901257
The trigger is to just have "TODO" inside of a comment.

By default it is case sensitive... so needs to be upper case TODO.

You can view all of your TODO tasks in a separate window pane easily by going to Window / Show View / Tasks

A separate window will show all your tasks that have TODO on them. You can double click on TODO to open the source code that has that TODO in it.

Attached is the screenshot of the TODO where you could add other tags similar to the TODO if you wanted to.  I believe the default is to have a Fixme and xxx as well.  

(At least I don't remember customizing them for myself and I have those).
3-3-2014-1-04-00-PM.jpg
0
 
LVL 14

Accepted Solution

by:
Geisrud earned 300 total points
ID: 39904533
In addition to what others have said, use:  Window > Show View > Other... > General > Tasks to open the Tasks View.  This allows you to better manage your //TODO list.


Source:
http://www.dvteclipse.com/documentation/e/Track_Tasks_using_TODO_Markers.html

 I couldn't find a shortcut, but typing //TODO isn't really a lot of work.
0
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39904545
@Joe....

Thanks ... believe that opens the same tasks window as this from my prev comment:
You can view all of your TODO tasks in a separate window pane easily by going to Window / Show View / Tasks
Unless the tasks is not visible in your dropdown... but it should be if you are working the default Java perspective.
0
 
LVL 14

Expert Comment

by:Geisrud
ID: 39904598
You are correct - I didn't read very carefully.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39937638
I jsut copy pastef // TODO

 which worked fine
0
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39940899
If that is the solution you are happy with then you should award points to Joe.  He had that very suggestion:

 
I couldn't find a shortcut, but typing //TODO isn't really a lot of work.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question