Commit f0e5d245 authored by Liana Soima's avatar Liana Soima
Browse files

Deleted classes



Classes were deleted.
Signed-off-by: Liana Soima's avatarLiana Soima <soima@fortiss.org>
Issue-Ref: 3976
parent 4d1daac1
......@@ -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,39 +290,18 @@
<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>
......@@ -344,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">
......@@ -407,15 +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.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.RequirementLinkPropertySection"
class="org.fortiss.af3.safetycases.ui.properties.QuantitativeEvaluationPropertySection"
......
ConnectAssumptionToAF3Mode.java 8dc15d9a4265f815af1ca65389d2f6829afae975 GREEN
ConnectAssumptionToAF3State.java 8ba58e73ba9d61ac06ecc86867b633086391a2f5 GREEN
ConnectAssumptionToInputPortsAction.java 9701858808932a2fd7ee59ab2cae1d2ca00b3136 GREEN
ConnectAwayContextToContextAction.java 88286e375bd6a5452b592df298db4a245d57aa49 YELLOW
ConnectAwayGoalToGoalAction.java e55f53a1bdfd6d6474f36336917ecd02d04c5b93 YELLOW
ConnectAwaySolutionToSolutionAction.java e68855f6bbdfb4016c8c1925daff7fb490a9397d YELLOW
ConnectContextToInputPortsAction.java 4418ea42cd107f240fa87b594083c9bc8ea6f482 GREEN
ConnectContextToOutputPortsAction.java a68912fc8f50dd884b7a9575008f645b8f43da1f GREEN
ConnectGoalToAF3LogicalComponentAction.java 8c167ce5d8d4d748f0f22050bd593996788eae76 GREEN
ConnectSolutionToAF3PlatformEvidenceAction.java bcbf81da1398d64988c8acb5cb0b29bf83162de9 GREEN
ConnectSolutionToGeneratedCode.java e7d981bcf0e5fc304bb12c8df3e463098ad38e51 GREEN
ConnectAwayContextToContextAction.java 66185a1e0f28bdeb4b41caed386191982fa5845c YELLOW
ConnectAwayGoalToGoalAction.java 11c0f4e48d7d53dba8d416931e7d6866ce9d7ca1 YELLOW
ConnectAwaySolutionToSolutionAction.java d4c8c847f12f4a07f19681d9cd75ce5b0407f700 YELLOW
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));
}
}
});
}
}
......@@ -67,7 +67,7 @@ public class ConnectAwayContextToContextAction extends EObjectActionBase<AwayCon
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 Safety Assurance Packages!");
return;
} else if(referenceable.isEmpty()) {
openError(shell, "Warning", "No contexts available!");
......
......@@ -71,7 +71,7 @@ public class ConnectAwayGoalToGoalAction extends EObjectActionBase<AwayGoal> {
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 Safety Assurance Packages!");
return;
} else if(referenceable.isEmpty()) {
openError(shell, "Warning", "No goals available!");
......
......@@ -67,7 +67,7 @@ public class ConnectAwaySolutionToSolutionAction extends EObjectActionBase<AwayS
List<EObject> referenceable =
noReferenceableAwayArgumentElements(getTarget(), classes, Solution.class);
if(sapList.isEmpty()) {
openError(shell, "Warning", "Cannot find any Safety Argumentation Packages!");
openError(shell, "Warning", "Cannot find any Safety Assurance Packages!");
return;
} else if(referenceable.isEmpty()) {
openError(shell, "Warning", "No solutions available!");
......
/*-------------------------------------------------------------------------+
| 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.Context;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
/**
* This class implements the action of designating input port/ports {@link Port} to an
* {@link Context}
*
* @author tsalidis
*/
public class ConnectContextToInputPortsAction extends EObjectActionBase<Context> {
/** The default shell. */
private final Shell shell;
/** Constructor. */
public ConnectContextToInputPortsAction(Context editedObject, Shell shell) {
super("ConnectPortsToContext", imageDescriptorFromBundle(PLUGIN_ID, "").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 topLevelComponent =
getInstance().getTopLevelElementFor(component.getContainer());
topLevelComponent.runAsCommand(new Runnable() {
@Override
public void run() {
getTarget().setAf3Element(component);
for(int i = 0; i < selectedComponentInputPorts.size(); i++) {
getTarget().getInputPorts().add(selectedComponentInputPorts.get(i));
}
}
});
}
}
/*-------------------------------------------------------------------------+
| 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 |