Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Barbin2015-08-21 15:54:06 +0000
committerFlorian Barbin2015-08-25 13:08:23 +0000
commit3e5fe2d5f3a1cba05c084490c9f43a4c62dbec15 (patch)
tree137ca870c9ef8a32d7669708a3230b21399780ff
parent99d08188a34dd5269fca743074d293938195d3e2 (diff)
downloadorg.eclipse.sirius-3e5fe2d5f3a1cba05c084490c9f43a4c62dbec15.tar.gz
org.eclipse.sirius-3e5fe2d5f3a1cba05c084490c9f43a4c62dbec15.tar.xz
org.eclipse.sirius-3e5fe2d5f3a1cba05c084490c9f43a4c62dbec15.zip
[460610] Reveal elements out of the screen during selection change.
* Adds a new method selectAndReveal on DialectUIServices interface. Bug: 460610 Change-Id: I37f98e887de2545aa51633297906111c7f4f563e Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/dialect/DiagramDialectUIServices.java21
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html31
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile1
-rw-r--r--plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/TableDialectUIServices.java30
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/TreeDialectUIServices.java29
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/dialect/DialectUIServices.java12
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/DialectUIManagerImpl.java30
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java2
8 files changed, 137 insertions, 19 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/dialect/DiagramDialectUIServices.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/dialect/DiagramDialectUIServices.java
index abf98b0984..b7f54d8982 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/dialect/DiagramDialectUIServices.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/business/internal/dialect/DiagramDialectUIServices.java
@@ -256,8 +256,8 @@ public class DiagramDialectUIServices implements DialectUIServices {
@Override
public void run() {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Viewpoints selection", "The current diagram requires some viewpoints selected (" + description
- + "), because some activated layers are contributed by these viewpoints");
+ MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Viewpoints selection",
+ "The current diagram requires some viewpoints selected (" + description + "), because some activated layers are contributed by these viewpoints");
}
});
@@ -643,6 +643,16 @@ public class DiagramDialectUIServices implements DialectUIServices {
*/
@Override
public void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
+ setSelection(dialectEditor, selection, false);
+ }
+
+ @Override
+ public void selectAndReveal(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
+ setSelection(dialectEditor, selection, true);
+
+ }
+
+ private void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection, boolean reveal) {
if (dialectEditor instanceof DiagramEditor && selection != null) {
DiagramEditor diagramEditor = (DiagramEditor) dialectEditor;
List<EditPart> selectedParts = Lists.newArrayList();
@@ -660,6 +670,9 @@ public class DiagramDialectUIServices implements DialectUIServices {
}
if (graphicalViewer != null) {
graphicalViewer.setSelection(new StructuredSelection(selectedParts));
+ if (reveal && !selectedParts.isEmpty()) {
+ graphicalViewer.reveal(selectedParts.get(0));
+ }
}
}
}
@@ -752,8 +765,8 @@ public class DiagramDialectUIServices implements DialectUIServices {
if (parentDiagramDescription.some()) {
parentPackage = parentDiagramDescription.get().eClass().getEPackage();
} else {
- Option<EObject> parentDiagramExtensionDescription = new EObjectQuery(eObject).getFirstAncestorOfType(org.eclipse.sirius.diagram.description.DescriptionPackage.eINSTANCE
- .getDiagramExtensionDescription());
+ Option<EObject> parentDiagramExtensionDescription = new EObjectQuery(eObject)
+ .getFirstAncestorOfType(org.eclipse.sirius.diagram.description.DescriptionPackage.eINSTANCE.getDiagramExtensionDescription());
if (parentDiagramExtensionDescription.some()) {
parentPackage = parentDiagramExtensionDescription.get().eClass().getEPackage();
}
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index 3818aea0d6..6fa82a9c20 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -72,7 +72,7 @@
<a href="./user/sequences/Sequence%20Diagrams.html#introduction">documentation</a> for details. Previously, the user has to explicitely disable the snap features.
</li>
<li><span class="label label-info">Modified</span> The Link with Editor behavior has changed. The link with editor was previously unidirectional from the Common Navigator (Model Explorer view or Project view) toward the active representation. By now, when selecting one or several elements in the representation, the corresponding semantic elements are selected in the Common Navigator.</li>
- <li><span class="label label-info">Modified</span> The &#171;Arrange Linked Bordered Nodes&#187; tabbar action has been renamed to &#171;Arrange Linked Border Nodes&#187; as it is border nodes which are layouted and not bordered nodes.</li>
+ <li><span class="label label-info">Modified</span> The &#8220;Arrange Linked Bordered Nodes&#8221; tabbar action has been renamed to &#8220;Arrange Linked Border Nodes&#8221; as it is border nodes which are layouted and not bordered nodes.</li>
</ul>
<h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3>
<ul>
@@ -88,7 +88,7 @@
</ul>
<h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3>
<h4 id="Partialsupportforinternationalization">Partial support for internationalization</h4>
- <p>Sirius 3.1 introduces partial support for internationalization: all literal strings from the runtime part of Sirius are now externalized and can be localized by third parties by providing the appropriate &#171;language packs&#187; as OSGi fragments. Note that this does not concern the VSM editor&#8217;s UI, the VSMs themselves, or the parts of the UI inherited from Eclipse/EMF/GEF/GMF and other libraries and frameworks used by Sirius.</p>
+ <p>Sirius 3.1 introduces partial support for internationalization: all literal strings from the runtime part of Sirius are now externalized and can be localized by third parties by providing the appropriate &#8220;language packs&#8221; as OSGi fragments. Note that this does not concern the VSM editor&#8217;s UI, the VSMs themselves, or the parts of the UI inherited from Eclipse/EMF/GEF/GMF and other libraries and frameworks used by Sirius.</p>
<p>Some API changes were required to enable this. While technically breaking changes if interpreting strictly the OSGi versioning rules, the major version number of the impacted bundles was not incremented as the changes only concern classes that should not impact the vast majority of users. Most breaking changes concern the plug-in/activator classes from each bundle. They are:</p>
<ul>
<li><span class="label label-success">Added</span>
@@ -309,6 +309,9 @@
<code>IEditorInput</code> can be reused by several instances of
<code>IEditorPart</code> through the navigation history view.
</li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.selectAndReveal(DialectEditor, List&lt;DRepresentationElement&gt;)</code> method has been added to explicitly indicate to reveal elements out of the screen (hidden because of the scrollbars location) when selecting them.
+ </li>
</ul>
<h4 id="Changesinorg.eclipse.sirius.diagram.ui">Changes in
<code>org.eclipse.sirius.diagram.ui</code>
@@ -432,7 +435,7 @@
</li>
<li><span class="label label-success">Added</span> On diagrams, it is now possible to set a custom background image on list containers.</li>
<li><span class="label label-info">Modified</span> In the
- <em>Viewpoint Selection</em> dialog and wizard page, the &#171;plug-in&#187; decorator for viewpoints loaded from plug-ins is removed, and a &#171;Folder&#187; decorator for viewpoints loaded from the current workspace has been added. This makes the icons more visible in the most common where viewpoints come from installed plug-ins.
+ <em>Viewpoint Selection</em> dialog and wizard page, the &#8220;plug-in&#8221; decorator for viewpoints loaded from plug-ins is removed, and a &#8220;Folder&#8221; decorator for viewpoints loaded from the current workspace has been added. This makes the icons more visible in the most common where viewpoints come from installed plug-ins.
</li>
</ul>
<h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
@@ -455,12 +458,12 @@
<li><span class="label label-success">Added</span> Compressed SVG images (
<code>*.svgz</code>) are now supported everywhere normal SVG images were supported.
</li>
- <li><span class="label label-success">Added</span> When developing a modeler in &#171;live mode&#187;, with the VSM in the same workspace as the sample session(s) which use it, VSM expressions which use
+ <li><span class="label label-success">Added</span> When developing a modeler in &#8220;live mode&#8221;, with the VSM in the same workspace as the sample session(s) which use it, VSM expressions which use
<code>service:</code> or
<code>aql:</code> can now invoke Java services which are defined in the workspace (with no need to launch a separate runtime).
</li>
<li><span class="label label-success">Added</span> A quick outline is now accessible in the VSM editor by using the shortcut <kbd>Ctrl+o</kbd>. It supports filtering on both an element&#8217;s name and properties for quick, keyboard-only navigation in complex VSMs.</li>
- <li><span class="label label-success">Added</span> The &#171;hide label by default capability&#187; has been added to the container styles.</li>
+ <li><span class="label label-success">Added</span> The &#8220;hide label by default capability&#8221; has been added to the container styles.</li>
<li><span class="label label-success">Added</span> In addition to
<em>Bold</em> and
<em>Italic</em>,
@@ -493,7 +496,7 @@
</li>
<li><span class="label label-success">Improved</span> The precision of the VSM validation, especially regarding the typing of computed expressions, has been greatly improved. Other validation rules like static image paths have also been added or improved.</li>
<li><span class="label label-info">Modified</span> In the VSM editor, the context menu entries (categories and items) have been reorganized to put most common actions/items first.</li>
- <li><span class="label label-info">Modified</span> In diagrams, the style previously named &#171;Lozenge&#187; is now called &#171;Diamond&#187;.</li>
+ <li><span class="label label-info">Modified</span> In diagrams, the style previously named &#8220;Lozenge&#8221; is now called &#8220;Diamond&#8221;.</li>
<li><span class="label label-info">Modified</span> In the
<em>Open</em> menu on a representation, the menu is computed from the navigation tool&#8217;s label instead of its name/id.
</li>
@@ -1369,13 +1372,13 @@
<img border="0" src="images/containerResize-changedBehavior.gif"/>
</p>
<ul>
- <li>The &#171;snap to shapes&#187; is now enabled by default (see
+ <li>The &#8220;snap to shapes&#8221; is now enabled by default (see
<em>Sirius &gt; Sirius Diagram &gt; Rulers and Grid</em> preference page). This is true only for new diagrams. The existing diagrams are not impacted.
</li>
- <li>The &#171;Navigate&#187; top-level contextual menu entry with mixed actions for creating new representations and opening existing ones has been changed by two top-level menus:
+ <li>The &#8220;Navigate&#8221; top-level contextual menu entry with mixed actions for creating new representations and opening existing ones has been changed by two top-level menus:
<ul>
- <li>One named &#171;New&#187;, which lists only the available actions to create new representations on the selected element.</li>
- <li>One named &#171;Open&#187;, which lists only the existing representations on the selected element. </li>
+ <li>One named &#8220;New&#8221;, which lists only the available actions to create new representations on the selected element.</li>
+ <li>One named &#8220;Open&#8221;, which lists only the existing representations on the selected element. </li>
</ul>
</li>
<li>When a shape is resized (no matter the direction), the edge(s) connection location (toward or from this one) is kept. Before that, edges connections moved according to the ratio of the resizing.</li>
@@ -1400,19 +1403,19 @@
<li>Distribute centers vertically</li>
</ul>
</li>
- <li>The end user can now remove all bend-points between the two edge ends. This action is available on edge context menu &#171;Remove Bend-points&#187; or by using the shortcut &#171;Ctrl&#187; + &#171;Shift&#187; + &#171;-&#187;.</li>
+ <li>The end user can now remove all bend-points between the two edge ends. This action is available on edge context menu &#8220;Remove Bend-points&#8221; or by using the shortcut &#8220;Ctrl&#8221; + &#8220;Shift&#8221; + &#8220;-&#8221;.</li>
<li>Reconnection of an edge will only now move the minimum necessary bendpoints instead of reseting it to default.</li>
<li>A new action has been added to reset the diagram (or container) origin: the diagram (or container) bounds (the rectangle formed by the highest, the leftmost, the lowest and the rightmost children elements) can have a negative origin or can be shifted toward the bottom-right with a blank zone at the top-left. This action aims to move all diagram (or container) elements so that the it retrieves its origin while keeping elements layout.</li>
</ul>
<h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3>
<ul>
- <li>The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the &#171;advance&#187; tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered. See
+ <li>The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the &#8220;advance&#8221; tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered. See
<a href="specifier/diagrams/Diagrams.html#edges_styles">Edges Styles &gt; Edge Centering</a> in the specifier manual for more details.
</li>
<li>When creating a new Viewpoint Specification Project using the supplied wizard:
- <em>New &gt; Viewpoint Specification Project</em>, the VSM name is now given according to the project name. If the project name is suffixed with &#171;design&#187;, the VSM name is provided by the last word before this suffix. Otherwise, the VSM name is given by the last word of the project name.
+ <em>New &gt; Viewpoint Specification Project</em>, the VSM name is now given according to the project name. If the project name is suffixed with &#8220;design&#8221;, the VSM name is provided by the last word before this suffix. Otherwise, the VSM name is given by the last word of the project name.
</li>
- <li>&#171;Lozenge&#187; is replaced by &#171;Diamond&#187; in diagram style.</li>
+ <li>&#8220;Lozenge&#8221; is replaced by &#8220;Diamond&#8221; in diagram style.</li>
</ul>
<h3 id="APIChanges">API Changes</h3>
<h4 id="Changesinorg.eclipse.sirius3">Changes in
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index 91fc801726..d759dbd4ea 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -79,6 +79,7 @@ h4. Changes in @org.eclipse.sirius.ui@
* <span class="label label-success">Added</span> @org.eclipse.sirius.ui.business.api.session.SessionEditorInput.getInput()@ method has been added to get the real input for a @DRepresentation@.
* <span class="label label-success">Added</span> @org.eclipse.sirius.ui.business.api.session.SessionEditorInput.getSession(boolean)@ method has been added to let the caller choose to create and open a new @Session@ or not when the known session is closed or does not exist. The @getSession@ method calls getSession(true).
* <span class="label label-warning">Deprecated</span> @org.eclipse.sirius.ui.business.api.session.SessionEditorInput.dispose()@ method has been deprecated as a @IEditorInput@ can be reused by several instances of @IEditorPart@ through the navigation history view.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.selectAndReveal(DialectEditor, List<DRepresentationElement>)@ method has been added to explicitly indicate to reveal elements out of the screen (hidden because of the scrollbars location) when selecting them.
h4. Changes in @org.eclipse.sirius.diagram.ui@
diff --git a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/TableDialectUIServices.java b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/TableDialectUIServices.java
index 2fb6aa265f..5dc2cd1ae9 100644
--- a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/TableDialectUIServices.java
+++ b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/business/internal/dialect/TableDialectUIServices.java
@@ -85,6 +85,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public IEditorPart openEditor(Session session, DRepresentation dRepresentation, IProgressMonitor monitor) {
IEditorPart editorPart = null;
try {
@@ -109,6 +110,7 @@ public class TableDialectUIServices implements DialectUIServices {
monitor.subTask("table opening : " + dRepresentation.getName());
RunnableWithResult<IEditorPart> runnable = new RunnableWithResult.Impl<IEditorPart>() {
+ @Override
public void run() {
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
@@ -136,6 +138,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideNewChildDescriptors() {
final Collection<CommandParameter> newChilds = new ArrayList<CommandParameter>();
newChilds.add(new CommandParameter(null, DescriptionPackage.Literals.VIEWPOINT__OWNED_REPRESENTATIONS, DescriptionFactory.eINSTANCE.createEditionTableDescription()));
@@ -147,6 +150,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideRepresentationCreationToolDescriptors(final Object feature) {
final Collection<CommandParameter> newChilds = new ArrayList<CommandParameter>();
TableCreationDescription tableCreationDescription = DescriptionFactory.eINSTANCE.createTableCreationDescription();
@@ -159,6 +163,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideRepresentationNavigationToolDescriptors(final Object feature) {
final Collection<CommandParameter> newChilds = new ArrayList<CommandParameter>();
TableNavigationDescription tableNavigationDescription = DescriptionFactory.eINSTANCE.createTableNavigationDescription();
@@ -171,6 +176,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* {@inheritDoc}
*/
+ @Override
public AdapterFactory createAdapterFactory() {
final ComposedAdapterFactory factory = new ComposedAdapterFactory();
factory.addAdapterFactory(new DescriptionItemProviderAdapterFactory());
@@ -183,6 +189,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandleEditor(org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean canHandleEditor(final IEditorPart editorPart) {
return editorPart instanceof AbstractDTableEditor;
}
@@ -193,6 +200,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#closeEditor(org.eclipse.ui.IEditorPart,
* boolean)
*/
+ @Override
public boolean closeEditor(final IEditorPart editorPart, final boolean save) {
final boolean result = true;
if (editorPart instanceof AbstractDTableEditor) {
@@ -200,6 +208,7 @@ public class TableDialectUIServices implements DialectUIServices {
// WorkspaceSynchronizer
final Display display = editorPart.getSite().getShell().getDisplay();
display.asyncExec(new Runnable() {
+ @Override
public void run() {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeEditor(editorPart, save);
}
@@ -214,6 +223,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationManagedByEditor(org.eclipse.sirius.viewpoint.DRepresentation,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationManagedByEditor(final DRepresentation representation, final IEditorPart editorPart) {
boolean isRepresentationManagedByEditor = false;
if (editorPart instanceof AbstractDTableEditor) {
@@ -231,6 +241,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationDescriptionManagedByEditor(org.eclipse.sirius.viewpoint.description.RepresentationDescription,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationDescriptionManagedByEditor(final RepresentationDescription representationDescription, final IEditorPart editor) {
if (editor instanceof AbstractDTableEditor) {
final AbstractDTableEditor tableEditor = (AbstractDTableEditor) editor;
@@ -244,6 +255,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.DRepresentation)
*/
+ @Override
public boolean canHandle(final DRepresentation representation) {
return representation instanceof DTable;
}
@@ -254,6 +266,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationDescription)
* )
*/
+ @Override
public boolean canHandle(final RepresentationDescription representation) {
return representation instanceof TableDescription;
}
@@ -264,6 +277,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription)
* )
*/
+ @Override
public boolean canHandle(final RepresentationExtensionDescription description) {
return false;
}
@@ -271,6 +285,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public boolean canExport(ExportFormat format) {
return format.getDocumentFormat().equals(ExportDocumentFormat.CSV);
}
@@ -281,6 +296,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#export(org.eclipse.sirius.viewpoint.DRepresentation,
* org.eclipse.sirius.business.api.session.Session)
*/
+ @Override
public void export(final DRepresentation representation, final Session session, final IPath path, final ExportFormat exportFormat, final IProgressMonitor monitor) {
String content = null;
if (exportFormat.getDocumentFormat().equals(ExportDocumentFormat.CSV)) {
@@ -294,6 +310,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public String getEditorName(DRepresentation representation) {
String editorName = representation.getName();
if (StringUtil.isEmpty(editorName)) {
@@ -305,6 +322,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideTools(EObject context) {
return Lists.newArrayList();
}
@@ -312,6 +330,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideAdditionalMappings(EObject object) {
return Lists.newArrayList();
}
@@ -321,6 +340,7 @@ public class TableDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getHierarchyLabelProvider(ILabelProvider)
*/
+ @Override
public ILabelProvider getHierarchyLabelProvider(ILabelProvider labelProvider) {
return new HierarchyLabelTableProvider(labelProvider);
@@ -329,6 +349,7 @@ public class TableDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
if (dialectEditor instanceof DTableEditor && dialectEditor instanceof IViewerProvider) {
Viewer viewer = ((IViewerProvider) dialectEditor).getViewer();
@@ -339,11 +360,17 @@ public class TableDialectUIServices implements DialectUIServices {
}
}
+ @Override
+ public void selectAndReveal(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
+ setSelection(dialectEditor, selection);
+ }
+
/**
* {@inheritDoc}
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getSelection(org.eclipse.sirius.ui.business.api.dialect.DialectEditor)
*/
+ @Override
public Collection<DSemanticDecorator> getSelection(DialectEditor editor) {
Collection<DSemanticDecorator> selection = Sets.newLinkedHashSet();
if (editor instanceof DTableEditor) {
@@ -364,6 +391,7 @@ public class TableDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#completeToolTipText(String,
* EObject, EStructuralFeature)
*/
+ @Override
public String completeToolTipText(String toolTipText, EObject eObject, EStructuralFeature feature) {
return toolTipText;
}
@@ -379,6 +407,8 @@ public class TableDialectUIServices implements DialectUIServices {
* .TableDialectUIServices.completeToolTipText(String, EObject,
* EStructuralFeature)
*/
+ @Deprecated
+ @Override
public String completeToolTipText(String toolTipText, EObject eObject) {
return toolTipText;
}
diff --git a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/TreeDialectUIServices.java b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/TreeDialectUIServices.java
index 942fa4f942..b7961fdb6a 100644
--- a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/TreeDialectUIServices.java
+++ b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/business/internal/dialect/TreeDialectUIServices.java
@@ -78,6 +78,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.DRepresentation)
*/
+ @Override
public boolean canHandle(DRepresentation representation) {
return representation instanceof DTree;
}
@@ -88,6 +89,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationDescription)
* )
*/
+ @Override
public boolean canHandle(final RepresentationDescription representation) {
return representation instanceof TreeDescription;
}
@@ -98,6 +100,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription)
* )
*/
+ @Override
public boolean canHandle(final RepresentationExtensionDescription description) {
return false;
}
@@ -107,6 +110,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandleEditor(org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean canHandleEditor(IEditorPart editorPart) {
return editorPart instanceof DTreeEditor;
}
@@ -114,6 +118,7 @@ public class TreeDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public IEditorPart openEditor(Session session, DRepresentation dRepresentation, IProgressMonitor monitor) {
IEditorPart editorPart = null;
try {
@@ -125,6 +130,7 @@ public class TreeDialectUIServices implements DialectUIServices {
monitor.worked(2);
monitor.subTask("tree opening : " + dRepresentation.getName());
RunnableWithResult<IEditorPart> runnable = new RunnableWithResult.Impl<IEditorPart>() {
+ @Override
public void run() {
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
@@ -153,6 +159,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getEditorName(org.eclipse.sirius.viewpoint.DRepresentation)
*/
+ @Override
public String getEditorName(DRepresentation representation) {
String editorName = representation.getName();
if (StringUtil.isEmpty(editorName)) {
@@ -164,6 +171,7 @@ public class TreeDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public boolean closeEditor(IEditorPart editorPart, boolean save) {
boolean result = false;
if (canHandleEditor(editorPart)) {
@@ -185,6 +193,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationManagedByEditor(org.eclipse.sirius.viewpoint.DRepresentation,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationManagedByEditor(DRepresentation representation, IEditorPart editorPart) {
boolean isRepresentationManagedByEditor = false;
if (canHandleEditor(editorPart)) {
@@ -200,6 +209,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationDescriptionManagedByEditor(org.eclipse.sirius.viewpoint.description.RepresentationDescription,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationDescriptionManagedByEditor(RepresentationDescription representationDescription, IEditorPart editorPart) {
if (canHandleEditor(editorPart)) {
DTreeEditor dtreeEditor = (DTreeEditor) editorPart;
@@ -214,6 +224,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#createAdapterFactory()
*/
+ @Override
public AdapterFactory createAdapterFactory() {
final ComposedAdapterFactory factory = new ComposedAdapterFactory();
factory.addAdapterFactory(new DescriptionItemProviderAdapterFactory());
@@ -226,6 +237,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canExport(org.eclipse.sirius.ui.business.api.dialect.ExportFormat)
*/
+ @Override
public boolean canExport(ExportFormat format) {
return false;
}
@@ -239,6 +251,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* org.eclipse.sirius.ui.business.api.dialect.ExportFormat,
* org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void export(DRepresentation representation, Session session, IPath path, ExportFormat format, IProgressMonitor monitor) {
// Nothing to do for trees.
}
@@ -248,6 +261,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#provideNewChildDescriptors()
*/
+ @Override
public Collection<CommandParameter> provideNewChildDescriptors() {
Collection<CommandParameter> newChilds = Lists.newArrayList();
TreeDescription treeDescription = org.eclipse.sirius.tree.description.DescriptionFactory.eINSTANCE.createTreeDescription();
@@ -260,6 +274,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#provideRepresentationCreationToolDescriptors(java.lang.Object)
*/
+ @Override
public Collection<CommandParameter> provideRepresentationCreationToolDescriptors(Object feature) {
Collection<CommandParameter> newChilds = Lists.newArrayList();
TreeCreationDescription treeCreationDescription = DescriptionFactory.eINSTANCE.createTreeCreationDescription();
@@ -273,6 +288,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#provideRepresentationNavigationToolDescriptors(java.lang.Object)
*/
+ @Override
public Collection<CommandParameter> provideRepresentationNavigationToolDescriptors(Object feature) {
Collection<CommandParameter> newChilds = Lists.newArrayList();
TreeNavigationDescription treeNavigationDescription = DescriptionFactory.eINSTANCE.createTreeNavigationDescription();
@@ -286,6 +302,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#provideTools(org.eclipse.emf.ecore.EObject)
*/
+ @Override
public Collection<CommandParameter> provideTools(EObject object) {
return Collections.emptyList();
}
@@ -295,6 +312,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#provideAdditionalMappings(org.eclipse.emf.ecore.EObject)
*/
+ @Override
public Collection<CommandParameter> provideAdditionalMappings(EObject object) {
return Collections.emptyList();
}
@@ -304,6 +322,7 @@ public class TreeDialectUIServices implements DialectUIServices {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getHierarchyLabelProvider(ILabelProvider)
*/
+ @Override
public ILabelProvider getHierarchyLabelProvider(ILabelProvider currentLabelProvider) {
return new HierarchyLabelTreeProvider(currentLabelProvider);
}
@@ -311,6 +330,7 @@ public class TreeDialectUIServices implements DialectUIServices {
/**
* {@inheritDoc}
*/
+ @Override
public void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
if (dialectEditor instanceof DTreeEditor) {
Viewer viewer = ((DTreeEditor) dialectEditor).getViewer();
@@ -321,11 +341,17 @@ public class TreeDialectUIServices implements DialectUIServices {
}
}
+ @Override
+ public void selectAndReveal(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
+ setSelection(dialectEditor, selection);
+ }
+
/**
* {@inheritDoc}
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getSelection(org.eclipse.sirius.ui.business.api.dialect.DialectEditor)
*/
+ @Override
public Collection<DSemanticDecorator> getSelection(DialectEditor editor) {
Collection<DSemanticDecorator> selection = Sets.newLinkedHashSet();
if (editor instanceof DTreeEditor) {
@@ -346,6 +372,7 @@ public class TreeDialectUIServices implements DialectUIServices {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#completeToolTipText(String,
* EObject, EStructuralFeature)
*/
+ @Override
public String completeToolTipText(String toolTipText, EObject eObject, EStructuralFeature feature) {
return toolTipText;
}
@@ -361,6 +388,8 @@ public class TreeDialectUIServices implements DialectUIServices {
* .TreeDialectUIServices.completeToolTipText(String, EObject,
* EStructuralFeature)
*/
+ @Deprecated
+ @Override
public String completeToolTipText(String toolTipText, EObject eObject) {
return toolTipText;
}
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/dialect/DialectUIServices.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/dialect/DialectUIServices.java
index 3d57c8439d..2895ecdbca 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/dialect/DialectUIServices.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/api/dialect/DialectUIServices.java
@@ -113,6 +113,17 @@ public interface DialectUIServices {
void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection);
/**
+ * Sets the given {@link DRepresentationElement}s as current selection for
+ * the editor and reveal the selection if needed.
+ *
+ * @param dialectEditor
+ * the editor which needs a selection update.
+ * @param selection
+ * the selection to set.
+ */
+ void selectAndReveal(DialectEditor dialectEditor, List<DRepresentationElement> selection);
+
+ /**
* Asks for the selection of the given editor.
*
* @param editor
@@ -290,5 +301,6 @@ public interface DialectUIServices {
* DialectUIServices.completeToolTipText(String, EObject,
* EStructuralFeature)
*/
+ @Deprecated
String completeToolTipText(String toolTipText, EObject eObject);
}
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/DialectUIManagerImpl.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/DialectUIManagerImpl.java
index 89aa772404..79f75a3ff5 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/DialectUIManagerImpl.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/DialectUIManagerImpl.java
@@ -83,6 +83,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public void disableDialectUI(final DialectUI dialect) {
dialects.remove(dialect.getName());
}
@@ -91,6 +92,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public void enableDialectUI(final DialectUI dialect) {
dialects.put(dialect.getName(), dialect);
}
@@ -98,6 +100,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
/**
* {@inheritDoc}
*/
+ @Override
public IEditorPart openEditor(Session session, DRepresentation dRepresentation, IProgressMonitor monitor) {
for (final DialectUI dialect : dialects.values()) {
final IEditorPart editor = dialect.getServices().openEditor(session, dRepresentation, monitor);
@@ -112,6 +115,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideNewChildDescriptors() {
final Collection<CommandParameter> result = new ArrayList<CommandParameter>();
for (final DialectUI dialect : dialects.values()) {
@@ -124,6 +128,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideRepresentationCreationToolDescriptors(final Object feature) {
final Collection<CommandParameter> result = new ArrayList<CommandParameter>();
for (final DialectUI dialect : dialects.values()) {
@@ -136,6 +141,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideRepresentationNavigationToolDescriptors(final Object feature) {
final Collection<CommandParameter> result = new ArrayList<CommandParameter>();
for (final DialectUI dialect : dialects.values()) {
@@ -147,6 +153,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
/**
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideAdditionalMappings(EObject object) {
final Collection<CommandParameter> result = new ArrayList<CommandParameter>();
for (final DialectUI dialect : dialects.values()) {
@@ -159,6 +166,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* {@inheritDoc}
*/
+ @Override
public AdapterFactory createAdapterFactory() {
final ComposedAdapterFactory composed = new ComposedAdapterFactory();
@@ -180,6 +188,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandleEditor(org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean canHandleEditor(final IEditorPart editorPart) {
boolean result = false;
for (final DialectUI dialect : dialects.values()) {
@@ -194,6 +203,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#closeEditor(org.eclipse.ui.IEditorPart,
* boolean)
*/
+ @Override
public boolean closeEditor(final IEditorPart editorPart, final boolean save) {
boolean result = false;
for (final DialectUI dialect : dialects.values()) {
@@ -210,6 +220,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationManagedByEditor(org.eclipse.sirius.viewpoint.DRepresentation,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationManagedByEditor(final DRepresentation representation, final IEditorPart editorPart) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().isRepresentationManagedByEditor(representation, editorPart)) {
@@ -225,6 +236,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#isRepresentationDescriptionManagedByEditor(org.eclipse.sirius.viewpoint.description.RepresentationDescription,
* org.eclipse.ui.IEditorPart)
*/
+ @Override
public boolean isRepresentationDescriptionManagedByEditor(final RepresentationDescription representationDescription, final IEditorPart editor) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().isRepresentationDescriptionManagedByEditor(representationDescription, editor)) {
@@ -239,6 +251,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getEditorName(org.eclipse.sirius.viewpoint.DRepresentation)
*/
+ @Override
public String getEditorName(final DRepresentation representation) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canHandle(representation)) {
@@ -253,6 +266,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.DRepresentation)
*/
+ @Override
public boolean canHandle(final DRepresentation representation) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canHandle(representation)) {
@@ -267,6 +281,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationDescription)
*/
+ @Override
public boolean canHandle(final RepresentationDescription description) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canHandle(description)) {
@@ -281,6 +296,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#canHandle(org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription)
*/
+ @Override
public boolean canHandle(final RepresentationExtensionDescription description) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canHandle(description)) {
@@ -293,6 +309,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
/**
* {@inheritDoc}
*/
+ @Override
public boolean canExport(ExportFormat format) {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canExport(format)) {
@@ -308,6 +325,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#export(org.eclipse.sirius.viewpoint.DRepresentation,
* org.eclipse.sirius.business.api.session.Session)
*/
+ @Override
public void export(final DRepresentation representation, final Session session, final IPath path, final ExportFormat format, final IProgressMonitor monitor) throws SizeTooLargeException {
for (final DialectUI dialect : dialects.values()) {
if (dialect.getServices().canHandle(representation)) {
@@ -325,15 +343,24 @@ public class DialectUIManagerImpl implements DialectUIManager {
/**
* {@inheritDoc}
*/
+ @Override
public void setSelection(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
for (final DialectUI dialect : dialects.values()) {
dialect.getServices().setSelection(dialectEditor, selection);
}
}
+ @Override
+ public void selectAndReveal(DialectEditor dialectEditor, List<DRepresentationElement> selection) {
+ for (final DialectUI dialect : dialects.values()) {
+ dialect.getServices().selectAndReveal(dialectEditor, selection);
+ }
+ }
+
/**
* {@inheritDoc}
*/
+ @Override
public Collection<DSemanticDecorator> getSelection(DialectEditor editor) {
for (final DialectUI dialect : dialects.values()) {
Collection<DSemanticDecorator> selection = dialect.getServices().getSelection(editor);
@@ -347,6 +374,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
/**
* {@inheritDoc}
*/
+ @Override
public Collection<CommandParameter> provideTools(EObject cur) {
final Collection<CommandParameter> result = new ArrayList<CommandParameter>();
for (final DialectUI dialect : dialects.values()) {
@@ -360,6 +388,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIServices#getHierarchyLabelProvider(ILabelProvider)
*/
+ @Override
public ILabelProvider getHierarchyLabelProvider(ILabelProvider currentLabelProvider) {
ILabelProvider result = currentLabelProvider;
for (final DialectUI dialect : dialects.values()) {
@@ -423,6 +452,7 @@ public class DialectUIManagerImpl implements DialectUIManager {
*
* @see org.eclipse.sirius.ui.business.api.dialect.DialectUIManager#isRefreshActivatedOnRepresentationOpening()
*/
+ @Override
public boolean isRefreshActivatedOnRepresentationOpening() {
return SiriusEditPlugin.getPlugin().getPreferenceStore().getBoolean(SiriusUIPreferencesKeys.PREF_REFRESH_ON_REPRESENTATION_OPENING.name());
}
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
index 3fec39f0bf..a167e25919 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/modelexplorer/SiriusDialectLinkWithEditorSelectionListener.java
@@ -144,7 +144,7 @@ public class SiriusDialectLinkWithEditorSelectionListener implements ISelectionC
private void selectRepresentationElements(ISelection selection, DialectEditor dialectEditor) {
List<DRepresentationElement> representationElements = getRepresentationElements(dialectEditor.getRepresentation(), ((IStructuredSelection) selection).toList());
if (!representationElements.isEmpty()) {
- DialectUIManager.INSTANCE.setSelection(dialectEditor, representationElements);
+ DialectUIManager.INSTANCE.selectAndReveal(dialectEditor, representationElements);
}
}

Back to the top