Repository navigation
Conversation
c24bc83 to
f72f72d
Compare
|
@merks Could you check this? |
f72f72d to
79ce847
Compare
|
I wonder whether instead of "Highlight" and "Highlights" view we simply can use "Bookmark" wording and "Bookmarks" view. The proposed feature is "just" extending bookmarks functionality from editors to any resource in the explorers. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Highlighting is invisible by default, and the new view and theme-refresh behavior contain functional issues.
Review effort: Balanced
Findings: 4
Open (9)
Populate or derive a valid location for highlight markers · New Preserve marker type semantics in the generic type field · New Provide a visible default distinction for highlighted resources · New Invalidate highlight decorations when the current theme changes · New Correct the class @since tag to 3.24 · New Externalize highlighted resource type labels for translation · New Externalize file labels and extension-specific marker text · New Correct the view @since tag to 3.24 · New Add tests for persistent marker lifecycle transitions · New
What changed in this PR
Adds persistent resource highlighting across Eclipse explorers, backed by workspace markers and exposed through a dedicated Highlights view.
Changes:
- Adds highlight marker management, context-menu toggling, and label decoration.
- Adds configurable highlight coloring.
- Adds a marker-based view listing highlighted resources.
| File | Description |
|---|---|
ResourceHighlightManager.java |
Manages persistent highlight markers. |
ResourceHighlightDecorator.java |
Applies highlight styling and refreshes labels. |
ToggleHighlightHandler.java |
Toggles highlights for selected resources. |
org.eclipse.ui.navigator.resources/plugin.xml |
Registers commands, menu, decorator, color, and marker. |
org.eclipse.ui.navigator.resources/plugin.properties |
Adds localized extension labels. |
MarkerSupportRegistry.java |
Defines the Highlights generator ID. |
MarkerTypeField.java |
Special-cases highlight marker display. |
HighlightResourceTypeField.java |
Displays highlighted resource types. |
HighlightedResourcesView.java |
Implements the Highlights view. |
org.eclipse.ui.ide/plugin.xml |
Registers the view and marker columns. |
org.eclipse.ui.ide/plugin.properties |
Adds view and field labels. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
@iloveeclipse |
Not same name, same view. Just use same view to manage bookmarks, independently whether they are created for a text editor or for a resource in explorer. |
|
It seems an appealing suggestion. Less is more... |
Yes, that's possible. I will update the PR accordingly. |
|
Also I wonder if the "highlight" which is currently shown only as color could be changed and additionally provide a "bookmark" overlay in the top right corner of the element in the explorers. In your video where just color is used, it is barely different from the rest. Also consider color blind people here which might not notice color if set anyway. |
|
Yes |
|
Maybe design experts have advice to share? |
79ce847 to
05692fe
Compare
05692fe to
ef254e1
Compare
|
@iloveeclipse any more suggestions or changes on this? |
|
I just checked the behavior, not the code. Few points:
Beside this, it seem to work as expected, at least for me. |
|
@iloveeclipse @elsazac
|
Sure. I will bring the content menu to the top, below "Show In".
I will rename it.
The original code for bookmarks added from the editor did not include the overlay icon, and I haven’t made any changes to that existing functionality. However, I agree that displaying the icon consistently across all bookmark entries, regardless of how they were added, makes it more consistent. I will make those changes as well. |
Yes, I think using a more prominent color, like the one in Variables view, would make it much more recognizable and easier to distinguish. |
ef254e1 to
2c6f26b
Compare
70bd339 to
dc54aac
Compare
9460cc6 to
a5a1280
Compare
a5a1280 to
ee590cf
Compare
|
Hi @iloveeclipse |
|
There's almost no runway left. What do you think? I've not had time to test yet... |
|
I had no time to test it yet. |
|
ResourceBookmarkDecoratorTest seem to be a new test, but it is not added to the testsuite? |
|
new command, ToggleBookmarkHandler and operation are not tested at all. |
This test was added as suggested by the copilot here #4414 (comment)
Does that mean it should be added here as well? tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java |
|
@elsazac : please add tests, make sure new test class is added to testsuite. If that would be available & working tomorrow, we should be ready to merge for M3. Otherwise I have bad feeling to submit new feature with zero test coverage, even if it "works for me". |
Most likely yes, I don't have IDE right now. |
dd51272 to
2d74cba
Compare
|
SetMarkerOperationTest.java is added two times? |
This commit introduces a feature to bookmark a resource by applying a configurable theme foreground color to resources in the explorer and highlight them.These highlighted resources also has entries in the Eclipse Marker's view with Resource, Path, Location, and Type columns.
2d74cba to
116da67
Compare
Sorry that, one of those got added by mistake; removed it now. |
116da67 to
5043bbf
Compare
|
I still can only see font changed on packages / folders but not on single files, see #4414 (comment).
It seems that the decorator order or priority matters. I see that same file changed in git is not having the font applied, but only the overlay icon. I can't see here why some files are highlighted and some not. In my example it seems to be broken for files changed in git and to for files not added & ignored in git. |
5043bbf to
116da67
Compare












Refs: #4336 and eclipse-jdt/eclipse.jdt.ui#3135
This PR adds a new highlight feature to the Eclipse explorers. It allows users to mark individual files with
255,0,0text color as default foreground color along with bold font for the text, making important files easier to identify quickly. This also adds a bookmark overlay icon to the resources in order to make it easily recognizable.In large Eclipse workspaces with many projects and files, it can be difficult to find the files you need.
For example:
E1.mov
Project Explorer :

Package Explorer :

This feature allows to Bookmark resources directly from the explorers context menu using the "Toggle Bookmark" context menu option. Bookmarked resources are visually distinguished in the explorer with a configurable foreground color defined under
Window > Preferences > General > Appearance > Colors and Fonts.To enable the option right click on the resource and click on "Toggle Bookmark". To remove the bookmark, right-click the resource and select it again. The Bookmark is then removed.
The bookmarked entries are also available inside the bookmarks view. The resources will also have a bookmark overlay icon to make it visually recognizable.