[cleanup] Fix error message in case of type error in AbstractExternalJavaAction

Change-Id: I0bb6fd0b40d12a3e38925e68dd1908167f88acf5
[439615] Reload all the imported services using the new bundle path

Correction reported from Bug 438425

Bug: 439615
Change-Id: I1a86f1d5a5b164125b18e49d5bf4f4adf4b73690
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Cherry-picked-from: 430d7db20ac54c62d2c021d691960dce378ad387
[440212] Fix typo in SiriusValidationDecorator: Marker type ID should
use DiagramUIPlugin.ID and not DiagramPlugin.ID

Bug: 440212
Change-Id: I831ab19600dbbda51dfc4a6f230507cc287e6575
Signed-off-by: Alex Lagarde <alex.lagarde@obeo.fr>
Cherry-picked-from: 20c9e6ef
[436465] Complete the variable support in service: and var: interpreters

Solution that uses the VariableManager (as query legacy, compound
interpreter, ..) to manage the push/peak/pop mechanism for the
variables.

The unSetVariable method was not implemented. Now it uses a
VariableManager with its the variable value stacks: when a variable is
unset, the next getValue, will return its previous value.

Bug: 436465
Change-Id: I72333bd0e636cb08e731f4858703784f3063e8c8
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[440301] Open UI sessions from the SessionUIManagerImpl

This was done in the SiriusCommonContentProvider's
SessionManagerListener but if the content provider has not been
initalized yet (Model Explorer view for example), the ui sessions are
not created and opened.

The getOrCreateUISession has been modified to avoid
java.lang.ExceptionInInitializerError when trying to call
SessionUManager.INSTANCE during its initalization.

Bug: 440301
Change-Id: I62db24c19f3a3d74658109610f2e813ca3b8a31d
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[440362] Display tooltip for bordered nodes with labelPosition=border

This commit also corrects the border refresh for non bordered nodes.

Bug: 440362
Change-Id: I273cc37fc4e00ef413a5e7cf3519b300afbd87b7
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Cherry-picked-from: 4b8e0c57da412df5b9e49732621ed785dc53eaf5
[440061] Avoid NPE during Tabbar items visibility changes

When the user changes the selection from a diagram element to the diagram 
(or from the diagram to the diagram element) and if he has made one of
the tabbar menu managers visible, when the ToolbarManager is updated it
detects that the menu are now non visible: all their children menu items
are not visible anymore, their corresponding action are selection
listeners and update themselves when the selection changes). The
ToolbarManager decides to remove them (and dispose them) but when the
selection is changed back, it decides to make the element visible again,
the manager was disposed before, so the page field is null and we get an
NPE. 
For the other items (which are not menu managers), the visibility state
is mainly computed from the visibleWhen expressions but for menu
managers and their actions which comes from GMF, the first visibility
refresh from the selection is done first.
This field is not required as when the menu is set to visible, the page
is the current active page and we can directly get it.

Bug: 440061
Change-Id: I65bad0bb4205850cc309a45402e49b93f13c4bdb
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Cherry-picked-from: f089452aafa9c427fbcb943088fce27ebff59344
[439791] Force mainRepresentationFileURI computation after its creation

The current project on which we are adding the ModelingProject nature
does not contain any representation file, so it has been marked as
invalid and has no mainRepresentationFileURI and hence no session. So just
after creating this main aird, we now recompute (force) the
mainRepresentationURI and the valid state.

Cherry-picked from 436375

Bug: 439791
Change-Id: Idb52a549369d646434f0c483912f47c5beab5a24
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Cherry-picked-from: 62ceab88fb2243c7e9ce681150dc0fade84d3921
[440855] Do not bump the MANIFEST.MF VSM template to 2.0.0

Bug: 440855
Change-Id: I364699151d18c9fc371023de004c035d6fe5e719
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[440743] Do not create a new ResourceSetSync client while the editing
session is closing

Bug: 440743
Change-Id: Ie17955276a547f8a3d9d428132328e3cea35199e
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[441059] Improve VSP activator location package computation

