-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into tortmayr/issue251
Conflicts: plugins/org.eclipse.papyrus.uml.diagram.sequence.runtime/src/org/eclipse/papyrus/uml/diagram/sequence/runtime/internal/providers/SequenceElementTypes.java plugins/org.eclipse.papyrus.uml.diagram.sequence.runtime/src/org/eclipse/papyrus/uml/diagram/sequence/runtime/internal/providers/SequenceParserProvider.java tests/org.eclipse.papyrus.uml.diagram.sequence.runtime.tests/META-INF/MANIFEST.MF
- Loading branch information
Showing
226 changed files
with
17,754 additions
and
1,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
plugins/org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
28 changes: 28 additions & 0 deletions
28
plugins/org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
7 changes: 7 additions & 0 deletions
7
...pyrus.uml.diagram.sequence.contribution.simplifiedui/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.8 |
13 changes: 13 additions & 0 deletions
13
...s/org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Simplifiedui | ||
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui;singleton:=true | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui.Activator | ||
Require-Bundle: org.eclipse.ui, | ||
org.eclipse.core.runtime, | ||
org.eclipse.papyrus.infra.newchild;bundle-version="3.0.0", | ||
org.eclipse.papyrus.infra.properties;bundle-version="3.0.0" | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Automatic-Module-Name: org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui | ||
Bundle-ActivationPolicy: lazy |
6 changes: 6 additions & 0 deletions
6
plugins/org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
newchild,\ | ||
plugin.xml |
16 changes: 16 additions & 0 deletions
16
...m.sequence.contribution.simplifiedui/newchild/lightweight-seqd-newChild.creationmenumodel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ElementCreationMenuModel:Folder xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ElementCreationMenuModel="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" label="New Child"> | ||
<menu xsi:type="ElementCreationMenuModel:CreationMenu" label="Lifeline"> | ||
<elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Lifeline"/> | ||
</menu> | ||
<menu xsi:type="ElementCreationMenuModel:CreationMenu" label="Property"> | ||
<elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/> | ||
</menu> | ||
<menu xsi:type="ElementCreationMenuModel:CreationMenu" label="Comment"> | ||
<elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/> | ||
</menu> | ||
<menu xsi:type="ElementCreationMenuModel:CreationMenu" label="Constraint"> | ||
<elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Constraint"/> | ||
</menu> | ||
</ElementCreationMenuModel:Folder> | ||
|
16 changes: 16 additions & 0 deletions
16
plugins/org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui/plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
<extension | ||
point="org.eclipse.papyrus.infra.newchild"> | ||
<menuCreationModel | ||
model="newchild/lightweight-seqd-newChild.creationmenumodel"> | ||
</menuCreationModel> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.startup"> | ||
<startup | ||
class="org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui.StartUp"> | ||
</startup> | ||
</extension> | ||
</plugin> |
50 changes: 50 additions & 0 deletions
50
...dui/src/org/eclipse/papyrus/uml/diagram/sequence/contribution/simplifiedui/Activator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui; | ||
|
||
import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
import org.osgi.framework.BundleContext; | ||
|
||
/** | ||
* The activator class controls the plug-in life cycle | ||
*/ | ||
public class Activator extends AbstractUIPlugin { | ||
|
||
// The plug-in ID | ||
public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui"; //$NON-NLS-1$ | ||
|
||
// The shared instance | ||
private static Activator plugin; | ||
|
||
/** | ||
* The constructor | ||
*/ | ||
public Activator() { | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | ||
*/ | ||
public void start(BundleContext context) throws Exception { | ||
super.start(context); | ||
plugin = this; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | ||
*/ | ||
public void stop(BundleContext context) throws Exception { | ||
plugin = null; | ||
super.stop(context); | ||
} | ||
|
||
/** | ||
* Returns the shared instance | ||
* | ||
* @return the shared instance | ||
*/ | ||
public static Activator getDefault() { | ||
return plugin; | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
...g/eclipse/papyrus/uml/diagram/sequence/contribution/simplifiedui/CreationMenuCleaner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Copyright (c) 2016 EclipseSource Services GmbH and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Martin Fleck (EclipseSource) - Initial API and implementation | ||
*/ | ||
package org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui; | ||
|
||
import org.eclipse.papyrus.infra.newchild.CreationMenuRegistry; | ||
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder; | ||
|
||
/** | ||
* Cleans the creation menu. | ||
*/ | ||
public final class CreationMenuCleaner { | ||
|
||
private static final String UML_NEW_CHILD_MENU = "/resource/UML.creationmenumodel"; //$NON-NLS-1$ | ||
|
||
private static final String UML_NEW_RELATIONSHIP_MENU = "/resource/UMLEdges.creationmenumodel"; //$NON-NLS-1$ | ||
|
||
private static final String[] DEACTIVATED_CHILD_MENUS = new String[] { UML_NEW_CHILD_MENU, | ||
UML_NEW_RELATIONSHIP_MENU }; | ||
|
||
private CreationMenuCleaner() { | ||
// hidden constructor. | ||
} | ||
|
||
/** | ||
* Cleans the creation menu. | ||
*/ | ||
public static void clean() { | ||
CreationMenuRegistry instance = org.eclipse.papyrus.infra.newchild.CreationMenuRegistry.getInstance(); | ||
for (Folder folder : instance.getRootFolder()) { | ||
for (String childMenuPath : DEACTIVATED_CHILD_MENUS) { | ||
if (folder.eResource().getURI().toString().endsWith(childMenuPath)) { | ||
instance.setCreationMenuVisibility(folder, false); | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...iedui/src/org/eclipse/papyrus/uml/diagram/sequence/contribution/simplifiedui/StartUp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.eclipse.papyrus.uml.diagram.sequence.contribution.simplifiedui; | ||
|
||
import org.eclipse.ui.IStartup; | ||
|
||
public class StartUp implements IStartup { | ||
|
||
@Override | ||
public void earlyStartup() { | ||
CreationMenuCleaner.clean(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
...org/eclipse/papyrus/uml/diagram/sequence/figure/magnets/ConnectionFigureMagnetHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/***************************************************************************** | ||
* Copyright (c) 2018 Christian W. Damus and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Christian W. Damus - Initial API and implementation | ||
*****************************************************************************/ | ||
|
||
package org.eclipse.papyrus.uml.diagram.sequence.figure.magnets; | ||
|
||
import java.beans.PropertyChangeListener; | ||
|
||
import org.eclipse.draw2d.Connection; | ||
import org.eclipse.draw2d.geometry.PointList; | ||
|
||
/** | ||
* A convenient helper for management of magnets along the path of a connection figure. | ||
*/ | ||
public class ConnectionFigureMagnetHelper extends MagnetHelper<Connection, PointList> { | ||
|
||
private PropertyChangeListener pointsListener; | ||
|
||
/** | ||
* Initializes me with my {@code figure}. | ||
* | ||
* @param connection | ||
* my connection figure | ||
* @param magnetManager | ||
* the magnet manager | ||
* @param strength | ||
* the strength of magnets that I create | ||
*/ | ||
public ConnectionFigureMagnetHelper(Connection connection, IMagnetManager magnetManager, int strength) { | ||
super(connection, magnetManager, strength); | ||
} | ||
|
||
/** | ||
* Auto-register magnets at the specified points of my connection figure. | ||
* | ||
* @param endpoints | ||
* whether to create magnets at the endpoints | ||
* @param midpoint | ||
* whether to create magnets at the midpoint of the connection path | ||
* @see MagnetHelper#registerMagnet(java.util.function.Function) | ||
*/ | ||
public ConnectionFigureMagnetHelper registerMagnets(boolean endpoints, boolean midpoint) { | ||
if (endpoints) { | ||
registerMagnet(PointList::getFirstPoint); | ||
registerMagnet(PointList::getLastPoint); | ||
} | ||
if (midpoint) { | ||
registerMagnet(PointList::getMidpoint); | ||
} | ||
|
||
return this; | ||
} | ||
|
||
@Override | ||
protected void addListeners(Connection figure, Runnable action) { | ||
// Recompute magnets on change of the points defining the connection path | ||
pointsListener = __ -> action.run(); | ||
|
||
figure.addPropertyChangeListener(Connection.PROPERTY_POINTS, pointsListener); | ||
} | ||
|
||
@Override | ||
protected void removeListeners(Connection figure) { | ||
figure.removePropertyChangeListener(Connection.PROPERTY_POINTS, pointsListener); | ||
|
||
pointsListener = null; | ||
} | ||
|
||
@Override | ||
protected PointList getGeometry(Connection figure) { | ||
return figure.getPoints().getCopy(); | ||
} | ||
|
||
} |
Oops, something went wrong.