|
Re: error icon on file not visible [message #1498330 is a reply to message #1495645] |
Thu, 04 December 2014 10:28 |
|
Hi,
Le 02/12/2014 12:37, Koen Staal a écrit :
> In my project the user sees the red cross icon on the file containing
> an error and the folders above. When the modelling nature is added to
> the project the red cross dissapears on the file (not on the folders).
> How can i have the modelling nature and keep the error icon on the file?
>
> I can get information about the content extension which probably causes
> the problem
>
> IWorkbenchPage page =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
> ProjectExplorer expl = (ProjectExplorer)
> page.findView(IPageLayout.ID_PROJECT_EXPLORER);
> INavigatorContentService content = expl.getNavigatorContentService();
> INavigatorContentExtension siriusext =
> content.getContentExtensionById("org.eclipse.sirius.ui.resource.content.session");
>
> siriusext.getDescriptor().getAppearsBeforeId();
>
> The problem is probably that the sirius INavigatorContentService is set
> to appear before id "org.eclipse.jdt.java.ui.javaContent"
> (siriusext.getDescriptor().getAppearsBeforeId())
I think I found a second candidate: SiriusCommonLabelProvider.getImage
which has a specific case for IFile to add the M decorator, I remember
we made it like this and not with the decorator extension point to avoid
loading Sirius too soon. But it seems we have to re-check it and find a
way to keep the other decorators like your red cross decorator.
>
> How can i (have the modelling nature and) keep the error icon on the file?
Unfortunately, regarding the SCLP.getImage method, I think there is no
current solution if you use the Sirius content extension.
Could you create a bugzilla [1] for this issue ?
>
> Any help is appreciated!
>
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=sirius
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: error icon on file not visible [message #1498342 is a reply to message #1498330] |
Thu, 04 December 2014 10:40 |
|
A workaround could be to try to provide your own navigator content with
an Override element targeting the Sirius Content Management
(org.eclipse.sirius.ui.resource.content.session) as suppressed extension
and provide your own label provider (which could extend the Sirius one
and specifically handle the file case in getImage, but you might loose
the M decorator on files handled by Sirius).
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
Le 04/12/2014 11:28, Maxime Porhel a écrit :
> Hi,
>
> Le 02/12/2014 12:37, Koen Staal a écrit :
>> In my project the user sees the red cross icon on the file containing
>> an error and the folders above. When the modelling nature is added to
>> the project the red cross dissapears on the file (not on the folders).
>> How can i have the modelling nature and keep the error icon on the file?
>>
>> I can get information about the content extension which probably causes
>> the problem
>>
>> IWorkbenchPage page =
>> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
>> ProjectExplorer expl = (ProjectExplorer)
>> page.findView(IPageLayout.ID_PROJECT_EXPLORER);
>> INavigatorContentService content = expl.getNavigatorContentService();
>> INavigatorContentExtension siriusext =
>> content.getContentExtensionById("org.eclipse.sirius.ui.resource.content.session");
>>
>>
>> siriusext.getDescriptor().getAppearsBeforeId();
>>
>> The problem is probably that the sirius INavigatorContentService is set
>> to appear before id "org.eclipse.jdt.java.ui.javaContent"
>> (siriusext.getDescriptor().getAppearsBeforeId())
>
> I think I found a second candidate: SiriusCommonLabelProvider.getImage
> which has a specific case for IFile to add the M decorator, I remember
> we made it like this and not with the decorator extension point to avoid
> loading Sirius too soon. But it seems we have to re-check it and find a
> way to keep the other decorators like your red cross decorator.
>
>>
>> How can i (have the modelling nature and) keep the error icon on the
>> file?
>
> Unfortunately, regarding the SCLP.getImage method, I think there is no
> current solution if you use the Sirius content extension.
>
> Could you create a bugzilla [1] for this issue ?
>
>>
>> Any help is appreciated!
>>
>
> Regards
>
>
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03151 seconds