Skip to content

Commit

Permalink
JavaFX/GEF5 based graphical editor (#2662)
Browse files Browse the repository at this point in the history
* GEF/JavaFX version of graphical editor.

Co-authored-by: RyanMcilnay <rm0016@uah.edu>
Co-authored-by: Lutz Wrage <lutz.wrage@gmail.com>
  • Loading branch information
3 people committed Jul 6, 2021
1 parent 47843a4 commit dbefc8b
Show file tree
Hide file tree
Showing 640 changed files with 19,445 additions and 72,759 deletions.
18 changes: 16 additions & 2 deletions core/org.osate.build.coverage.report/pom.xml
Expand Up @@ -379,7 +379,21 @@
<dependency>
<groupId>org.osate</groupId>
<artifactId>org.osate.ge</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osate</groupId>
<artifactId>org.osate.ge.gef</artifactId>
<version>1.0.0-SNAPSHOT</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osate</groupId>
<artifactId>org.osate.ge.gef.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
Expand Down Expand Up @@ -421,7 +435,7 @@
<dependency>
<groupId>org.osate</groupId>
<artifactId>org.osate.ge.doc</artifactId>
<version>1.0.6-SNAPSHOT</version>
<version>1.0.7-SNAPSHOT</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
Expand Down
8 changes: 0 additions & 8 deletions core/org.osate.build.main/pom.xml
Expand Up @@ -416,14 +416,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgument>-err:-forbidden</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
Expand Down
7 changes: 5 additions & 2 deletions core/org.osate.build.product/osate.product
Expand Up @@ -14,7 +14,7 @@
</configIni>

<launcherArgs>
<vmArgs>-Dosgi.requiredJavaVersion=1.8 -Xms40m -Xmx768m --add-modules=ALL-SYSTEM
<vmArgs>-Dosgi.requiredJavaVersion=1.8 -Dosgi.framework.extensions=org.eclipse.fx.osgi -Xms40m -Xmx768m --add-modules=ALL-SYSTEM
</vmArgs>
</launcherArgs>

Expand Down Expand Up @@ -55,7 +55,6 @@
<feature id="org.eclipse.equinox.p2.discovery.feature"/>
<feature id="org.eclipse.platform"/>
<feature id="org.eclipse.mylyn.context_feature"/>
<feature id="org.eclipse.graphiti.export.feature"/>
<feature id="org.eclipse.sirius.runtime.ide.ui"/>
<feature id="org.eclipse.elk.feature"/>
<feature id="org.eclipse.elk.algorithms.feature"/>
Expand All @@ -66,6 +65,10 @@
<feature id="org.eclipse.ease.modules.feature"/>
<feature id="org.eclipse.ease.ui.feature"/>
<feature id="org.py4j.feature"/>
<feature id="org.eclipse.fx.runtime.min.feature"/>
<feature id="openjfx.standard.feature"/>
<feature id="openjfx.swing.feature"/>
<feature id="openjfx.swt.feature"/>
</features>

<configurations>
Expand Down
15 changes: 11 additions & 4 deletions core/org.osate.build.target/osate2-platform.target
Expand Up @@ -9,11 +9,12 @@
<unit id="org.eclipse.emf.transaction.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.fx.runtime.min.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.common.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.geometry.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.geometry.convert.fx.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.fx.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.graphiti.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.graphiti.export.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.graphiti.feature.tools.feature.group" version="0.0.0"/>
<unit id="org.eclipse.graphiti.sdk.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.m2e.logback.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.mylyn.context_feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
Expand Down Expand Up @@ -100,5 +101,11 @@
<unit id="org.yakindu.base.xtext.utils.jface" version="0.0.0"/>
<repository location="http://updates.yakindu.com/statecharts/releases/3.5.9"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="openjfx.standard.feature.feature.group" version="0.0.0"/>
<unit id="openjfx.swing.feature.feature.group" version="0.0.0"/>
<unit id="openjfx.swt.feature.feature.group" version="0.0.0"/>
<repository location="https://downloads.efxclipse.bestsolution.at/p2-repos/openjfx-16/"/>
</location>
</locations>
</target>
@@ -1,18 +1,18 @@
/**
* Copyright (c) 2004-2021 Carnegie Mellon University and others. (see Contributors file).
* Copyright (c) 2004-2021 Carnegie Mellon University and others. (see Contributors file).
* All Rights Reserved.
*
*
* NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
* OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
* MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
*
*
* This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
* SPDX-License-Identifier: EPL-2.0
*
*
* Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
*
*
* This program includes and/or can make use of certain third party source code, object code, documentation and other
* files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
* configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
Expand Down Expand Up @@ -125,7 +125,7 @@ public void testNewDiagramPackage() {

// Check that TestDiagramPackage is in an open editor
final SWTBotEditor graphicalEditor = bot.editorByTitle("TestDiagramPackage.aadl_diagram");
Assert.assertEquals("org.osate.ge.editor.AgeDiagramEditor", graphicalEditor.getReference().getId());
Assert.assertEquals("org.osate.gef.ui.editor.AgeEditor", graphicalEditor.getReference().getId());

// Delete TestProject
testProject.contextMenu("Delete").click();
Expand Down
2 changes: 1 addition & 1 deletion core/org.osate.ui/META-INF/MANIFEST.MF
Expand Up @@ -23,7 +23,7 @@ Export-Package: org.osate.search,
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.7.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.16.0,4.0.0)",
org.osate.ge;bundle-version="[2.1.0,3.0.0)",
org.osate.ge;bundle-version="[3.0.0,4.0.0)",
org.eclipse.emf.edit.ui;bundle-version="[2.7.0,3.0.0)",
org.osate.aadl2.modelsupport;bundle-version="[6.0.0,7.0.0)",
org.osate.aadl2.edit;bundle-version="[4.0.0,5.0.0)",
Expand Down
2 changes: 1 addition & 1 deletion core/osate.releng/OSATE2 small fonts.launch
Expand Up @@ -24,7 +24,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.osate.linking.cache=false&#10;-Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.osate.linking.cache=false&#13;&#10;-Dorg.eclipse.swt.internal.carbon.smallFonts&#13;&#10;-Dosgi.framework.extensions=org.eclipse.fx.osgi"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.osate.branding.org.osate.product"/>
<setAttribute key="selected_features">
Expand Down
1 change: 1 addition & 0 deletions core/osate.releng/OSATE2.launch
Expand Up @@ -24,6 +24,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.framework.extensions=org.eclipse.fx.osgi"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.osate.branding.osate2"/>
<setAttribute key="selected_features">
Expand Down
16 changes: 12 additions & 4 deletions core/osate.releng/seisettings.xml
Expand Up @@ -66,17 +66,17 @@ censes only apply to the Third Party Software and not any other portion of this
<id>httpproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.sei.cmu.edu</host>
<port>8080</port>
<host>cloudproxy.sei.cmu.edu</host>
<port>80</port>
<nonProxyHosts>localhost|*.sei.cmu.edu</nonProxyHosts>
</proxy>

<proxy>
<id>httpsproxy</id>
<active>true</active>
<protocol>https</protocol>
<host>proxy.sei.cmu.edu</host>
<port>8080</port>
<host>cloudproxy.sei.cmu.edu</host>
<port>80</port>
<nonProxyHosts>localhost|*.sei.cmu.edu</nonProxyHosts>
</proxy>

Expand Down Expand Up @@ -140,6 +140,14 @@ censes only apply to the Third Party Software and not any other portion of this
<mirrorOfLayouts>p2</mirrorOfLayouts>
</mirror>

<mirror>
<id>openjfx-16-mirror</id>
<mirrorOf>https://downloads.efxclipse.bestsolution.at/p2-repos/openjfx-16</mirrorOf>
<url>file:/var/cache/p2mirror/openjfx-16</url>
<layout>p2</layout>
<mirrorOfLayouts>p2</mirrorOfLayouts>
</mirror>

</mirrors>

</settings>
2 changes: 1 addition & 1 deletion ge/org.osate.ge.ba/META-INF/MANIFEST.MF
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: OSATE Graphical Editor Behavior Annex
Bundle-SymbolicName: org.osate.ge.ba;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.osate.ge;bundle-version="[2.1.0,3.0.0)",
Require-Bundle: org.osate.ge;bundle-version="[3.0.0,4.0.0)",
org.osate.ba;bundle-version="[5.1.0,6.0.0)",
org.eclipse.ui.views.properties.tabbed;bundle-version="[3.8.0,4.0.0)",
org.osate.ge.swt;bundle-version="[1.1.0,2.0.0)",
Expand Down
Expand Up @@ -52,11 +52,9 @@
import org.osate.ge.businessobjecthandling.ReferenceContext;
import org.osate.ge.businessobjecthandling.RenameContext;
import org.osate.ge.graphics.ArrowBuilder;
import org.osate.ge.graphics.Color;
import org.osate.ge.graphics.ConnectionBuilder;
import org.osate.ge.graphics.Graphic;
import org.osate.ge.graphics.Style;
import org.osate.ge.graphics.StyleBuilder;
import org.osate.ge.query.StandaloneQuery;
import org.osate.ge.services.QueryService;

Expand Down Expand Up @@ -98,10 +96,10 @@ private static Element getState(final BehaviorAnnex ba, final String id) {
.orElse(null);
}

public static final Graphic transitionConnectionGraphic = ConnectionBuilder.create()
.destinationTerminator(ArrowBuilder.create().small().filled().build()).build();
public static final Style transitionConnectionStyle = StyleBuilder.create().backgroundColor(Color.BLACK)
.labelsAboveTop().labelsLeft().build();
private static final Graphic transitionConnectionGraphic = ConnectionBuilder.create()
.destinationTerminator(ArrowBuilder.create().small().filled().build())
.build();
private static final Style transitionConnectionStyle = Style.EMPTY;

@Override
public boolean isApplicable(final IsApplicableContext ctx) {
Expand Down
Expand Up @@ -184,7 +184,7 @@ private void createActionBlockEditingControls(final BehaviorTransition behaviorT
final XtextResource xtextResource) {
final EmbeddedTextValue actionTextValue = getActionBlockTextValue(behaviorTransition, sourceText);
final SelectionAdapter editActionBlockSelectionAdapter = getEditActionSelectionAdapter(project, actionTextValue,
behaviorTransition, editingDomain, xtextDocument, xtextResource, sourceText);
behaviorTransition, editingDomain, xtextDocument, xtextResource);
createEditingControls(actionBlockEditingControls, editActionBlockSelectionAdapter, project, actionTextValue);
}

Expand All @@ -197,7 +197,7 @@ private void createEditControls() {
private static SelectionAdapter getEditActionSelectionAdapter(final IProject project,
final EmbeddedTextValue actionTextValue, final BehaviorTransition behaviorTransition,
final TransactionalEditingDomain editingDomain, final IXtextDocument xtextDocument,
final XtextResource xtextResource, final String src) {
final XtextResource xtextResource) {
return new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
Expand Down
Expand Up @@ -29,7 +29,6 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.osate.aadl2.Aadl2Package;
import org.osate.aadl2.AadlPackage;
import org.osate.aadl2.DataClassifier;
Expand Down Expand Up @@ -134,7 +133,7 @@ public AadlPackage getDataClassifierPackage() {
* Show dialog to select a data classifier for behavior variables
*/
static class VariableDialog {
public static Optional<VariableOperation> show(final Shell shell, final PublicPackageSection section,
public static Optional<VariableOperation> show(final PublicPackageSection section,
final BehaviorAnnex behaviorAnnex) {
final Resource resource = behaviorAnnex.eResource();
return BehaviorAnnexUtil.getDataClassifier(resource).map(dataClassifier -> getPackage(dataClassifier)
Expand All @@ -148,7 +147,7 @@ public static Optional<VariableOperation> show(final Shell shell, final PublicPa
*/
public static Optional<VariableOperation> getVariableBuildOperation(final PublicPackageSection section,
final BehaviorAnnex behaviorAnnex) {
return VariableDialog.show(Display.getCurrent().getActiveShell(), section, behaviorAnnex);
return VariableDialog.show(section, behaviorAnnex);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions ge/org.osate.ge.doc/META-INF/MANIFEST.MF
Expand Up @@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: OSATE Graphical Editor Documentation
Bundle-SymbolicName: org.osate.ge.doc;singleton:=true
Bundle-Version: 1.0.6.qualifier
Bundle-Version: 1.0.7.qualifier
Require-Bundle: org.eclipse.ui;bundle-version="[3.115.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.17.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.osate.ge.doc
Bundle-Vendor: The University of Alabama in Huntsville

0 comments on commit dbefc8b

Please sign in to comment.