Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » error icon on file not visible(error icon on file dissapears when adding modelling nature )
error icon on file not visible [message #1495645] Tue, 02 December 2014 11:37 Go to next message
Koen Staal is currently offline Koen StaalFriend
Messages: 70
Registered: October 2014
Member
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())

How can i (have the modelling nature and) keep the error icon on the file?

Any help is appreciated!
Re: error icon on file not visible [message #1498330 is a reply to message #1495645] Thu, 04 December 2014 10:28 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
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

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: error icon on file not visible [message #1498342 is a reply to message #1498330] Thu, 04 December 2014 10:40 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
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

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: error icon on file not visible [message #1503452 is a reply to message #1498342] Mon, 08 December 2014 13:33 Go to previous message
Koen Staal is currently offline Koen StaalFriend
Messages: 70
Registered: October 2014
Member
For now i removed the sirius extension in the project explorer since we do not rely on navigation from the project explorer. Thanks for your input
Previous Topic:Problem to modify diagram element in Java Class
Next Topic:Newline option not available when table is empty
Goto Forum:
  


Current Time: Sun Mar 29 07:15:50 GMT 2020

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

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

Back to the top