Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Can I have problem marks in the Resource Navigator icons?
Can I have problem marks in the Resource Navigator icons? [message #771990] Wed, 28 December 2011 13:34 Go to next message
Eclipse UserFriend
I have extended the CommonNavigator and LabelProvider and ResourceExtensionLabelProvider supplies correct icons for my editable files. I want to the file and all its parent folders decorated with error marks, when problems happen.
Re: Can I have problem marks in the Resource Navigator icons? [message #772011 is a reply to message #771990] Wed, 28 December 2011 14:39 Go to previous messageGo to next message
Eclipse UserFriend
I have just realized that it is "Project Explorer" that normally provides the error mark decorations. Can I subclass from "Project Explorer" rather than from CommonNavigator?


I see that Project Explorer is defined in org.eclipse.ui.navigator.resources:
final class ProjectExplorer extends CommonNavigator

[Updated on: Thu, 29 December 2011 05:40] by Moderator

Re: Can I have problem marks in the Resource Navigator icons? [message #772383 is a reply to message #771990] Thu, 29 December 2011 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Subclassing the ProjectExplorer is not going to get what you want. Unfortunately, though it's possible to add problems markers to the CommonNavigator, it's not currently easy. You will need to look at the JDT code for how they do it. There is an outstanding bug on this to make it more easy.
Re: Can I have problem marks in the Resource Navigator icons? [message #772452 is a reply to message #772011] Thu, 29 December 2011 15:29 Go to previous messageGo to next message
Eclipse UserFriend
I have discovered that NavigatorContentService.findPossibleLabelExtensions returns my custom NavigatorContentDescriptor and "Resources" whereas ProjectExplorer resources are described by "Working Set" and "Java Elements" extensions. Java Elements have the ProblemLabelDecorator.

How do I use it for my resources by default, so that if no custom label provider is found - use Java Elements?

[Updated on: Thu, 29 December 2011 15:29] by Moderator

Re: Can I have problem marks in the Resource Navigator icons? [message #773047 is a reply to message #772383] Sat, 31 December 2011 04:53 Go to previous messageGo to next message
Eclipse UserFriend
After a while of hacking, I obtained the problem markers. In order to get them, you need

<contentExtension pattern="org.eclipse.jdt.java.ui.javaContent"/>

in the

<viewerContentBinding viewerId="your navigator id">
<includes>
Re: Can I have problem marks in the Resource Navigator icons? [message #773053 is a reply to message #773047] Sat, 31 December 2011 05:16 Go to previous messageGo to next message
Eclipse UserFriend
Nice job, and my answer was probably not too helpful. I was thinking of it in terms of general problem markers and not the ones generated by JDT. Of course you are right.
Re: Can I have problem marks in the Resource Navigator icons? [message #783195 is a reply to message #773053] Wed, 25 January 2012 04:11 Go to previous message
Eclipse UserFriend
You can even have markers in the title of you Editor!

Unfortunately, the icons disappear for text files in some environments,
http://www.eclipse.org/forums/index.php/m/779463/#msg_779463

But, there is only one thing that I do not understand: Why this stuff is part of JDT rather than the basic TextEditor and CommonNavigator? If default TextEditor does not show error marks in the title, might be it should not show the annotations in the margins either?

[Updated on: Mon, 20 February 2012 12:42] by Moderator

Previous Topic:AntRun not found
Next Topic:Expression-bases Activities always disabled
Goto Forum:
  


Current Time: Sun Aug 31 10:21:51 EDT 2025

Powered by FUDForum. Page generated in 0.03630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top