Commit 96df8968 authored by Liana Soima's avatar Liana Soima
Browse files

Assurance Claim Patterns Database deletion



"Delete Assurance Claim Patterns Database from the Context Menu of
Assurance Package elements"
Signed-off-by: Liana Soima's avatarLiana Soima <soima@fortiss.org>
Issue-Ref: 4054
parent d5653f58
......@@ -239,9 +239,6 @@
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.action.DownloadSafetyClaimPatternsDatabaseFromLibrary">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.library.ConvertReferenceToArgumentModule">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.GoalUndevelopedEntity">
</contextMenuContribution>
......
......@@ -15,10 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.safetycases.ui.prototypes;
import static org.fortiss.af3.requirementspatterns.utils.SafetyClaimPatternsCollectionModelElementFactory.createPatternDatabase;
import static org.fortiss.af3.requirementspatterns.utils.SafetyClaimPatternsCollectionModelElementFactory.createSafetyClaimPattern;
import static org.fortiss.af3.requirementspatterns.utils.SafetyClaimPatternsCollectionModelElementFactory.createSafetyClaimPatternsCollection;
import static org.fortiss.af3.requirementspatterns.utils.SafetyClaimPatternsCollectionModelElementFactory.createWord;
import static org.fortiss.af3.safetyargumentationpackage.utils.SafetyArgumentationPackageModelElementFactory.createSafetyArgumentationPackage;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createArgumentModule;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createAssumption;
......@@ -38,10 +35,7 @@ import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.c
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createStrategy;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createChange;
import org.fortiss.af3.requirementspatterns.model.PatternsDatabase;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPattern;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPatternsCollection;
import org.fortiss.af3.requirementspatterns.model.WordAndObjectType;
import org.fortiss.af3.safetyargumentationpackage.model.SafetyArgumentationPackage;
import org.fortiss.af3.safetycases.model.Assumption;
import org.fortiss.af3.safetycases.model.AwayContext;
......@@ -70,9 +64,6 @@ public class PrototypeProvider extends PrototypeProviderBase {
/** Stores the 1. category to display for these prototypes. */
protected final static String CATEGORY_NAME_SAFETY_CASES = "Assurance Case";
/** Stores the 2. category to display for these prototypes. */
protected final static String CATEGORY_NAME_PATTERNS_DATABASE =
"Assurance Claim Patterns Database";
/** Stores the 3. category to display for these prototypes. */
protected final static String CATEGORY_NAME_PACKAGE = "Assurance Package";
......@@ -80,7 +71,6 @@ public class PrototypeProvider extends PrototypeProviderBase {
@Override
protected void registerPrototypes() {
setupSafeyCasesPrototypes();
setupPatternsDatabasePrototypes();
setupSafetyArgumentationPackage();
}
......@@ -144,21 +134,4 @@ public class PrototypeProvider extends PrototypeProviderBase {
registerPrimaryPrototype("Change", change, CATEGORY_NAME_SAFETY_CASES);
}
/** Defines prototypes for {@link PatternsDatabase}s. */
private void setupPatternsDatabasePrototypes() {
String namePD = "Assurance Claim Patterns Database";
registerPrimaryPrototype(namePD, createPatternDatabase(), CATEGORY_NAME_PATTERNS_DATABASE);
SafetyClaimPattern sentence = createSafetyClaimPattern();
String nameCP = "Assurance Claim Pattern";
registerPrimaryPrototype(nameCP, sentence, CATEGORY_NAME_PATTERNS_DATABASE);
SafetyClaimPatternsCollection scPatternsCollection = createSafetyClaimPatternsCollection();
String namePC = "Assurance Claim Patterns Collection";
registerPrimaryPrototype(namePC, scPatternsCollection, CATEGORY_NAME_PATTERNS_DATABASE);
WordAndObjectType wordAndObjectType = createWord();
String name = "Word And Object Type";
registerPrimaryPrototype(name, wordAndObjectType, CATEGORY_NAME_PATTERNS_DATABASE);
}
}
......@@ -17,11 +17,9 @@ package org.fortiss.af3.requirementspatterns.utils;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.setNameComment;
import org.fortiss.af3.requirementspatterns.model.PatternsDatabase;
import org.fortiss.af3.requirementspatterns.model.RequirementsPatternsFactory;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPattern;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPatternsCollection;
import org.fortiss.af3.requirementspatterns.model.WordAndObjectType;
/**
* Factory methods for the safety claim patterns collection elements.
......@@ -30,19 +28,6 @@ import org.fortiss.af3.requirementspatterns.model.WordAndObjectType;
*/
public class SafetyClaimPatternsCollectionModelElementFactory {
/** Creates a {@link PatternsDatabase}. */
public static PatternsDatabase createPatternDatabase() {
return createPatternDatabase("Safety Claim Patterns Database", "");
}
/** Creates a {@link PatternsDatabase} with user-defined name and comment. */
public static PatternsDatabase createPatternDatabase(String name, String comment) {
PatternsDatabase patternsDatabase =
RequirementsPatternsFactory.eINSTANCE.createPatternsDatabase();
setNameComment(patternsDatabase, name, comment);
return patternsDatabase;
}
/** Creates a {@link SafetyClaimPatternsCollection}. */
public static SafetyClaimPatternsCollection createSafetyClaimPatternsCollection() {
return createSafetyClaimPatternsCollection("Safety Claim Patterns Collection", "");
......@@ -70,16 +55,4 @@ public class SafetyClaimPatternsCollectionModelElementFactory {
return safetyClaimPattern;
}
/** Creates a {@link WordAndObjectType}. */
public static WordAndObjectType createWord() {
return createWordAndObjectType("WordAndObjectType", "");
}
/** Creates a {@link WordAndObjectType} with user-defined name and comment. */
public static WordAndObjectType createWordAndObjectType(String name, String comment) {
WordAndObjectType patternsDatabase =
RequirementsPatternsFactory.eINSTANCE.createWordAndObjectType();
setNameComment(patternsDatabase, name, comment);
return patternsDatabase;
}
}
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