Commit 5f049423 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Merge branch '3976' into 'master'

3976

See merge request af3/af3!315
parents b47c281c b03f0747
......@@ -281,9 +281,6 @@
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.StrategyUndevelopedEntity">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedAF3Element">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedContext">
</contextMenuContribution>
......@@ -293,48 +290,24 @@
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedGoal">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedRequirement">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedSolution">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.MakeAChoice">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferenceMode">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferenceState">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferencePlatform">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferenceGeneratedCode">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ConnectTheAwayEntity">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.DeleteAwayEntityReference">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.DeleteReference">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.DeleteRequirementReference">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedDocument">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GenerateModuleConnections">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.exporter.commands.ExportAssuranceArgumentsToImage">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ShowPotentialChangeImpact">
</contextMenuContribution>
......@@ -347,27 +320,6 @@
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.SCElementIsPrivate">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferenceInputPortToContext">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferenceOutputPortToContext">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.ReferencePortToAssumption">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.DeleteInputPortReference">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedComponentInputPorts">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoToReferencedComponentOutputPorts">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.DeleteOutputPortReference">
</contextMenuContribution>
</extension>
<extension
point="org.eclipse.ui.views">
......@@ -410,33 +362,6 @@
type="org.fortiss.af3.safetycases.model.ArgumentModule">
</input>
</propertySection>
<propertySection
afterSection="org.fortiss.af3.safetycases.ui.properties.ArgumentElementPropertySection"
class="org.fortiss.af3.safetycases.ui.properties.RequirementLinkPropertySection"
id="org.fortiss.af3.safetycases.ui.properties.RequirementLinkPropertySection"
tab="org.fortiss.tooling.kernel.ui.property.tab.general">
<input
type="org.fortiss.af3.safetycases.model.Solution">
</input>
</propertySection>
<propertySection
afterSection="org.fortiss.af3.safetycases.ui.properties.ArgumentElementPropertySection"
class="org.fortiss.af3.safetycases.ui.properties.GoalPropertySection"
id="org.fortiss.af3.safetycases.ui.properties.GoalPropertySection"
tab="org.fortiss.tooling.kernel.ui.property.tab.general">
<input
type="org.fortiss.af3.safetycases.model.Goal">
</input>
</propertySection>
<propertySection
afterSection="org.fortiss.af3.safetycases.ui.properties.GoalPropertySection"
class="org.fortiss.af3.safetycases.ui.properties.RequirementLinkPropertySection"
id="org.fortiss.af3.safetycases.ui.properties.RequirementLinkPropertySection"
tab="org.fortiss.tooling.kernel.ui.property.tab.general">
<input
type="org.fortiss.af3.safetycases.model.Goal">
</input>
</propertySection>
<propertySection
afterSection="org.fortiss.af3.safetycases.ui.properties.RequirementLinkPropertySection"
class="org.fortiss.af3.safetycases.ui.properties.QuantitativeEvaluationPropertySection"
......
ConnectAssumptionToAF3Mode.java 8dc15d9a4265f815af1ca65389d2f6829afae975 GREEN
ConnectAssumptionToAF3State.java 8ba58e73ba9d61ac06ecc86867b633086391a2f5 GREEN
ConnectAssumptionToInputPortsAction.java 9701858808932a2fd7ee59ab2cae1d2ca00b3136 GREEN
ConnectAwayContextToContextAction.java 999f140af2c6b51e69ecb9601d72262fb9943d89 GREEN
ConnectAwayGoalToGoalAction.java f3759db771f9eaa662883e27cfbdcabef9353a97 GREEN
ConnectAwaySolutionToSolutionAction.java 03377b379eb08b4075b798d2e287aa5be93ad1ea GREEN
ConnectContextToInputPortsAction.java 4418ea42cd107f240fa87b594083c9bc8ea6f482 GREEN
ConnectContextToOutputPortsAction.java a68912fc8f50dd884b7a9575008f645b8f43da1f GREEN
ConnectGoalToAF3LogicalComponentAction.java 8c167ce5d8d4d748f0f22050bd593996788eae76 GREEN
ConnectSolutionToAF3PlatformEvidenceAction.java bcbf81da1398d64988c8acb5cb0b29bf83162de9 GREEN
ConnectSolutionToGeneratedCode.java e7d981bcf0e5fc304bb12c8df3e463098ad38e51 GREEN
ConnectAwayContextToContextAction.java 05da685350cc930ea44e52e2f7a97d2cba3a052c GREEN
ConnectAwayGoalToGoalAction.java c1b4fbf4cc43b2b1ff78caa35d2173db754793b5 GREEN
ConnectAwaySolutionToSolutionAction.java 318633230d566f1b620be3db31a6d140e932af31 GREEN
DownloadSafetyClaimPatternsDatabaseFromLibrary.java 8d47597b2d89dc72c99fab55666f4fc416a7a5c4 GREEN
/*-------------------------------------------------------------------------+
| Copyright 2017 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.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openWarning;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openAF3Modes;
import static org.fortiss.af3.safetycases.ui.utils.Utils.scopeAF3ElementToArgumentElement;
import static org.fortiss.af3.safetycases.utils.SafetyCasesUtils.getReferredSpinalElement;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import org.eclipse.emf.common.util.EList;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.mode.model.Mode;
import org.fortiss.af3.mode.model.ModeAutomaton;
import org.fortiss.af3.safetycases.model.Assumption;
import org.fortiss.af3.safetycases.model.DecomposableSpinalElement;
import org.fortiss.tooling.base.model.base.HierarchicElementBase;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
/**
* This class implements the action of designating a {@link Mode} to the selected {@link Assumption}
* , in order to express that one of the assumptions under which the safety argumentation is
* modeled is that a certain {@link Component} is in the selected {@link Mode}.
* .
*
* @author carlan
*/
public class ConnectAssumptionToAF3Mode extends EObjectActionBase<Assumption> {
/** The default shell. */
private final Shell shell;
/** Constructor. */
public ConnectAssumptionToAF3Mode(Assumption editedObject, Shell shell) {
super("ConnectAssumptionToAF3Mode",
imageDescriptorFromBundle(PLUGIN_ID, "icons/unkown.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
/** {@inheritDoc} */
@Override
public void run() {
HierarchicElementBase selected = null;
if(getTarget().getAf3Element() != null) {
selected = (HierarchicElementBase)getTarget().getAf3Element();
}
Mode selectedAF3Element = null;
DecomposableSpinalElement referredSpinalElement = getReferredSpinalElement(getTarget());
/** A decomposable spinal element will only refer to a logical component. */
Component scope = (Component)referredSpinalElement.getAf3Element();
if(scope != null) {
EList<ModeAutomaton> modeAutomata =
pickInstanceOf(ModeAutomaton.class, scope.getSpecifications());
if(modeAutomata != null) {
selectedAF3Element = openAF3Modes(shell.getShell(), scope, selected);
} else {
openWarning(shell.getShell(), "Warning",
"The selected scope does not have any mode specification!");
}
} else {
openWarning(shell.getShell(), "Warning",
"There is no selected scope for this assumption!");
}
if(selectedAF3Element == null || selectedAF3Element == selected) {
return;
}
scopeAF3ElementToArgumentElement(selectedAF3Element, getTarget());
}
}
/*-------------------------------------------------------------------------+
| Copyright 2017 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.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openWarning;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openAF3State;
import static org.fortiss.af3.safetycases.ui.utils.Utils.scopeAF3ElementToArgumentElement;
import static org.fortiss.af3.safetycases.utils.SafetyCasesUtils.getReferredSpinalElement;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import org.eclipse.emf.common.util.EList;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.safetycases.model.Assumption;
import org.fortiss.af3.safetycases.model.DecomposableSpinalElement;
import org.fortiss.af3.state.model.State;
import org.fortiss.af3.state.model.StateAutomaton;
import org.fortiss.tooling.base.model.base.HierarchicElementBase;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
/**
* This class implements the action of designating a {@link State} to the selected
* {@link Assumption} , in order to express that one of the assumptions under which the safety
* argumentation is modeled is that a certain {@link Component} is in the selected {@link State}.
*
* @author carlan
*/
public class ConnectAssumptionToAF3State extends EObjectActionBase<Assumption> {
/** The default shell. */
private final Shell shell;
/** Constructor. */
public ConnectAssumptionToAF3State(Assumption editedObject, Shell shell) {
super("ConnectAssumptionToAF3Mode",
imageDescriptorFromBundle(PLUGIN_ID, "icons/unkown.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
/** {@inheritDoc} */
@Override
public void run() {
HierarchicElementBase selected = null;
if(getTarget().getAf3Element() != null) {
selected = (HierarchicElementBase)getTarget().getAf3Element();
}
State selectedAF3Element = null;
DecomposableSpinalElement referredSpinalElement = getReferredSpinalElement(getTarget());
/** A decomposable spinal element will only refer to a logical component. */
Component scope = (Component)referredSpinalElement.getAf3Element();
if(scope != null) {
EList<StateAutomaton> stateAutomata =
pickInstanceOf(StateAutomaton.class, scope.getSpecifications());
if(stateAutomata != null) {
selectedAF3Element = openAF3State(shell.getShell(), scope, selected);
} else {
openWarning(shell.getShell(), "Warning",
"The selected scope does not have any state specification!");
}
} else {
openWarning(shell.getShell(), "Warning",
"There is no selected scope for this assumption!");
}
if(selectedAF3Element == null || selectedAF3Element == selected) {
return;
}
scopeAF3ElementToArgumentElement(selectedAF3Element, getTarget());
}
}
/*-------------------------------------------------------------------------+
| Copyright 2019 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.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openLogicalComponents;
import static org.fortiss.af3.safetycases.ui.utils.Utils.messageChangeReferencedInputPorts;
import static org.fortiss.af3.safetycases.ui.utils.Utils.messageComponentHasNoInputPorts;
import static org.fortiss.tooling.kernel.service.IPersistencyService.getInstance;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElements;
import java.util.List;
import org.eclipse.emf.common.util.EList;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.safetycases.model.Assumption;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
/**
* This class implements the action of designating a port/ports {@link Port} to an
* {@link Assumption}
*
* @author tsalidis
*/
public class ConnectAssumptionToInputPortsAction extends EObjectActionBase<Assumption> {
/** The default shell. */
private final Shell shell;
/** Constructor. */
public ConnectAssumptionToInputPortsAction(Assumption editedObject, Shell shell) {
super("ConnectPortsToAssumption",
imageDescriptorFromBundle(PLUGIN_ID, "Icon_Requirement.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
/** {@inheritDoc} */
@Override
public void run() {
List<ComponentArchitecture> componentArchitectureList =
getRootElements(getTarget(), ComponentArchitecture.class);
if(componentArchitectureList.isEmpty()) {
openError(shell, "Component Architecture", "Cannot find Component Architecture!");
return;
}
EList<InputPort> selected = null;
// clearing the lists
final ITopLevelElement topLevelElement =
getInstance().getTopLevelElementFor(getTarget().getContainer());
topLevelElement.runAsCommand(new Runnable() {
@Override
public void run() {
getTarget().getInputPorts().clear();
}
});
final Component component =
openLogicalComponents(shell.getShell(), componentArchitectureList);
if(getTarget().getInputPorts() != null) {
selected = getTarget().getInputPorts();
if(!selected.equals(component.getInputPorts())) {
boolean go = messageChangeReferencedInputPorts();
if(!go) {
return;
}
}
}
selected = getTarget().getInputPorts();
EList<InputPort> selectedComponentInputPorts = component.getInputPorts();
if(selectedComponentInputPorts.isEmpty()) {
boolean go = messageComponentHasNoInputPorts();
if(!go) {
return;
}
}
final ITopLevelElement topLevelAnalysis =
getInstance().getTopLevelElementFor(component.getContainer());
topLevelAnalysis.runAsCommand(new Runnable() {
@Override
public void run() {
getTarget().setAf3Element(component);
for(int i = 0; i < selectedComponentInputPorts.size(); i++) {
getTarget().getInputPorts().add(selectedComponentInputPorts.get(i));
}
}
});
}
}
......@@ -20,14 +20,18 @@ import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openContexts;
import static org.fortiss.af3.safetycases.ui.utils.Utils.noReferenceableAwayArgumentElements;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElements;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.safetyargumentationpackage.model.SafetyArgumentationPackage;
import org.fortiss.af3.safetycases.model.AwayContext;
import org.fortiss.af3.safetycases.model.Context;
import org.fortiss.af3.safetycases.model.SafetyCase;
import org.fortiss.af3.safetycases.model.SafetyModule;
import org.fortiss.af3.safetycases.model.VISIBILITY;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.service.IPersistencyService;
......@@ -57,8 +61,16 @@ public class ConnectAwayContextToContextAction extends EObjectActionBase<AwayCon
public void run() {
List<SafetyArgumentationPackage> sapList =
getRootElements(getTarget(), SafetyArgumentationPackage.class);
Class<?>[] classes = new Class<?>[] {Context.class, SafetyModule.class, SafetyCase.class,
SafetyArgumentationPackage.class};
// extracts all the contexts from the Safety Assurance package
List<EObject> referenceable =
noReferenceableAwayArgumentElements(getTarget(), classes, Context.class);
if(sapList.isEmpty()) {
openError(shell, "Warning", "Cannot find any Safety Argumentation Packages!");
openError(shell, "Warning", "Cannot find any Assurance Packages! ");
return;
} else if(referenceable.isEmpty()) {
openError(shell, "Warning", "No contexts available!");
return;
}
Context selected = null;
......
......@@ -15,23 +15,30 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.safetycases.ui.action;
import static java.util.Collections.emptyList;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openGoalsToConnectToAwayGoal;
import static org.fortiss.af3.safetycases.ui.utils.Utils.noReferenceableAwayArgumentElements;
import static org.fortiss.tooling.kernel.service.IPersistencyService.getInstance;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElements;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.safetyargumentationpackage.model.SafetyArgumentationPackage;
import org.fortiss.af3.safetycases.model.AwayGoal;
import org.fortiss.af3.safetycases.model.Goal;
import org.fortiss.af3.safetycases.model.SafetyCase;
import org.fortiss.af3.safetycases.model.SafetyModule;
import org.fortiss.af3.safetycases.model.VISIBILITY;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* This class implements the action of designating a {@link Goal} to be referenced by the selected
......@@ -58,14 +65,24 @@ public class ConnectAwayGoalToGoalAction extends EObjectActionBase<AwayGoal> {
List<SafetyArgumentationPackage> sapList =
getRootElements(getTarget(), SafetyArgumentationPackage.class);
Class<?>[] classes = new Class<?>[] {Goal.class, SafetyModule.class, SafetyCase.class,
SafetyArgumentationPackage.class};
// extracts all goals from the Safety Assurance package
List<EObject> referenceable =
noReferenceableAwayArgumentElements(getTarget(), classes, Goal.class);
if(sapList.isEmpty()) {
openError(shell, "Warning", "Cannot find any Safety Argumentation Packages!");
openError(shell, "Warning", "Cannot find any Assurance Packages!");
return;
} else if(referenceable.isEmpty()) {
openError(shell, "Warning", "No goals available!");
return;
}
Goal selected = null;
if(getTarget().getPointsTo() != null) {
selected = (Goal)getTarget().getPointsTo();
}
final Goal selectedGoal =
openGoalsToConnectToAwayGoal(shell.getShell(), sapList, selected, getTarget());
if(selectedGoal == null || selectedGoal == selected) {
......@@ -99,4 +116,17 @@ public class ConnectAwayGoalToGoalAction extends EObjectActionBase<AwayGoal> {
}
});
}
/**
* @param parentElement
* @return list with the direct children of the parent
*/
public List<? extends EObject> getChildren(EObject parentElement) {
IModelElementHandler<EObject> base =
IModelElementHandlerService.getInstance().getModelElementHandler(parentElement);
if(base != null) {
return base.getSubnodes(parentElement);
}
return emptyList();
}
}
......@@ -20,14 +20,18 @@ import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openSolutions;
import static org.fortiss.af3.safetycases.ui.utils.Utils.noReferenceableAwayArgumentElements;
import static org.fortiss.tooling.kernel.service.IPersistencyService.getInstance;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElements;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.widgets.Shell;
import org.fortiss.af3.safetyargumentationpackage.model.SafetyArgumentationPackage;
import org.fortiss.af3.safetycases.model.AwaySolution;
import org.fortiss.af3.safetycases.model.SafetyCase;
import org.fortiss.af3.safetycases.model.SafetyModule;
import org.fortiss.af3.safetycases.model.Solution;
import org.fortiss.af3.safetycases.model.VISIBILITY;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
......@@ -57,8 +61,16 @@ public class ConnectAwaySolutionToSolutionAction extends EObjectActionBase<AwayS
public void run() {
List<SafetyArgumentationPackage> sapList =
getRootElements(getTarget(), SafetyArgumentationPackage.class);
Class<?>[] classes = new Class<?>[] {Solution.class, SafetyModule.class, SafetyCase.class,