Eclipse Cookbook
Authors: Holzner S.
Published year: 2006
Pages: 40-42/232
Buy this book on amazon.com >>
     

Recipe 2.12 Displaying More Resource Information with Icons

2.12.1 Problem

You want to turn on label decorators to get additional information about icons and buttons .

2.12.2 Solution

Select Window Preferences Workbench Label Decorations.

2.12.3 Discussion

Label decorations augment the standard Eclipse icons displayed in various views. For example, if you archive a code file in a CVS repository and have label decorations turned on, the file's icon displays a small gold cylinder that isn't there otherwise .

To turn on label decorations, select Window Preferences Workbench Label Decorations, and select which decoration you want to use, as shown in Figure 2-10.

Figure 2-10. Selecting label decorations
figs/ecb_0210.gif

We're going to use label decorations with Eclipse and CVS in Chapter 6. Once you've turned on label decorations, you can see at a glance which files have been stored in the CVS repository.

2.12.4 See Also

Recipe 6.6 on labeling files using version control.

     

Recipe 2.13 Using a Different Workspace

2.13.1 Problem

You want to use a nondefault workspace for an Eclipse project.

2.13.2 Solution

Uncheck the "Use default" checkbox when you name the project in the first pane of the New Project dialog, and fill in the directory you want to use instead.

2.13.3 Discussion

When you create a new Eclipse project, Eclipse stores it in its workspace directory by default. You can, however, make it use another directory, regardless of the type of Eclipse project you're creating. To select a different location, uncheck the "Use default" checkbox when you name the new project in the first pane of the New Project dialog. Then fill in the directory you want to use instead.

You can see how this works in Figure 2-11, in which a new Java project is created and stored in the directory c:\myworkspace .

Figure 2-11. Creating a custom workspace
figs/ecb_0211.gif

Using a nondefault workspace is a good idea in many cases. For example, you might be working with code on a network. In this case, you should store the code where other software can use it (in Chapter 8, we're going to store and develop code where the Tomcat web server can find it, which means using the Tomcat installation's webapps directory as the workspace). It's also a good idea to use a nondefault workspace if you want to keep some software, as in a beta version you're developing, separate from the current version of the software.

     

Recipe 2.14 Creating a Task

2.14.1 Problem

Eclipse tasks in the Tasks view serve as reminders of things you need to do. For example, compilation errors appear in the Tasks view; you can click them to jump to the lines containing the errors. So, how can you add and manage your own tasks to the Tasks view?

2.14.2 Solution

You can create a task in the Tasks view by right-clicking the view and selecting New Task. This opens the New Task dialog, in which you can create the task.

2.14.3 Discussion

The New Task dialog is shown in Figure 2-12. Enter the name of the new task, select a priority level, and click OK.

Figure 2-12. Creating a new task
figs/ecb_0212.gif

You also can create a new task by right-clicking the marker bar in an editor and selecting Add Task. You can also click the button with three + signs in the Tasks view's toolbar.


The new task will appear in the Tasks view, as shown in Figure 2-13.

Figure 2-13. The new task
figs/ecb_0213.gif

You can delete tasks you add to the Tasks view by right-clicking them and clicking the Delete button or by selecting the tasks and pressing the Delete key.

Tasks also have a completion status, which you can set by right-clicking the tasks and clicking Mark Completed. When you want to delete all completed tasks, right-click the Tasks view, and click Delete Completed Tasks.

2.14.4 See Also

Chapter 1 of Eclipse (O'Reilly).

Eclipse Cookbook
Authors: Holzner S.
Published year: 2006
Pages: 40-42/232
Buy this book on amazon.com >>

Similar books on Amazon