Using Eclipse Mylyn to Focus on a Single Issue: Hide Unrelated Resources and Preserve Context
Learn how to use Eclipse Mylyn to concentrate on one issue: activate a task, auto‑filter resources, preserve breakpoints, and switch contexts without losing your place. A step‑by‑step guide with checks and recovery options.
02 Sept 2026, 08:49 UTC

Desired Outcome
When working on a large codebase, you often get distracted by unrelated files, breakpoints, and search results. Eclipse Mylyn lets you activate a single task, automatically filtering the Package Explorer, Outline, and search views to show only the resources that belong to that task’s context. The IDE remembers the set of open editors, breakpoints, and view layout for each task, so you can switch between work items without losing your place.
Prerequisites
- Installed Eclipse IDE (Kepler or newer). Mylyn is bundled from Eclipse 4.3 onward, but connectors may need manual installation.
- Access to a task repository (Bugzilla, JIRA, GitHub Issues, or a local task file). Repository credentials must be stored in the
Preferences → Team → Task Repositoriespage. - Connector plugin for the chosen repository. For example,
org.eclipse.mylyn.bugzilla.corefor Bugzilla ororg.eclipse.mylyn.jira.corefor JIRA. - Sufficient RAM (Mylyn can increase memory usage by 50–100 MB for large repos).
Focused Procedure
- Verify Task Repository Connectivity
- Open
Window → Show View → Task List. - Click the
Add Repositorybutton, choose the appropriate connector, and enter URL, username, and password. - After saving, the repository should appear in the Task List with a list of tasks.
- Open
- Activate a Task
- In the Task List, double‑click the task you want to work on, or right‑click and select
Activate. - Mylyn will automatically filter the Package Explorer to show only the projects, packages, and files referenced by the task’s context. The Outline view will also be filtered.
- Any open editors that are not part of the context will be closed; breakpoints outside the context are hidden.
- In the Task List, double‑click the task you want to work on, or right‑click and select
- Work in Context
- Open files, edit code, and run tests as usual. All changes are recorded in the task’s context.
- Use
Search → File SearchorSearch → Java Search; results will be limited to the context.
- Switch to Another Task
- Double‑click a different task in the Task List.
- Mylyn restores the previous task’s context: the set of open editors, breakpoints, and view layout reverts to what was saved when that task was last activated.
- Synchronize Offline Work
- When you have no network, continue editing. Mylyn stores changes locally.
- Once connectivity is restored, right‑click the task and choose
Synchronizeto push changes to the repository.
Expected Checks
- After activating a task, the Package Explorer should display only files referenced in the task’s context. Verify by scrolling through the tree.
- Open the
Breakpointsview; breakpoints outside the context should be hidden. - Switch tasks and confirm that the previously open editors are closed and the new context’s editors are opened.
- Use
Preferences → General → Workspace → Save automatically before buildto ensure context changes are persisted.
Recovery Options
- If Mylyn fails to activate a task and the IDE keeps showing the previous context, reset the Task List:
- Right‑click the repository in Task List and choose
Reset. - Alternatively, close Eclipse and delete the
.mylynfolder in your workspace (be aware this removes all contexts).
- Right‑click the repository in Task List and choose
- To disable Mylyn temporarily, go to
Preferences → General → Mylynand uncheckEnable Mylyn. Restart Eclipse. - If memory usage becomes a problem, increase the JVM heap via
eclipse.ini(e.g.,-Xmx2g) or reduce the number of active contexts.
Concrete Example: Activating a JIRA Issue
# 1. Add JIRA repository
# 2. Repository URL: https://jira.company.com
# 3. Username: alice
# 4. Password: (securely stored in Eclipse)
# 5. Task ID: PROJ-123
After adding the repository, double‑click PROJ-123 in the Task List. The Package Explorer now shows only the src/main/java/com/company/project package, and the Outline view lists only the classes referenced by the issue’s description. Breakpoints set in Helper.java remain active, while those in unrelated modules are hidden. Switching to PROJ-456 restores the context for that issue, closing Helper.java and opening Service.java.
Limitations & Practical Verification
- Mylyn’s filtering is based on the
contextmetadata stored with the task. If a task’s context is empty (e.g., a new issue with no referenced files), no filtering occurs. - Large repositories can slow down context loading. Monitor the
Problemsview for anyMylynwarnings. - Verify context persistence by restarting Eclipse and re‑activating a task; the same set of editors and breakpoints should reopen.
Conclusion
Mylyn transforms Eclipse from a general IDE into a focused work environment. By activating a single task, you reduce clutter, preserve context across sessions, and keep your workflow tightly coupled to the issue at hand. Just remember to keep connectors up‑to‑date and monitor memory usage when working with large codebases.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.