Commit 5496e8f7 authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch '3946' into 'master'

3946: Remove unused GEF/SWT editors/views

See merge request !47
parents 3b274afa bca42ee1
......@@ -60,7 +60,6 @@
<li>MIRA: Status cells are also editable where they should not (<a href="https://git.fortiss.org/af3/af3/-/issues/4133">#4133</a>)</li>
<li>[DSE] Enable import of partition architectures (<a href="https://git.fortiss.org/af3/af3/-/issues/4127">#4127</a>)</li>
<li>Implement a JFX controller for the creation and visualization of reference lists (<a href="https://git.fortiss.org/af3/af3/-/issues/4092">#4092</a>)</li>
<li>LibraryView to JavaFX (<a href="https://git.fortiss.org/af3/af3/-/issues/4019">#4019</a>)</li>
<li>Introduce Zoom control (<a href="https://git.fortiss.org/af3/af3/-/issues/3843">#3843</a>)</li>
<li>Fix: icons in requirement editor do not vanish correctly when collapsing row items (<a href="https://git.fortiss.org/af3/af3/-/issues/4166">#4166</a>)</li>
<li>[Allocation] Exclude parameter tables when traversing allocation tables (<a href="https://git.fortiss.org/af3/af3/-/issues/4158">#4158</a>)</li>
......
......@@ -106,7 +106,6 @@
<li> MIRA: Status cells are also editable where they should not (#4133)
<li> [DSE] Enable import of partition architectures (#4127)
<li> Implement a JFX controller for the creation and visualization of reference lists (#4092)
<li> LibraryView to JavaFX (#4019)
<li> Introduce Zoom control (#3843)
<li> Fix: icons in requirement editor do not vanish correctly when collapsing row items (#4147)
<li> [Allocation] Exclude parameter tables when traversing allocation tables (#4158)
......
......@@ -190,12 +190,6 @@
id="org.fortiss.af3.rcp.application.loadOperatorPanelExample"
name="LoadOperatorPanelExample">
</command>
<command
categoryId="org.eclipse.ui.category.file"
defaultHandler="org.fortiss.af3.rcp.application.handler.ApplicationCommandHandler$NewAF3LibraryCommandHandler"
id="org.fortiss.af3.rcp.application.newaf3library"
name="NewAF3Library">
</command>
<command
categoryId="org.eclipse.ui.category.file"
defaultHandler="org.fortiss.af3.rcp.application.handler.ApplicationCommandHandler$AF3ExitCommandHandler"
......
AF3Application.java 9bd897f7c02bfffc9be41c4fcb9ceca088a574b4 GREEN
AF3ApplicationActivator.java cf948c7116dae2311d06e2fa54f51fd05aa3f2e8 GREEN
NewProjectContextMenu.java cda28ae7d66ca140f24d13ec2e205c02068c3dc1 GREEN
NewProjectContextMenu.java a0e492e3015c7cbb0bb8838891a7700e15fea778 GREEN
......@@ -15,10 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.rcp.application;
import static org.fortiss.af3.rcp.application.advisors.ApplicationActionBarAdvisor.getNewAF3LibraryAction;
import static java.util.Collections.singletonList;
import static org.fortiss.af3.rcp.application.advisors.ApplicationActionBarAdvisor.getNewAF3ProjectAction;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
......@@ -42,12 +41,10 @@ public class NewProjectContextMenu implements IContextMenuContributor {
ContextMenuContextProvider contextProvider) {
// if the user right-clicks in an empty area (no selection)
if(selection == null && INavigatorService.getInstance().isNavigatorView(contextProvider) &&
getNewAF3ProjectAction() != null && getNewAF3LibraryAction() != null) {
getNewAF3ProjectAction() != null) {
// add possibility to create new projects to context menu
List<IContributionItem> contributionItems = new ArrayList<IContributionItem>();
contributionItems.add(new ActionContributionItem(getNewAF3ProjectAction()));
contributionItems.add(new ActionContributionItem(getNewAF3LibraryAction()));
return contributionItems;
return singletonList((new ActionContributionItem(getNewAF3ProjectAction())));
}
return null;
}
......
ApplicationActionBarAdvisor.java 881198ff05ab14110efef1673f0914725348442b GREEN
ApplicationActionBarAdvisor.java 7346ff02f98249d473d19a653a1d2a3fdc0cf334 GREEN
ApplicationWorkbenchAdvisor.java 19af4bc3262680a283eccccf92c4e2ae4463fa71 GREEN
ApplicationWorkbenchWindowAdvisor.java da5cb38300b384579532c678fbc9faa961c2ca6b GREEN
......@@ -104,9 +104,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
/** AF3-Specific Action to crate a new empty project. */
private static WorkbenchCommandAction newAF3ProjectAction;
/** AF3-Specific Action to crate a new empty library. */
private static WorkbenchCommandAction newAF3LibraryAction;
/** Open the "goBack" view. */
private static IWorkbenchAction goBack;
......@@ -210,7 +207,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
register(deleteAction);
registerCreateNewProject(window);
registerCreateNewLibrary(window);
registerLoadSimpleTrafficLightsExample(window);
registerLoadSimpleTrafficLightsModesExample(window);
registerLoadSimpleTrafficLightsCodeGenerationExample(window);
......@@ -336,16 +332,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
null, window);
}
/**
* Registers the "New AF3 Library" action and attaches it to the corresponding button.
*/
private void registerCreateNewLibrary(IWorkbenchWindow window) {
newAF3LibraryAction = createAndRegisterWorkBenchCommandAction("New AF3 Library",
"org.fortiss.af3.rcp.application.newaf3library", getPluginImageDescriptor(
"org.fortiss.af3.rcp.application", "icons/new_library.png"),
null, window);
}
/**
* Registers the "Load Simple Traffic Lights Example" action and attaches it to the
* corresponding button.
......@@ -530,7 +516,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
ToolBarManager toolBarManager = new ToolBarManager();
coolBar.add(toolBarManager);
toolBarManager.add(newAF3ProjectAction);
toolBarManager.add(newAF3LibraryAction);
toolBarManager.add(new Separator());
toolBarManager.add(saveAction);
toolBarManager.add(new Separator());
......@@ -547,7 +532,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
IWorkbenchActionConstants.M_FILE);
menuBar.add(fileMenu);
fileMenu.add(newAF3ProjectAction);
fileMenu.add(newAF3LibraryAction);
MenuManager openAF3ExampleMenuManager = new MenuManager("Open AF3 Example");
fileMenu.add(openAF3ExampleMenuManager);
......@@ -602,11 +586,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
helpMenu.add(showModelStorageErrorDialogAction);
}
/** Returns defined action to create new AF3 Library. */
public static WorkbenchCommandAction getNewAF3LibraryAction() {
return newAF3LibraryAction;
}
/** Returns defined action to create new AF3 Project. */
public static WorkbenchCommandAction getNewAF3ProjectAction() {
return newAF3ProjectAction;
......
ApplicationCommandHandler.java 3225d9f72590fcea939b14cae05467cbace1f438 GREEN
ApplicationCommandHandler.java b875be2e477ee14f4b60f6dddbafc984968c9ce3 GREEN
......@@ -17,11 +17,9 @@
package org.fortiss.af3.rcp.application.handler;
import static org.conqat.ide.commons.ui.logging.LoggingUtils.logAndShowError;
import static org.conqat.ide.commons.ui.ui.WorkbenchUtils.getActiveWorkbenchWindow;
import static org.eclipse.emf.common.util.URI.createFileURI;
import static org.eclipse.emf.common.util.URI.createPlatformPluginURI;
import static org.eclipse.jface.dialogs.ErrorDialog.openError;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.PlatformUI.getWorkbench;
import static org.eclipse.ui.internal.about.AboutUtils.openErrorLogBrowser;
import static org.fortiss.af3.project.AF3Project.AF3_PRJ_SUFFIX;
......@@ -30,7 +28,6 @@ import static org.fortiss.af3.project.ui.utils.ExportProjectUtils.fileSelectionD
import static org.fortiss.af3.project.ui.utils.ExportProjectUtils.getSelectedFileProject;
import static org.fortiss.af3.project.ui.utils.ImportProjectUtils.fileSelectionDialog;
import static org.fortiss.af3.project.ui.utils.ImportProjectUtils.importUISelectedFile;
import static org.fortiss.af3.project.utils.LibraryModelElementFactory.createFileLibrary;
import static org.fortiss.af3.rcp.application.utils.ApplicationUtils.switchToAF3Perspective;
import static org.fortiss.tooling.kernel.utils.EMFResourceUtils.refreshWorkspace;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
......@@ -38,30 +35,23 @@ import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import java.io.File;
import java.util.List;
import org.conqat.ide.commons.ui.ui.WorkbenchUtils;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.expression.examples.ConfiguredExpressionExample;
import org.fortiss.af3.mode.AF3ModeActivator;
import org.fortiss.af3.mode.ui.examples.SimpleTrafficLightsModesExample;
import org.fortiss.af3.project.example.IExample;
import org.fortiss.af3.project.model.FileLibrary;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.ui.utils.FileNameValidatorUtil;
import org.fortiss.af3.project.utils.ProjectUtils;
import org.fortiss.af3.rcp.application.AF3ApplicationActivator;
import org.fortiss.af3.rcp.application.example.SimpleTrafficLightsCodeGenerationExample;
import org.fortiss.af3.rcp.application.utils.ApplicationUtils;
import org.fortiss.tooling.kernel.extension.data.ModelStorageError;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.internal.views.library.LibraryViewPart;
/**
* The ApplicationCommandHandler has several nested classes, each for handling a
......@@ -131,42 +121,6 @@ public class ApplicationCommandHandler {
}
}
/** Handles the command action to create a new AF3 library. */
public static final class NewAF3LibraryCommandHandler extends AbstractHandler {
/**
* Execute definition that creates a new AF3 library and, if required, a
* new general library directory.
*/
@Override
public Object execute(ExecutionEvent event) {
// Create a new AF3 library.
try {
InputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(), "",
"Please enter a library name", "AF3-Library", new FileNameValidatorUtil());
if(dlg.open() != Window.OK) {
return null;
}
FileLibrary library = createFileLibrary(dlg.getValue());
// If a file with this name already exists.
if(!ProjectUtils.saveFileLibrary(library)) {
openError(getActiveWorkbenchWindow().getShell(),
"Error While Saving the Library",
"A library with name " + dlg.getValue() + " already exists");
}
WorkbenchUtils.getActiveWorkbenchPage().showView(LibraryViewPart.ID);
} catch(Exception e) {
openError(getActiveWorkbenchWindow().getShell(), "Error", e.getMessage());
return false;
}
return null;
}
}
/** Handles the command action to create the standard SimpleTrafficLightsExample project. */
public static final class LoadSimpleTrafficLightsExampleCommandHandler extends AbstractHandler {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment