Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create a working set with the files open in the current editor?

Is it possible for Eclipse to create a new working set with all of the files open in the current (Java) editor?

As far as I can tell, the only way to do this is to manually select each file in the project explorer.

like image 612
Jeff Axelrod Avatar asked Mar 03 '12 16:03

Jeff Axelrod


1 Answers

Option #1: Check out the Extended VS Presentation plugin.

After installing, you can go to Window > Editing Sessions > Save Opened Editors to Session to save your opened files as a list. You can have any number of file sets (called "sessions" in the plugin).

To reopen a previous set of files, go to Window > Editing Sessions > Load Session.

Compatibility Note: The plugin is stated to support Eclipse only up to 3.8, but I was able to install it in 4.5.2 just fine. It seems that the theme is not present, but the Editing Sessions menu option is definitely there.


Option #2: Just go with Mylyn (included with nearly every Eclipse build now). Mylyn does do a bit more than requested, going as far as collapsing what it determines to be irrelevant code blocks and even offering a filtered view of your file system (this can be disabled by turning off the Focus on Active Task toggle in your file explorer).

To see Mylyn in action:

  1. Open your Task List view (Window > Show View > Task List).
  2. Right-click in the white space.
  3. In the context menu, select New > Local Task.
  4. Enter a name for the task.
  5. Press Ctrl + S to save.
  6. At the top left, click the bluish-gray circle to "activate" the task. (This can also be done by going to the Task List view, right-clicking the task, then clicking Activate.... Warning: Activating a new task will close all of your opened editor tabs.
  7. As you open files, they will be added to the active task's "context." You can manipulate the context by double-clicking your task in the Task List view then clicking on the Context tab at the bottom of the task editor. Right-click an element and select Remove from Context to disassociate it from the task.

Tip: When you're done working on a particular task, be sure to go to the Task List view, right-click the task, and choose Deactivate to prevent files from being added to a task's context unintentionally.

like image 70
Mark Bembnowski Avatar answered Oct 27 '22 00:10

Mark Bembnowski