Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Eclipse Mylyn useful?

In my Eclipse Preferences -> Java -> Editor -> Content Assist -> Advanced settings, I see the following:

  • Java Non-Type Proposals
  • Java Proposals
  • Java Proposals (Task-focused)
  • Java Type Proposals
  • JPA Proposals (is always empty for me)
  • PDE API Tools Proposals (gets skipped when checked in the Content-Assist Cycling settings)
  • SWT Template Proposals (always empty)
  • Template Proposals (always empty)
  • Word Proposals (gets skipped when checked in the Content-Assist Cycling settings)

I tried googling (separately) for "Java Non-Type Proposals" and "Java Proposals (Task-Focused)", but didn't find anything describing them.

The entries matching /Java ((Non-)?Type)? Proposals/ make sense to me, but the others don't.

So, what do the others do?

  • I've never seen a result for the PDE, SWT, Template or Word proposals. When are they useful?
  • I've also never really started using Mylyn, which I imagine is what provides "Java Proposals (Task-focused)". What would that buy me, if I'm not using a bug-tracker that Mylyn understands?
like image 716
Ed Brannin Avatar asked Oct 09 '09 12:10

Ed Brannin


People also ask

What is Java Mylyn?

Mylyn is the task and application lifecycle management (ALM) framework for Eclipse. It provides: The revolutionary task-focused interface. Realigns the IDE around tasks so that you see only the code that's relevant. A task management tool for developers.

What is Mylyn integration?

Mylyn is a task-focused interface that reduces the overload of information and makes multi-tasking easy. It does this by making tasks a top priority, and integrating rich and offline editing for repositories such as Bugzilla, Trac, and JIRA.

What is Eclipse task list?

Task List. Use the Task List to view and manage your tasks. If the task list view is not visible, you can open it by navigating to Window -> Show View -> Other... -> Mylyn -> Task List. The Task List contains both "Local Tasks" and shared repository tasks that are stored in a task repository such as Bugzilla or Trac.


3 Answers

I've also never really started using Mylyn, which I imagine is what provides "Java Proposals (Task-focused)". What would that buy me, if I'm not using a bug-tracker that Mylyn understands?

What you can do with Mylyn, even without an integrated bug tracker (in the Mylyn parlance, a "task repository"), is create tasks in your "local" repository, and use them to maintain the context of your different development tasks.

The context support in Mylyn is quite unique, although disconcerting when you first activate it for a new task, because what Mylyn does is filter the contents of windows like the Package Explorer so that only those artifacts are visible which you've visited while the task was activated, and now, since you have just activated a task for the first time, nothing has been visited, and the Package Explorer is blank!

What you'd probably want to do, assuming your task description was something like "Find the cause of the NPE in your.code.AbstractMappingParameter", is use Ctrl-shift-T (Open Type...) and navigate to that class. (Save yourself some typing and use the camel case support in the Open Task dialog: just type "AMP".) Your Package Explorer now shows that class, and the hierarchy above it (the file it's in, the package, and the project). The editor, if you've configured it to fold code automatically, will display each comment and method folded, so you can see more of the class that you usually might.

Visit a couple more files like that, and you start to build up your context, which Mylyn automatically saves along with the task. Your subsequent "Open Type..." searches now present in-context classes first, and the content-assist proposals you mentioned work also. NOTE: don't close files unless you think they're not relevant to the task. When you close an editor, the class/file/etc. is deleted from the context, and no longer appears in your Package Explorer. The average development task doesn't take more than a dozen or so files, a small-enough number of files and editor windows to keep open while you're working on it.

If you now created another task (locally, or in a repository), and then activated it, you would again start with a cleared Package Explorer, and would build up context as you worked.

Then, if you reactivated the first task, you'd see an interesting thing: the windows you have open will close, and the package explorer will clear, and then the contents of the explorer from the last time you worked on that task will appear, and all the windows you had opened at that time will now be opened again! You're back to work on it. It's very handy.

There's a brief summary of what you can do with Mylyn without an integrated repository. If you're curious to hear more, you might go to http://www.eclipse.org/mylyn/ and read what's there.

like image 92
Ladlestein Avatar answered Oct 19 '22 15:10

Ladlestein


For the Template Proposals and SWT Template Proposals that you see as always empty, you need to be typing something before invoking the content assist.

Try this to see:

  1. Window --> Show View --> Templates (to show a list of possible templates)
  2. In a Java class, set the cursor outside a method but within the class
  3. Type main then press Ctrl-Space
  4. The content assist should show
  5. Press Ctrl-Space again to switch to the 'Template Proposals'
  6. The 'main method' template should show here

You can try the same for the SWT Templates too, with an extra Ctrl-Space to switch to the SWT Templates. A good example is typing table as this will show templates for Table, TableColumn and TableItem.

Note you need to have SWT in the project for this to work.

like image 34
mecsco Avatar answered Oct 19 '22 17:10

mecsco


I've never seen a result for the PDE, SWT, Template or Word proposals. When are they useful?

Probably if you are working on a PDE or SWT project.

I've also never really started using Mylyn, which I imagine is what provides "Java Proposals (Task-focused)". What would that buy me, if I'm not using a bug-tracker that Mynlyn understands?

Again this is probably for uses cases (people using Mylyn) that aren't yours.

like image 1
matt b Avatar answered Oct 19 '22 16:10

matt b