From 3e6f6ef3e65582c44effac5c3e8bdd709cdad91f Mon Sep 17 00:00:00 2001 From: nullsub <chrisudeussen@gmail.com> Date: Thu, 3 May 2018 09:49:35 +0200 Subject: [PATCH] revert adding unneeded checks --- .../Editpolicymodel/tests/IsStepInTest.java | 70 ------------------- .../ui/subeditors/FRaMEDFeatureEditor.java | 7 -- 2 files changed, 77 deletions(-) delete mode 100644 org.framed.iorm.editpolicymodel.tests/src/Editpolicymodel/tests/IsStepInTest.java diff --git a/org.framed.iorm.editpolicymodel.tests/src/Editpolicymodel/tests/IsStepInTest.java b/org.framed.iorm.editpolicymodel.tests/src/Editpolicymodel/tests/IsStepInTest.java deleted file mode 100644 index b9c8b19b..00000000 --- a/org.framed.iorm.editpolicymodel.tests/src/Editpolicymodel/tests/IsStepInTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - */ -package Editpolicymodel.tests; - -import Editpolicymodel.EditpolicymodelFactory; -import Editpolicymodel.IsStepIn; - -import junit.textui.TestRunner; - -/** - * <!-- begin-user-doc --> - * A test case for the model object '<em><b>Is Step In</b></em>'. - * <!-- end-user-doc --> - * @generated - */ -public class IsStepInTest extends ConstraintRuleTest { - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static void main(String[] args) { - TestRunner.run(IsStepInTest.class); - } - - /** - * Constructs a new Is Step In test case with the given name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public IsStepInTest(String name) { - super(name); - } - - /** - * Returns the fixture for this Is Step In test case. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected IsStepIn getFixture() { - return (IsStepIn)fixture; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see junit.framework.TestCase#setUp() - * @generated - */ - @Override - protected void setUp() throws Exception { - setFixture(EditpolicymodelFactory.eINSTANCE.createIsStepIn()); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see junit.framework.TestCase#tearDown() - * @generated - */ - @Override - protected void tearDown() throws Exception { - setFixture(null); - } - -} //IsStepInTest diff --git a/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java b/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java index 8a51c623..9d187f29 100644 --- a/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java +++ b/org.framed.iorm.ui/src/org/framed/iorm/ui/subeditors/FRaMEDFeatureEditor.java @@ -176,9 +176,6 @@ public class FRaMEDFeatureEditor extends EditorPart { * @param featureModel the feature model to instantiate the configuration with */ private void loadConfiguration(Model rootModel, IFeatureModel featureModel) { - if(rootModel == null) { - return; - } FRaMEDConfiguration framedConfiguration = rootModel.getFramedConfiguration(); configuration = new Configuration(featureModel); configuration.getPropagator().update(); @@ -280,8 +277,6 @@ public class FRaMEDFeatureEditor extends EditorPart { * updates the labels text and color if the configuration is valid or not */ private void updateInfoLabel() { - if(configuration == null) - return; Boolean valid = configuration.isValid(); infoLabel.setText(valid ? "VALID Configuration" : "INVALID Configuration"); infoLabel.setForeground(valid ? COLOR_VALID_CONFIGURATION : COLOR_INVALID_CONFIGURATION); @@ -293,8 +288,6 @@ public class FRaMEDFeatureEditor extends EditorPart { private void updateTree() { tree.removeAll(); final TreeItem root = new TreeItem(tree, 0); - if(configuration == null) - return; final SelectableFeature rootFeature = configuration.getRoot(); root.setText(configuration.getRoot().getName()); root.setData(configuration.getRoot()); -- GitLab