Bug 516152 - Show diagrams in the aird file with the common navigator without showing the contents of semantic model files
Summary: Show diagrams in the aird file with the common navigator without showing the ...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-05-04 02:03 EDT by Koen Staal CLA
Modified: 2017-05-10 04:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Koen Staal CLA 2017-05-04 02:03:01 EDT
When working with Xtext and Sirius it is helpfull to have an overview of the diagrams inside the aird file, but not show the contents of the semantic model files. 
Sirius Content Management also shows the contents of Xtext DSL files which is unnecessary and maybe confusing for the DSL users. 
For example see slide 13 of https://www.slideshare.net/Obeo_corp/siriuscon2016-integrating-textual-and-graphical-editing-in-the-poosl-ide. This could be solved by a Common Navigator filter.
Comment 1 Laurent Redor CLA 2017-05-05 10:11:29 EDT
Thanks for your detailed enhancement submit.

Nevertheless, we have currently not planned to work on it in the following releases.

But you can provide your own filter by using something like:

   <extension
         point="org.eclipse.ui.navigator.navigatorContent">
      <commonFilter
            activeByDefault="false"
            class="myPackage.MyViewerFilter"
            id="test.myFilter"
            name="My filter"
            visibleInUI="true">
      </commonFilter>
   </extension>
   <extension
         point="org.eclipse.ui.navigator.viewer">
     <viewerContentBinding
           viewerId="org.eclipse.sirius.ui.tools.views.model.explorer">
        <includes>
        <contentExtension pattern="test.*"/>
        </includes>
     </viewerContentBinding>
   </extension>
Comment 2 Koen Staal CLA 2017-05-10 04:43:01 EDT
(In reply to Laurent Redor from comment #1)
> Thanks for your detailed enhancement submit.
> 
> Nevertheless, we have currently not planned to work on it in the following
> releases.
> 
> But you can provide your own filter by using something like:
> 
>    <extension
>          point="org.eclipse.ui.navigator.navigatorContent">
>       <commonFilter
>             activeByDefault="false"
>             class="myPackage.MyViewerFilter"
>             id="test.myFilter"
>             name="My filter"
>             visibleInUI="true">
>       </commonFilter>
>    </extension>
>    <extension
>          point="org.eclipse.ui.navigator.viewer">
>      <viewerContentBinding
>            viewerId="org.eclipse.sirius.ui.tools.views.model.explorer">
>         <includes>
>         <contentExtension pattern="test.*"/>
>         </includes>
>      </viewerContentBinding>
>    </extension>

Thanks for your suggestion. 
However there are 2 problems with this solution. It hides the error/warning decorator on the file, we made a bug report of this a while back: https://bugs.eclipse.org/bugs/show_bug.cgi?id=454424 

The file will still have the expandable indicator (little triangle) infront of the model file until eclipse actually tries to expand it. Only then the filter gets applied and the triangle dissapears (because there is nothing to show)