Commit dbbd1726 authored by Carmen Carlan's avatar Carmen Carlan
Browse files

Code review



Issue-ref: 3986
Signed-off-by: Carmen Carlan's avatarCarmen Carlan <carlan@fortiss.org>
parent 97c1aa1a
ConnectAwayContextToContextAction.java 05da685350cc930ea44e52e2f7a97d2cba3a052c GREEN
ConnectAwayGoalToGoalAction.java c1b4fbf4cc43b2b1ff78caa35d2173db754793b5 GREEN
ConnectAwaySolutionToSolutionAction.java 318633230d566f1b620be3db31a6d140e932af31 GREEN
ConnectToSystemModelElementsAction.java 7ccfe4fe066a718b6c938bb06d21ca678b98434f YELLOW
ConnectToSystemModelElementsAction.java 7ccfe4fe066a718b6c938bb06d21ca678b98434f GREEN
DownloadSafetyClaimPatternsDatabaseFromLibrary.java 8d47597b2d89dc72c99fab55666f4fc416a7a5c4 GREEN
SetAsImpactedAction.java d3d608dfd2dc2709d4e57d16bee28c8ddaeac245 YELLOW
SolveImpactAction.java 49f46b163e375c32451b1731577732555b16664e YELLOW
SetAsImpactedAction.java cf4e53f5a568bd37674d864526194b3d64f3d95a GREEN
SolveImpactAction.java 275ffd50dcf0e933fa9cdee829700aadca1b550e GREEN
......@@ -16,9 +16,7 @@
package org.fortiss.af3.safetycases.ui.action;
import static java.util.Arrays.asList;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.swt.widgets.Display.getCurrent;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getAllocationTables;
import static org.fortiss.af3.safetycases.ui.utils.MaintenanceUtils.propagatedImpactOnAwayElements;
import static org.fortiss.af3.safetycases.ui.utils.Utils.centerWizard;
......@@ -107,12 +105,6 @@ public class SetAsImpactedAction extends EObjectActionBase<ArgumentElement> {
topLevel.runAsCommand(new Runnable() {
@Override
public void run() {
boolean go = openConfirm(getCurrent().getActiveShell(), "",
"Are you sure you want to set this argument element as Challenged or Potentially/Actually Impacted?");
if(!go) {
return;
}
if(selectedArgumentElement != null) {
createDialog(selectedArgumentElement, shell);
if(wizardDialog.open() == Window.OK) {
......@@ -163,9 +155,6 @@ public class SetAsImpactedAction extends EObjectActionBase<ArgumentElement> {
/**
* Creates a dialog with 2 pages. First page connects the {@link ArgumentElement} with a
* requirement, and the second page defines the type of change.
*
* @param selectedArgumentElement
* @param shell
*/
private void createDialog(ArgumentElement selectedArgumentElement, Shell shell) {
Collection<Class<? extends IProjectRootElement>> roots =
......
......@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
/**
* This class implements the action of deleting the impact on an {@link ArgumentElement}
* This class implements the action of deleting the impact on an {@link ArgumentElement}.
*
* @author liana
*/
......
ConnectTheAwayEntity.java ae9f3254331beb4b1fc692c7311e75a2fe650324 GREEN
ConnectToSystemModelElements.java 924f9a04058eca7342232f305d9adcfe431deb03 YELLOW
ConnectToSystemModelElements.java b2ff13e3db620a858933ab3ef934c468e67fa752 GREEN
DeleteAwayEntityReference.java 6e1abf1dbc38b06677b123f478d73203baaa7e3b GREEN
GenerateModuleConnections.java f07409c4f9276d9359991ec4cd0ddaaed76839dd GREEN
GoToReferencedContext.java 63d7dfa58c4d64e2a4eb830dba9099b6eca973c2 GREEN
......@@ -10,8 +10,8 @@ GoToReferencedSolution.java a8722e0c0568ff2d7f7209a844b488daef482715 GREEN
GoalToBeSupportedByContract.java 77a97f68382aa99350120a91f84517eee1d363ad GREEN
GoalUndevelopedEntity.java 8b83d59da580cb431a00d0072e5fbefb022d3637 GREEN
MakeAChoice.java f8e7f4185bfeb451faf47b111826830aee3f55e3 GREEN
SCElementIsImpacted.java 745436bf71435bd50e28450cdd3090201e1a175c YELLOW
SCElementIsImpacted.java 745436bf71435bd50e28450cdd3090201e1a175c GREEN
SCElementIsInstantiated.java 87284c59ee3f65266cf746bf64ab9605b2ea39a5 GREEN
SCElementIsPrivate.java 30a3bf574a42284a97d6a840de31aad61f4258f8 GREEN
ShowPotentialChangeImpact.java 747a3c979e9a58e025bb6b9377f9125809a04a7d YELLOW
ShowPotentialChangeImpact.java 747a3c979e9a58e025bb6b9377f9125809a04a7d GREEN
StrategyUndevelopedEntity.java 753b40ae7d6a5230ee12becea6a01971dc64eb46 GREEN
......@@ -40,7 +40,6 @@ import org.fortiss.tooling.kernel.ui.extension.data.ContextMenuContextProvider;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
/**
*
* This class implements the feature of referencing a System Model Element from any
* {@link ArgumentElement}. The feature is compound of 2 buttons: one button for referencing a new
* System Model Element (implemented in the ConnectToSystemModelElements class, and a button for
......
AssumptionVisual.java 25ffc5d4466c37bcb2c4c9478cce16413a902874 YELLOW
AwayContextVisual.java 49b39ab6fd3b6f648a51b01bdcc0b4dab53bccd4 YELLOW
AwayGoalVisual.java fcef9ff50c54ba67e5e2a8764540c6dc26ef4348 YELLOW
AwaySolutionVisual.java f7bcd8fd29c47ed4cf9c14ac603c9c31e13cabbf YELLOW
ContextVisual.java b6cd67076e40b8a7b79a54cb57b3278a120f1e69 YELLOW
GoalVisual.java 712f1bdddbd54f5f62c1a1a9be9955563b8c67cf YELLOW
JustificationVisual.java 0618a99b469bf1c1edf317fa015aec627d545af2 YELLOW
AssumptionVisual.java 25ffc5d4466c37bcb2c4c9478cce16413a902874 GREEN
AwayContextVisual.java 49b39ab6fd3b6f648a51b01bdcc0b4dab53bccd4 GREEN
AwayGoalVisual.java fcef9ff50c54ba67e5e2a8764540c6dc26ef4348 GREEN
AwaySolutionVisual.java f7bcd8fd29c47ed4cf9c14ac603c9c31e13cabbf GREEN
ContextVisual.java b6cd67076e40b8a7b79a54cb57b3278a120f1e69 GREEN
GoalVisual.java 712f1bdddbd54f5f62c1a1a9be9955563b8c67cf GREEN
JustificationVisual.java 0618a99b469bf1c1edf317fa015aec627d545af2 GREEN
LayoutedCircularContentVisualBase.java b9a5fc8417787845800c1618faf2749af2c83803 GREEN
LayoutedDiamondContentVisualBase.java ed4f7b76fd078be03fe2a8ad9a9ee05e319035be GREEN
LayoutedEllipticContentVisualBase.java ee6deed6583ec9e860efa67e62c42149cfb8b436 GREEN
......@@ -13,5 +13,5 @@ OptionEntityVisual.java f5b07bc1147c50080047281cecc5d8fd65fdbb48 GREEN
SafetyCasesConnectionVisual.java 242424629ffdbd4fa996c4367b6fd0173d8cd873 GREEN
SafetyCasesConnectorVisual.java 00224439af1c86f7bf4702a5d505270a39bdb21f GREEN
SafetyModuleVisual.java 372b1c84d5fd66d92a79ce750137e3f9291223d9 GREEN
SolutionVisual.java ab6f374a1252bee314c129e0cf52dbf1d8402401 YELLOW
StrategyVisual.java e24dc62c52e63357df3529f8922b0317d20d39a8 YELLOW
SolutionVisual.java ab6f374a1252bee314c129e0cf52dbf1d8402401 GREEN
StrategyVisual.java e24dc62c52e63357df3529f8922b0317d20d39a8 GREEN
ArgumentModuleDiagramEditPart.java e72f838d2438c3833d1bbb75f0c2a80da29aa516 GREEN
ArgumentModuleEditPart.java 541600e5887d841ceb7976a788e1041020b6b6de GREEN
AssumptionEditPart.java c9d1c468f47e27a3038cbcdfb7261370e93f40c2 YELLOW
AwayContextEditPart.java 2fbd67ca6ec3b7b356cd0488945c1d02d329c772 YELLOW
AssumptionEditPart.java c9d1c468f47e27a3038cbcdfb7261370e93f40c2 GREEN
AwayContextEditPart.java 2fbd67ca6ec3b7b356cd0488945c1d02d329c772 GREEN
AwayContractModuleEditPart.java 662db94bba6070c51ae0d703553b9a99db709c81 GREEN
AwayGoalEditPart.java 85636e634b26b3ef2b133058a2df5d6398f9b8f6 YELLOW
AwaySolutionEditPart.java 9ee2f9315c49856bcdf2bfb98daafec601527957 YELLOW
ContextEditPart.java 7d2e7221f9fbfd5c9730669e1bbc0eb144d6e6ec YELLOW
AwayGoalEditPart.java 85636e634b26b3ef2b133058a2df5d6398f9b8f6 GREEN
AwaySolutionEditPart.java 9ee2f9315c49856bcdf2bfb98daafec601527957 GREEN
ContextEditPart.java 7d2e7221f9fbfd5c9730669e1bbc0eb144d6e6ec GREEN
ContractModuleDiagramEditPart.java 06eb74d8aa83c0e97e78aefb79aab567893aa711 GREEN
ContractModuleEditPart.java ea3e581432b5fd5c12980dfb5861011b5f97e206 GREEN
EditPartFactory.java db07d45e845756558cad0562a32ffa7f9ff2a24e GREEN
......@@ -17,11 +17,11 @@ GSNEditPart.java 12c2b358c63f8277fbeb5a2d989e1209bcb5dc01 GREEN
GSNPositionedEditPartBase.java d84ef9a58260fa87b084dc5fe42ecc3a22d0f62b GREEN
GSNPositionedEditPartBaseForRoundFigures.java 734fbc2dbbf9b088e2a50d91ae290149bf308fe8 GREEN
GSNPositionedEditPartBaseForStrategyFigure.java 7bf196c2791c4c9c33ce686ad742e00ec5a6b8e0 GREEN
GoalEditPart.java 9505b14eed36798b6daf690081220ad30bf9144f YELLOW
GoalEditPart.java 9505b14eed36798b6daf690081220ad30bf9144f GREEN
InContextOfEditPart.java 67057a52f44ae96bc4f9786f297972ecdbe32d44 GREEN
JustificationEditPart.java ed2631ba0ad56862dae09760ac5a9a3e01b7f6c3 YELLOW
JustificationEditPart.java ed2631ba0ad56862dae09760ac5a9a3e01b7f6c3 GREEN
OptionEntityEditPart.java bb7209c55bc65d374d749e97996dcb2716752ba2 GREEN
SafetyCaseDiagramEditPart.java 8b50f7bc29823196f9473fb86e8c56b1f420aad1 GREEN
SolutionEditPart.java f02f13358c6d3f2cd5da2fe25c394e4041e7d966 YELLOW
StrategyEditPart.java 3994be0a506d83b0ed7fdc21a65eaba485d43efb YELLOW
SolutionEditPart.java f02f13358c6d3f2cd5da2fe25c394e4041e7d966 GREEN
StrategyEditPart.java 3994be0a506d83b0ed7fdc21a65eaba485d43efb GREEN
SupportedByEditPart.java 71d240e03f2823e7b80774710253dc572b0e72c5 GREEN
......@@ -4,6 +4,7 @@ AwayContextHandler.java 426e4f3d1c7ebd2d9c14ab22fa1273a6c8793000 GREEN
AwayContractModuleHandler.java 79fafc41f418ecb94fdfa7c9d7a5775854c0f35b GREEN
AwayGoalHandler.java 95c8ae467f435274ac7f14c8387084b0e907ddb5 GREEN
AwaySolutionHandler.java 9163f1f91ea0e5bf3cddb8f66dbea15dd10f8da5 GREEN
ChangeHandler.java 012a644b0db303f33c5c93dfc504fb643b0f058f GREEN
ContextHandler.java 16381535c9e15b48adaf31349c4ac5f4491ed4f7 GREEN
ContractModuleHandler.java 289d45ee01ed1c87c72f8e31574ad5ff9dbf643d GREEN
EntryConnectorHandler.java 20ff38072063995a4d6ae14e6b305fe30339ba48 GREEN
......
ArgumentElementPropertySection.java 541029a27373bdcf9d625d2a87c47d6fc3cf3835 YELLOW
ArgumentElementPropertySection.java 541029a27373bdcf9d625d2a87c47d6fc3cf3835 GREEN
ArgumentModulePropertySection.java a96fcfeed6831cfe3cc145618b5ef7ea3ebf1d31 GREEN
ArgumentModuleQuantitativeProperty.java 9028829eec1c08c376f3b02d645b010b2c11a64c GREEN
AssumptionPropertySection.java 6baa436009dd5f0ea65080026ca95ab5c605ed89 GREEN
AwayEntityPropertySection.java d842ca008db9bc2fb370718221a65c995dd475bd YELLOW
ChangePropertySection.java f7f9f413979a5f4f486e0bfdc264d08bcd25c086 YELLOW
ConnectionPropertySection.java 6101c574492d76c75a5062a6bb173626403cacd4 YELLOW
AwayEntityPropertySection.java d842ca008db9bc2fb370718221a65c995dd475bd GREEN
ChangePropertySection.java fdcd457de707448a7f7d98c42db1f284fb678cc4 GREEN
ConnectionPropertySection.java 6101c574492d76c75a5062a6bb173626403cacd4 GREEN
ContextPropertySection.java 3901c88aee6a6e659a997d1fe76ab333a227c526 GREEN
GSNStatesPropertySection.java af635854649f8f477c3d92de8189ae08ff5b917a YELLOW
GSNStatesPropertySection.java af635854649f8f477c3d92de8189ae08ff5b917a GREEN
OptionEntityPropertySection.java 783afb90532861c185a2e4ea5bd3c1b7e92483c2 GREEN
QuantitativeEvaluationPropertySection.java 3abfb63be471ff17ac97cc19078da83f99e48a41 GREEN
......@@ -27,7 +27,6 @@ import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.fortiss.af3.safetycases.model.Change;
import org.fortiss.af3.safetycases.model.Goal;
import org.fortiss.af3.safetycases.model.maintenanceStatus;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
......@@ -37,21 +36,12 @@ import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
* @author liana
*/
public class ChangePropertySection extends PropertySectionBase {
/** Label for referenced ModelElement section. */
@SuppressWarnings("unused")
private Label referenceLabel;
/** Link for referenced ModelElement section. */
private Link referenceLink;
/** Currently selected {@link Goal}. */
private Change selectedChange;
/** Label for the {@link maintenanceStatus} of a change. */
@SuppressWarnings("unused")
private Label maintenanceStatusLabel;
/** Maintenance status of the selected Change */
private Label maintenanceStatusContent;
/** Label for the type of change of the selected change (predefined/personalized). */
@SuppressWarnings("unused")
private Label typeOfChangeLabel;
/** The type of change of the selected change (predefined/personalized). */
private Label typeOfChange;
......@@ -59,11 +49,11 @@ public class ChangePropertySection extends PropertySectionBase {
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls(parent, aTabbedPropertySheetPage);
maintenanceStatusLabel = getWidgetFactory().createLabel(composite, "Maintenance Status:");
getWidgetFactory().createLabel(composite, "Maintenance Status:");
maintenanceStatusContent = getWidgetFactory().createLabel(composite, "");
typeOfChangeLabel = getWidgetFactory().createLabel(composite, "Type of change:");
getWidgetFactory().createLabel(composite, "Type of change:");
typeOfChange = getWidgetFactory().createLabel(composite, "");
referenceLabel = getWidgetFactory().createLabel(composite, "Referenced ModelElement:");
getWidgetFactory().createLabel(composite, "Referenced ModelElement:");
referenceLink = new Link(composite, SWT.MULTI);
referenceLink.addSelectionListener(new SelectionListener() {
@Override
......
/*-------------------------------------------------------------------------+
| Copyright 2018 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.properties;
import java.util.List;
import org.conqat.ide.commons.ui.jface.TreeContentProviderBase;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.mira.model.Analysis;
import org.fortiss.af3.mira.model.Requirement;
import org.fortiss.af3.mira.model.RequirementsContainer;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.safetycases.model.Goal;
import org.fortiss.af3.safetycases.model.Solution;
import org.fortiss.af3.safetycases.model.SpinalElement;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.base.ui.dialog.ElementTreeSingleSelectDialog;
import org.fortiss.tooling.kernel.model.IProjectRootElement;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
import org.fortiss.tooling.kernel.ui.presentation.ModelElementLabelProvider;
/**
* Class specifying the UI machinery to populate links from suitable safety elements and
* requirements.
*
* @author vivek
*/
public class RequirementLinkPropertySection extends PropertySectionBase {
/** Currently selected {@link Goal}. */
private SpinalElement currentlySelectedSpinal;
/** Button for creating reference. */
private Button addRequirement;
/** Label for referenced button section. */
private Label requirementLabel;
/** Link for referenced button section. */
private Link requirementLink;
/** Button for eliminating reference. */
private Button deleteRequirementlButton;
/** {@inheritDoc} */
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls(parent, aTabbedPropertySheetPage);
createModelElementLabel();
createAddRequirementButton();
createDeleteModelButton();
}
/** {@inheritDoc} */
@Override
protected void setSectionInput(Object input) {
currentlySelectedSpinal = (SpinalElement)input;
setRequirementLink();
}
/**
* Sets the requirement link label
*/
private void setRequirementLink() {
if(currentlySelectedSpinal instanceof Goal) {
Requirement safRequirement = ((Goal)currentlySelectedSpinal).getSafetyRequirement();
requirementLink.setText(getLabelName(safRequirement));
requirementLink.setToolTipText(getToolTipText(safRequirement));
}
if(currentlySelectedSpinal instanceof Solution) {
Requirement safRequirement = ((Solution)currentlySelectedSpinal).getSafetyRequirement();
requirementLink.setText(getLabelName(safRequirement));
requirementLink.setToolTipText(getToolTipText(safRequirement));
}
}
/**
* @param selectedEle
*/
private void setRequirementInSafetyElement(Requirement selectedEle) {
if(currentlySelectedSpinal instanceof Goal) {
((Goal)currentlySelectedSpinal).setSafetyRequirement(selectedEle);
}
if(currentlySelectedSpinal instanceof Solution) {
((Solution)currentlySelectedSpinal).setSafetyRequirement(selectedEle);
}
}
/**
* Returns the elements {@link Object} in srcList that can is assignable to
* the Class of class1 or of class2.
*/
@SuppressWarnings("unchecked")
public static <T> EList<T> pickInstancesOf(Class<Analysis> class1,
Class<ComponentArchitecture> class2, List<?> srcList) {
if(srcList == null) {
return null;
}
EList<T> result = new BasicEList<T>();
for(Object sourceElement : srcList) {
if((class1.isAssignableFrom(sourceElement.getClass())) ||
(class2.isAssignableFrom(sourceElement.getClass()))) {
result.add((T)sourceElement);
}
}
return ECollections.unmodifiableEList(result);
}
/**
* Button to add a Model Element
*/
private void createAddRequirementButton() {
addRequirement = getWidgetFactory().createButton(composite,
" Add Requirement ", SWT.PUSH);
addRequirement.setToolTipText("Select referenced safety/design requirement element");
addRequirement.setVisible(true);
addRequirement.addSelectionListener(new SelectionAdapter() {
/** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
FileProject root = (FileProject)EcoreUtil.getRootContainer(currentlySelectedSpinal);
EList<IProjectRootElement> rootList = pickInstancesOf(Analysis.class,
ComponentArchitecture.class, root.getRootElements());
if(rootList.size() > 0) {
ElementTreeSingleSelectDialog dialog =
openSelectDialog(composite.getShell(), rootList);
Object selectedEle = dialog.getSelectedElement();
if(selectedEle != null && selectedEle instanceof Requirement) {
ICommandStackService.getInstance().runAsCommand(currentlySelectedSpinal,
() -> {
setRequirementInSafetyElement((Requirement)selectedEle);
});
requirementLink.setText(getLabelName((Requirement)selectedEle));
}
}
refresh();
}
});
}
/**
* Label with the name of the safety requirement
*/
private void createModelElementLabel() {
requirementLabel = getWidgetFactory().createLabel(composite, "Safety/Design Requirement");
requirementLabel.setToolTipText("Allows you to select a a Requirement");
requirementLink = new Link(composite, SWT.MULTI);
requirementLink.setToolTipText("The referenced model element");
}
/**
* Button to delete the associated Model Element
*/
private void createDeleteModelButton() {
deleteRequirementlButton = getWidgetFactory().createButton(composite,
" Delete requirement ", SWT.NONE);
deleteRequirementlButton.setToolTipText("Eliminate referenced requirement");
deleteRequirementlButton.setVisible(true);
deleteRequirementlButton.addSelectionListener(new SelectionAdapter() {
/** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
ICommandStackService.getInstance().runAsCommand(currentlySelectedSpinal, () -> {
setRequirementInSafetyElement(null);
});
requirementLink.setText("No model element selected");
refresh();
}
});
}
/**
* @return String with the text for the model element name according to the given model.
*/
private String getToolTipText(IModelElement modelElement) {
if(modelElement instanceof Requirement) {
return ((Requirement)modelElement).getName();
}
return "No Requirement Selected";
}
/**
* @return String with the text for the tool tip according to the given model.
*/
private String getLabelName(IModelElement selectedEle) {
if(selectedEle instanceof Requirement) {
return ((Requirement)selectedEle).getReqId();
}
return "No Requirement Selected";
}
/**
* Open source/target requirements dialog.
*
* @param shell
* The parent shell.
* @param root
* The root of the tree
* @return Whether the dialog is open.
*/
public static ElementTreeSingleSelectDialog openSelectDialog(Shell shell, List<?> root) {
ElementTreeSingleSelectDialog dialog =
new ElementTreeSingleSelectDialog(shell, root, null, new TreeContentProviderBase() {
/** {@inheritDoc} */
@Override
public Object[] getChildren(Object parentElement) {
if(parentElement instanceof Analysis)
return ((Analysis)(parentElement)).getContainedElements().toArray();
if(parentElement instanceof RequirementsContainer) {
return ((RequirementsContainer)parentElement).getRequirementsList()
.toArray();
}
if(parentElement instanceof List<?>) {
return ((List<?>)parentElement).toArray();
}
return new Object[] {};
}
}, new ModelElementLabelProvider(), null);
if(Window.OK != dialog.open()) {
return dialog;
}
return dialog;
}
}
PrototypeProvider.java 1f398ca9a394ae5ab50a8c8a6202dd0e50746008 YELLOW
PrototypeProvider.java 1f398ca9a394ae5ab50a8c8a6202dd0e50746008 GREEN
AF3SelectionDialogUtils.java ec3c06f56289b7d2e73734c8d2b3c8cbd864363e RED
DropdownDialog.java 1ec9b26db0e5c2cf40f1761de7bb9a0e3b1b1355 YELLOW
DropdownDialog.java 1ec9b26db0e5c2cf40f1761de7bb9a0e3b1b1355 GREEN
GSNSelectionDialogUtils.java 01cdc5c80a6d678e47b39d4dbd571de15b283d8f GREEN
InstantiationOfGSNElementsUtils.java 7f928f584cf3d978c35e9aad3f93049f6e82c832 RED
MaintenanceUtils.java 6666dea44eb6784c9f23c0c549bd6eada1eb1e17 YELLOW
MultiPageWizard.java a901e2eb4967e3663b71a96cb22948283c200c2c YELLOW
MaintenanceUtils.java 6666dea44eb6784c9f23c0c549bd6eada1eb1e17 GREEN
MultiPageWizard.java a901e2eb4967e3663b71a96cb22948283c200c2c GREEN
OptionEntityInstantiation.java 05f5cf61184d6db033b47d58c19492799468943e GREEN
QuantitativeEvaluationUtils.java 26f06e285252af1b0061fbc0ec7be8a5671fca09 GREEN
SafetyCasesLibraryUIUtils.java 9496176dd4c161f58f48b2cf929f1d596cc08280 GREEN
StringToClaimValidator.java 468f6f2178b1e109e113e1ef5cf3e0fca3459028 GREEN
StringToGsnIdValidator.java 3f08520777cc58340136d52f3d2d6afe0cfa8201 GREEN
StringToClaimValidator.java 1cb681f25dfe96ff328e4d8d754fce6108f07697 GREEN
StringToGsnIdValidator.java 197f42de3e3022ca918a1aa324b2b3d3314d8c44 GREEN
TextHyperlinkingUtils.java 4c572f100e237eff1fe3ff01700d65d56331ff1c GREEN
Utils.java 171b131dda61055bc343a6539e49bf41a6af58ed YELLOW
Utils.java 18b05a8edddbef62e59616bf168beec95349caf3 GREEN
......@@ -28,7 +28,7 @@ import org.fortiss.af3.safetycases.model.ArgumentElement;
*
* @author carlan
*/
public class StringToClaimValidator implements IValidator {
public class StringToClaimValidator implements IValidator<Object> {
/** {@inheritDoc} */
@Override
......
......@@ -31,7 +31,7 @@ import org.fortiss.af3.safetycases.model.SafetyCase;
*
* @author carlan
*/
public class StringToGsnIdValidator implements IValidator {
public class StringToGsnIdValidator implements IValidator<Object> {
/** Stores the argument element base. */
private ArgumentElementBase editedObject;
......
......@@ -239,7 +239,7 @@ public class Utils {
}
}
/** Returns the type of change of an {@link ArgumentElement} */
/** This method returns the type of change of an {@link ArgumentElement}. */
public static String returnStringTypeOfChanges(TypeOfChange typeOfChange) {
if(typeOfChange != null) {
switch(typeOfChange) {
......@@ -294,7 +294,7 @@ public class Utils {
return getAllChildren(list);
}
/** This function gets all the elements that are instance of the given classes. */
/** This method gets all the elements that are instance of the given classes. */
public static List<EObject> getAllSpecificChildrens(List<? extends EObject> parents,
Class<?>[] classes) {
List<? extends EObject> containedElements = new ArrayList<EObject>();
......@@ -313,7 +313,7 @@ public class Utils {
}
/**
* This function takes an {@link ArgumentElement} and a list of classes,
* This method takes an {@link ArgumentElement} and a list of classes,
* and checks whether in another ArgumentModule, exists classes that are equal to myClass
* Example: with this function it can be searched, whether for an AwayGoal, exists an Goal in
* another ArgumentModule (or container generally), that the given AwayGoal can reference.
......
......@@ -6,7 +6,7 @@ AwayGoalCompositor.java 4432c8934746be63dc16374bd923a4e9f3b6d1d0 GREEN
AwayGoalInContextOfConnectionCompositor.java 49daac2f7b70f9ceb708cb27a78fc190bf3293d2 GREEN
AwayGoalSupportedByConnectionCompositor.java 05735ae0a9c07c05a7008319fca34bd186e0e8c9 GREEN
AwaySolutionCompositor.java cce1a2056192a8f2c71b5af4dd52ede2982f94d2 GREEN
ConnectionCompositor.java 526784d8b19c71c724f645918473aba28ca33eb7 YELLOW
ConnectionCompositor.java 526784d8b19c71c724f645918473aba28ca33eb7 GREEN
ContextCompositor.java 0540ee7716235bb96fc48c37ff618d4117a446f5 GREEN
ContractModuleCompositor.java ac85daf1d00003404bf6ba1d9577590c5df92948 GREEN
GoalCompositor.java fde0cc8da148f5ad65263c999d35507b443697ac GREEN
......
LibraryModuleUtils.java c362ae13c59a8d76cff5dabf8ec11ac024105823 GREEN
ModuleLibraryModelElementFactory.java 5d882790170eb0ebc8be493e05d675e007cc5cca GREEN
SafetyCasesAnalysisUtils.java ee22d78b153c6f23aac5efab094efce52170d65c GREEN
SafetyCasesModelElementFactory.java 264e24056a3fd782e81dc02870173fda63a49377 YELLOW
SafetyCasesModelElementFactory.java 264e24056a3fd782e81dc02870173fda63a49377 GREEN
SafetyCasesModellingUtils.java 8e3d8401066a59d17c03c169e25597e9396866f8 GREEN
SafetyCasesUtils.java be6c08065b38250bd80d9e892fd80bb0916165a0 GREEN
Markdown is supported
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