Skip to content
Advertisement

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?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement