Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • af3/af3-rcp
1 result
Show changes
Commits on Source (159)
Showing
with 177 additions and 724 deletions
downstream-job:
variables:
BUILD_BRANCH: "$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
only:
- merge_requests
trigger:
project: af3/maven-releng
strategy: depend
......@@ -3,7 +3,7 @@ Automatic-Module-Name: org.fortiss.af3.rcp.application
Bundle-ManifestVersion: 2
Bundle-Name: AF3 RCP
Bundle-SymbolicName: org.fortiss.af3.rcp.application;singleton:=true
Bundle-Version: 2.17.0.qualifier
Bundle-Version: 2.19.0.qualifier
Bundle-Activator: org.fortiss.af3.rcp.application.AF3ApplicationActivator
Bundle-Vendor: fortiss GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-11
......@@ -18,25 +18,25 @@ Export-Package: org.fortiss.af3.rcp.application;
org.eclipse.equinox.app,
org.osgi.framework",
org.fortiss.af3.rcp.application.example
Require-Bundle: org.fortiss.af3.rcp.help;bundle-version="2.17.0",
eu.fbk.af3.tools.diagram.ui;bundle-version="2.17.0",
org.fortiss.af3.cosimulation.ui;bundle-version="2.17.0",
org.fortiss.af3.exploration.ui;bundle-version="2.17.0",
org.fortiss.af3.mira.ui;bundle-version="2.17.0",
org.fortiss.af3.mode.ui;bundle-version="2.17.0",
org.fortiss.af3.operatorpanel.ui;bundle-version="2.17.0",
org.fortiss.af3.partition.ui;bundle-version="2.17.0",
org.fortiss.af3.platform.hierarchic.ui;bundle-version="2.17.0",
org.fortiss.af3.platform.ui;bundle-version="2.17.0",
org.fortiss.af3.project;bundle-version="2.17.0",
org.fortiss.af3.project.ui;bundle-version="2.17.0",
org.fortiss.af3.safety.ui;bundle-version="2.17.0",
org.fortiss.af3.safetycases.ui;bundle-version="2.17.0",
org.fortiss.af3.task.ui;bundle-version="2.17.0",
org.fortiss.af3.schedule.ui;bundle-version="2.17.0",
org.fortiss.af3.state.ui;bundle-version="2.17.0",
org.fortiss.af3.timing.ui;bundle-version="2.17.0",
org.fortiss.tooling.kernel.ui;bundle-version="2.17.0",
Require-Bundle: org.fortiss.af3.rcp.help;bundle-version="2.19.0",
eu.fbk.af3.tools.diagram.ui;bundle-version="2.19.0",
org.fortiss.af3.cosimulation.ui;bundle-version="2.19.0",
org.fortiss.af3.exploration.ui;bundle-version="2.19.0",
org.fortiss.af3.mira.ui;bundle-version="2.19.0",
org.fortiss.af3.mode.ui;bundle-version="2.19.0",
org.fortiss.af3.operatorpanel.ui;bundle-version="2.19.0",
org.fortiss.af3.partition.ui;bundle-version="2.19.0",
org.fortiss.af3.platform.hierarchic.ui;bundle-version="2.19.0",
org.fortiss.af3.platform.ui;bundle-version="2.19.0",
org.fortiss.af3.project;bundle-version="2.19.0",
org.fortiss.af3.project.ui;bundle-version="2.19.0",
org.fortiss.af3.safety.ui;bundle-version="2.19.0",
org.fortiss.af3.safetycases.ui;bundle-version="2.19.0",
org.fortiss.af3.task.ui;bundle-version="2.19.0",
org.fortiss.af3.schedule.ui;bundle-version="2.19.0",
org.fortiss.af3.state.ui;bundle-version="2.19.0",
org.fortiss.af3.timing.ui;bundle-version="2.19.0",
org.fortiss.tooling.kernel.ui;bundle-version="2.19.0",
javax.servlet,
javax.servlet.jsp,
org.apache.commons.logging,
......
......@@ -5,8 +5,8 @@
<!-- edit overview page -->
<extensionContent id="orgfortissaf3rcpapplication-overview-introExtension" style="css/intro.css" name="Overview" path="overview/@">
<group style-id="content-group" id="orgfortissaf3rcpapplication-introLink-group">
<link label="Homepage of AutoFOCUS3" url="https://af3.fortiss.org/" id="orgfortissaf3rcpapplication-introLinkAutoFocusLogo" style-id="content-link">
<text>https://af3.fortiss.org/</text>
<link label="Homepage of AutoFOCUS3" url="https://www.fortiss.org/en/publications/software/autofocus-3" id="orgfortissaf3rcpapplication-introLinkAutoFocusLogo" style-id="content-link">
<text>https://www.fortiss.org/en/publications/software/autofocus-3</text>
</link>
<anchor id="additions"/>
</group>
......@@ -66,12 +66,9 @@
<!-- edit tutorials page -->
<extensionContent id="orgfortissaf3rcpapplication-introExtension" style="css/intro.css" name="Tutorials" path="tutorials/@">
<group style-id="content-group" id="orgfortissaf3rcpapplication-introLink-group">
<link label="Screencasts of AutoFOCUS 3" url="https://af3.fortiss.org/docs/screencasts/" id="orgfortissaf3rcpapplication-introLinkTutorial" style-id="content-link">
<link label="Screencasts of AutoFOCUS 3" url="https://www.youtube.com/af3fortiss" id="orgfortissaf3rcpapplication-introLinkTutorial" style-id="content-link">
<text>Screencasts explaining AutoFOCUS 3 features and use cases.</text>
</link>
<link label="AutoFOCUS 3 Tutorials" url="https://af3.fortiss.org/docs/tutorials/" id="orgfortissaf3rcpapplication-introLinkTutorial" style-id="content-link">
<text>Step-by-step tutorials and howtos.</text>
</link>
<link label="AutoFOCUS 3 Online Help" url="http://org.eclipse.ui.intro/showHelp" id="orgfortissaf3rcpapplication-introLinkHelp" style-id="content-link">
<text>Opens the AutoFOCUS 3 Online Help.</text>
</link>
......@@ -128,8 +125,8 @@
<!-- edit web resource page -->
<extensionContent id="orgfortissaf3rcpapplication-introExtension" style="css/intro.css" name="Webresources" path="webresources/@">
<group style-id="content-group" id="orgfortissaf3rcpapplication-introLink-group">
<link label="Know more about AutoFOCUS 3" url="https://af3.fortiss.org/" id="orgfortissaf3rcpapplication-introLinkWeb" style-id="content-link">
<text>AutoFOCUS3 home page: https://af3.fortiss.org/</text>
<link label="Know more about AutoFOCUS 3" url="https://www.fortiss.org/en/publications/software/autofocus-3" id="orgfortissaf3rcpapplication-introLinkWeb" style-id="content-link">
<text>AutoFOCUS3 home page: https://www.fortiss.org/en/publications/software/autofocus-3</text>
</link>
<link label="How to contribute?" url="https://af3-developer.fortiss.org/projects/autofocus3/wiki/Developers_documentation" id="orgfortissaf3rcpapplication-introLinkWeb" style-id="content-link">
<text>AutoFOCUS 3 Developer Documentation: https://af3-developer.fortiss.org/projects/autofocus3/wiki/Developers_documentation</text>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- html page to use on fortiss website https://www.fortiss.org/veroeffentlichungen/software/autofocus-3 for the release notes link. -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>New features and changes in AutoFOCUS 2.16</title>
<style>
.mBlock { margin-left: 62px; }
h2 { color: black; }
table, th, td {border: 1px solid black; border-collapse: collapse;}
tr:nth-child(even) {background: #DDD; }
tr:nth-child(odd) {background: #FFF; }
tr:first-child {background: #AAA; }
</style>
</head>
<body>
<div class="mBlock">
<h2>New Features and Changes in AutoFOCUS 2.18</h2>
<h3>Co-simulation</h3>
<ul>
<li>AF3 is now a listed as an official FMI Tool (<a href="https://fmi-standard.org/tools/)">https://fmi-standard.org/tools/</a>)</li>
<li>A Co-simulation example is now included in AF3. (<a href="https://download.fortiss.org/public/projects/af3/help/example_co-simulation.html">AF3 FMI Example</a>)</li>
</ul>
<h3>DSE</h3>
<ul>
<li> Reworked and unified synthesis view based on JavaFX
<li> Ability to launch a DSE synthesis from the command line
</ul>
<h3>Kernel</h3>
<ul>
<li> Modular Command Line Interface (CLI) support that is extensible by plugin contributions
</ul>
<h3>UI Update</h3>
<ul>
<li>AF3 2.18 includes a major UI update</li>
<li>Most of the views have been updated with a new JavaFX-based UI</li>
</ul>
<br>
<h3>
<a href="https://af3-developer.fortiss.org/projects/af3-phoenix-release/issues?utf8=%E2%9C%93&set_filter=1&sort=id%3Adesc&f%5B%5D=status_id&op%5Bstatus_id%5D=%3D&v%5Bstatus_id%5D%5B%5D=5&f%5B%5D=fixed_version_id&op%5Bfixed_version_id%5D=%3D&v%5Bfixed_version_id%5D%5B%5D=152&v%5Bfixed_version_id%5D%5B%5D=154&v%5Bfixed_version_id%5D%5B%5D=155&v%5Bfixed_version_id%5D%5B%5D=153&f%5B%5D=&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=&t%5B%5D=">Detailed list of changes in 2.18</a>
</h3>
<br>
<h3>FAQ - Installation and Running</h3>
<ul>
<li> On MacOS
<ul>
<li>You need to accept unknown developer certificates.</li>
<li>You need to move AutoFOCUS3 to your application folder.</li>
<li>If you get an error message on startup which says that AutoFOCUS3 is broken and cannot be started: open a terminal and use the following command:
<ul>
<li>sudo xattr -rd com.apple.quarantine /Applications/AutoFOCUS3.app</li>
<li>As our software is a scientific prototype, our product is not signed which causes a problem due to the security restrictions of MacOS</li>
</ul>
</li>
</ul>
</li>
<li> On Windows: DSE does not execute and throws exception
<ul>
<li> If you encounter the following exception when running a DSE you might be missing required libraries:
<br>
<i>java.lang.UnsatisfiedLinkError: [...]\plugins\com.microsoft.z3_2.18.[...]\lib\x64\msvcp120.dll: Can't find dependent libraries</i>
<br>
Installing the Visual C++ Redistributable Packages for Visual Studio 2013 fixes the problem.
</ul>
</li>
<li> AF3 does not start
<ul>
<li> Check, that the path to your AF3 (including the AF3 folder itself) does not contain spaces.
<li> If the product does not start because the Java Virtual Machine (JVM) could not be created: Please update your Java installation to Java 11.0.7
</ul>
</li>
<li> Unpacking of AF3 zip file fails with 'Path too long' on Windows
<ul>
<li> Workaround: Unzip into your drive root, e.g., C:/ and give the folder a short name like 'af3'
</ul>
</li>
<li> Menu icons are not displayed on KDE
<ul>
<li> Go to "System settings - Application Style - GNOME Application Style".
<li> Select "Show symbols of GTK buttons".
<li> Select "Show symbols in GTK menus".
</ul>
</li>
</ul>
</div>
</body>
</html>
......@@ -19,10 +19,10 @@
<product
application="org.fortiss.af3.rcp.application.af3app"
description="AutoFOCUS 3 - &quot;Phoenix&quot; Release"
name="AutoFOCUS 3 - &quot;Phoenix&quot; 2.16">
name="AutoFOCUS 3 - &quot;Phoenix&quot; 2.19">
<property
name="appName"
value="AutoFOCUS 3 - &quot;Phoenix&quot; 2.16">
value="AutoFOCUS 3 - &quot;Phoenix&quot; 2.19">
</property>
<property
name="aboutImage"
......@@ -34,7 +34,7 @@
</property>
<property
name="aboutText"
value="AutoFOCUS 3 - &quot;Phoenix&quot;&#x0A;&#x0A;Version: 2.17.0&#x0A;&#x0A;Copyright 2011-2018 fortiss GmbH&#x0A;&#x0A;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#x0A;you may not use this file except in compliance with the License.&#x0A;You may obtain a copy of the License at&#x0A;&#x0A; http://www.apache.org/licenses/LICENSE-2.0&#x0A;&#x0A;Unless required by applicable law or agreed to in writing, software&#x0A;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#x0A;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either&#x0A;express or implied. See the License for the specific language&#x0A;governing permissions and limitations under the License.">
value="AutoFOCUS 3 - &quot;Phoenix&quot;&#x0A;&#x0A;Version: 2.19.0&#x0A;&#x0A;Copyright 2011-2018 fortiss GmbH&#x0A;&#x0A;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#x0A;you may not use this file except in compliance with the License.&#x0A;You may obtain a copy of the License at&#x0A;&#x0A; http://www.apache.org/licenses/LICENSE-2.0&#x0A;&#x0A;Unless required by applicable law or agreed to in writing, software&#x0A;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#x0A;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either&#x0A;express or implied. See the License for the specific language&#x0A;governing permissions and limitations under the License.">
</property>
<property
name="startupProgressRect"
......
LoadACCExampleAction.java fd88330c3685e1b0aea6efab9231ecc122e0d932 GREEN
LoadECarExampleAction.java 3b6bdac54a65878a58a6443616403ea8fa3bd702 GREEN
LoadEmergencyStopExampleAction.java 181729c59bcb64d5fa3790482613b3cfc1a10522 GREEN
LoadEmergencyStopWeaklyCausalExampleAction.java 5ceb5396ecf202312956158c6bef06f383a05402 GREEN
LoadExampleActionBase.java e96dab785e50a85e5f7ca00fc4e16c85b8ecea3b GREEN
LoadMotorManagementExampleAction.java 6ff16ff5ae315aa0b777448ffb69a0471f0b7e04 GREEN
LoadOperatorPanelExampleAction.java f77d32db422df0a9d913ad09f537ca8a99ee4cef GREEN
LoadSimpleTrafficLightsAF3TourExampleAction.java 849f1009f041a2edbdbc03db8e8db5e2f2eb9963 GREEN
LoadSimpleTrafficLightsCodeGenerationExampleAction.java 36e9f1ed5f035c336efe01a60809867abe77c339 GREEN
LoadSimpleTrafficLightsExampleAction.java 8f7461217a7030cf32cf575472a150593c73575d GREEN
LoadSimpleTrafficLightsModesExampleAction.java 28760780aa3112e3dba39da5a618f66ee0baad1a GREEN
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the initial ACC example.
*
* @author wenwenchen
*/
public class LoadACCExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID, "test-data/ACC.af3_23", "ACC", suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the eCar example.
*
* @author wenwenchen
*/
public class LoadECarExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID, "test-data/eCar.af3_23", "eCar",
suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the initial version of the emergency stop module example.
*
* @author wenwenchen
*/
public class LoadEmergencyStopExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/Emergency-Stop-Module.af3_23", "Emergency-Stop-Module", suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the weakly causal version of the emergency stop module example.
*
* @author wenwenchen
*/
public class LoadEmergencyStopWeaklyCausalExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/Emergency-Stop-Module-Weakly-Causal.af3_23",
"Emergency-Stop-Module-Weakly-Causal", suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import static org.fortiss.af3.project.storage.LocationProvider.CURRENT_AF3_PROJECT_FILES_EXTENSION;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.createNewGeneralProject;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.generalProjectExists;
import static org.fortiss.af3.rcp.application.utils.ApplicationUtils.refreshWorkspace;
import static org.fortiss.af3.rcp.application.utils.ApplicationUtils.saveProject;
import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.intro.IIntroSite;
import org.eclipse.ui.intro.config.IIntroAction;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.utils.ProjectUtils;
import org.fortiss.af3.rcp.application.utils.ApplicationUtils;
/**
* Base class for loading standard examples.
*
* @author wenwenchen
*/
public abstract class LoadExampleActionBase implements IIntroAction {
/** The current AF3 model file extension. */
private static final String CURRENT_AF3_FILE_EXTENSION =
"." + CURRENT_AF3_PROJECT_FILES_EXTENSION;
/** {@inheritDoc} */
@Override
public void run(IIntroSite site, Properties params) {
final IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
PlatformUI.getWorkbench().getIntroManager().setIntroStandby(introPart, true);
startup();
loadExample(CURRENT_AF3_FILE_EXTENSION);
}
/**
* Method that is used by multiple command handlers to ensure that the
* Project exists that contains the *.af3_2x files and that the
* AF3-Perspective is activated.
*/
private void startup() {
// start up
if(!generalProjectExists()) {
// Create a generic project.
createNewGeneralProject();
}
// Enable the AF3 Perspective.
ApplicationUtils.switchToAF3Perspective();
}
/** load example according to example name */
protected abstract void loadExample(String suffix);
/**
* Loads an existing *.af3_2x Example file from a given path and adds it to
* the Model-Navigator.
*
* @param pluginID
* the plugin ID
* @param relativePath
* the relative path to the file
* @param projectName
* the name of the file
* @param suffix
* the suffix of the file
*/
protected synchronized static void loadExistingModel(String pluginID, String relativePath,
String projectName, String suffix) {
// Load file of the Example (do not create dummy, because
// otherwise the Example is shown twice).
FileProject project = ProjectUtils.loadProjectFromPlugin(pluginID, relativePath, false);
// Check if file name not already exists.
IFile targetProjectFile = ApplicationUtils.validateProjectName(projectName, suffix);
if(targetProjectFile != null) {
project.setName(targetProjectFile.getName().replace(suffix, ""));
// Save the project to workspace.
saveProject(project, targetProjectFile.getFullPath().toString());
refreshWorkspace();
}
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.mode.AF3ModeActivator;
/**
* Action to load the motor management example.
*
* @author wenwenchen
*/
public class LoadMotorManagementExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ModeActivator.PLUGIN_ID, "test-data/MotorManagement.af3_23",
"MotorManagement", suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the OperatorPanel example.
*
* @author wenwenchen
*/
public class LoadOperatorPanelExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/operator_panel_tutorial.af3_23", "OperatorPanel", suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the SimpleTrafficLights_AF3Tour example.
*
* @author wenwenchen
*/
public class LoadSimpleTrafficLightsAF3TourExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/SimpleTrafficLights_AF3Tour.af3_23", "SimpleTrafficLights_AF3Tour",
suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.example.SimpleTrafficLightsCodeGenerationExample;
import org.fortiss.af3.rcp.application.utils.ApplicationUtils;
/**
* Action to load the TLC example for code generation example.
*
* @author wenwenchen
*/
public class LoadSimpleTrafficLightsCodeGenerationExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
ApplicationUtils.createAndSaveProject("SimpleTrafficLightsCodeGenerationExample", suffix,
SimpleTrafficLightsCodeGenerationExample.INSTANCE);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
/**
* Action to load the basic TLC example.
*
* @author wenwenchen
*/
public class LoadSimpleTrafficLightsExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/SimpleTrafficLightsExample.af3_23", "SimpleTrafficLightsExample",
suffix);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application.actions;
import static org.fortiss.af3.rcp.application.utils.ApplicationUtils.createAndSaveProject;
import org.fortiss.af3.mode.ui.examples.SimpleTrafficLightsModesExample;
/**
* Action to load the TLC with modes example.
*
* @author wenwenchen
*/
public class LoadSimpleTrafficLightsModesExampleAction extends LoadExampleActionBase {
/** {@inheritDoc} */
@Override
protected void loadExample(String suffix) {
createAndSaveProject("SimpleTrafficLightsModesExample", suffix,
SimpleTrafficLightsModesExample.INSTANCE);
}
}
ApplicationActionBarAdvisor.java 3fe306058f621c9939d86984199522e47b3c1cbd GREEN
ApplicationWorkbenchAdvisor.java 5d1792809c752bedc08b6d9d993ecbf70b40982c GREEN
ApplicationActionBarAdvisor.java 881198ff05ab14110efef1673f0914725348442b GREEN
ApplicationWorkbenchAdvisor.java 19af4bc3262680a283eccccf92c4e2ae4463fa71 GREEN
ApplicationWorkbenchWindowAdvisor.java da5cb38300b384579532c678fbc9faa961c2ca6b GREEN
......@@ -16,19 +16,12 @@
package org.fortiss.af3.rcp.application.advisors;
import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX;
import static org.eclipse.wb.swt.ResourceManager.getPluginImageDescriptor;
import static org.fortiss.tooling.kernel.ui.util.TutorialUIServiceUtils.createTutorialMenu;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.showError;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
......@@ -37,18 +30,13 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.internal.actions.CommandAction;
import org.eclipse.ui.internal.actions.HelpContentsAction;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.fortiss.af3.rcp.help.AF3HelpActivator;
/**
* Action bar advisor for AF3 RCP.
......@@ -331,70 +319,13 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
* Registers the "AF3 Help" action and attaches it to the corresponding button.
*/
private void registerHelpContentsAction(IWorkbenchWindow window) {
if(IS_OS_LINUX) {
// Closing the help browser freezes the application.
// See https://af3-developer.fortiss.org/issues/3989
// Note: eclipse upstream issues exist with firefox:
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=187332
helpContentsAction = createHelpInBrowserAction(window).create(window);
} else {
helpContentsAction = ActionFactory.HELP_CONTENTS.create(window);
}
helpContentsAction = ActionFactory.HELP_CONTENTS.create(window);
helpContentsAction.setId("helpContentsAction");
helpContentsAction.setToolTipText("AF3 Help");
helpContentsAction.setText("AF3 &Help");
register(helpContentsAction);
}
/** Creates an action that launches the external browser to display the help pages. */
private ActionFactory createHelpInBrowserAction(IWorkbenchWindow window) {
if(window == null) {
throw new IllegalArgumentException();
}
// A non-anonymous class would just increase the code size.
@SuppressWarnings("restriction") IWorkbenchAction openExtHelpAction =
new HelpContentsAction(window) {
@Override
public void run() {
String errMsg = null;
try {
URL helpPluginURL = FileLocator.toFileURL(
Platform.getBundle(AF3HelpActivator.PLUGIN_ID).getEntry("/"));
URL helpIndexURL = new URL("file:/" + helpPluginURL.getPath() +
"html/getting_started.html");
final IWebBrowser browser = window.getWorkbench().getBrowserSupport()
.createBrowser("dummyID");
browser.openURL(helpIndexURL);
} catch(PartInitException e) {
errMsg = "Could not open browser.\n\n" + e.getLocalizedMessage();
} catch(MalformedURLException e) {
errMsg = "URL to user documentation is not correct.\n\n" +
e.getLocalizedMessage();
} catch(IOException e) {
errMsg = "I/O error: Could not access the user documentation.\n\n" +
e.getLocalizedMessage();
} finally {
if(errMsg != null) {
showError(errMsg);
}
}
}
};
return new ActionFactory("helpContents", //$NON-NLS-1$
IWorkbenchCommandConstants.HELP_HELP_CONTENTS) {
@Override
public IWorkbenchAction create(IWorkbenchWindow window) {
IWorkbenchAction action = openExtHelpAction;
action.setId(getId());
return action;
}
};
}
/**
* Registers the "New AF3 Project" action and attaches it to the corresponding button.
*/
......