Use SourceVersion.isName() instead of SourceVersion.isIdentified() to
check if the given name is a valid qualifier, if not try with the name
with _ to replace all unauthorized characters, before falling back and
use defaultpackage.

Bug: 441059
Change-Id: I47f63f75a00b68bed533794b120cdfb033ce9b6a
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
Cherry-picked-from:6b91edae4aa0cad872d3f99270bec1bee3b34b7d
[436435] Move ViewpointRegistry initialization code in getInstance()

This commit moves ViewpointRegistry initialization code into the
ViewpointRegistry.getInstance() method using the Initialization
on demand holder idiom.

See http://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom

The static initialization block will only be called when the
getInstance() method is triggered.

This commit also removes
DCorePreferences.VIEWPOINT_REGISTRY_INITIAL_SIZE and
DCorePreferences.VIEWPOINT_REGISTRY_INITIAL_SIZE_DEFAULT_VALUE.

Bug: 436435
Change-Id: I16dd061d23865805d198dd2f507f78382b84486e
Signed-off-by: Cedric BRUN <cedric.brun@obeo.fr>
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[427871] Remove calls to SelectionCommandAppender

The current bug aims to delete the IChangeListener installed by each
DDiagramEditorImpl on its DDiagram. The SelectionCommandAppender is used
to decorate several commands in order to select the newly created
elements during the decorated command execution. The
SelectionCommandAppender uses the IChangeListener to detect those
elements to select. 

This commit removes calls to SelectionCommandAppender and the add/remove
of the IChangeListener during the DDiagramEditorImpl initialization. 

The next commit should delete the SelectionCommandAppender and replace
it by a more efficient and generic mechanism.

Bug: 427871
Change-Id: I15407c3e5f08c1f111d80639be332d57ef0b314b
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[427871] Set selection in post commit for newly created elements

Replace SelectionCommandAppender by a dialect agnostic post commit
listener which selects the newly created DRepresentationElements
in the current active DialectEditor.

If the dialect refresh its editor in post commit with an async runnable,
then the set selection will not succeed but the runnable will retrigger
itself once.

Bug: 427871
Change-Id: I87fc1b0a5ceb76cd87f9bbbb1d15938a90c2cbf8
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[437393] Improve labels in layers creation menus

Now we do not display the feature name and the type name, the menus
were: "Additional Layer Additional Layer" and "Default Layer Layer". 

Now the menus labels are "Additional Layer" and "Default Layer".

Also disbled the creation of a default layer for a
DiagramImportDescription as the implementation of its getter will only
look for the default layer of the imported diagram description.

Bug: 437393
Change-Id: Iaea18bbd7508c8f4cf8313d5429872561664c74b
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[441134] Use M1 key binding instead of Ctrl

This allows Mac users to call a tool twice (or more) by pressing cmd
key.

Bug: 441134
Change-Id: I6b0a2bd5f09bb5766ddb8896885566b20ce876be
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[build] Switch to Luna as the default target platform

Change-Id: I0edbada3de8ebd1a538917898dbae3c03e4f8cff
[427871] Minimize selection of the newly created elements.

Selecting all created elements could add a lot of noise in the editor,
this could be annoying for the user. This commit filters the newly
created elements to take only the roots of the created group of
elements: if an element has its parent in the created elements list, it
will not be selected. 

This also prevent additional refresh on Trees.

Bug: 427871
Change-Id: I1297072d2ae9d1dd3e96cc54f13a96c2340433d8
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr
[427871] Avoid NPE in dialect ui services

Check if the viewer is null before setting the selection.

Bug: 427871
Change-Id: I1f03471fa6448c3a4e99db1af36be8a2536d4a95
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
[427871] Avoid NPE in dialect ui getSelection services

Check if the the editor site and its selection provider are null before
getting the selection.

Bug: 427871
Change-Id: I89e8736eb9c44d0c764eaae0a876cb7956dc9448
Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>