Skip to content
Snippets Groups Projects
Commit 3e6f6ef3 authored by nullsub's avatar nullsub
Browse files

revert adding unneeded checks

parent b476da7a
No related branches found
No related tags found
No related merge requests found
/**
*/
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
...@@ -176,9 +176,6 @@ public class FRaMEDFeatureEditor extends EditorPart { ...@@ -176,9 +176,6 @@ public class FRaMEDFeatureEditor extends EditorPart {
* @param featureModel the feature model to instantiate the configuration with * @param featureModel the feature model to instantiate the configuration with
*/ */
private void loadConfiguration(Model rootModel, IFeatureModel featureModel) { private void loadConfiguration(Model rootModel, IFeatureModel featureModel) {
if(rootModel == null) {
return;
}
FRaMEDConfiguration framedConfiguration = rootModel.getFramedConfiguration(); FRaMEDConfiguration framedConfiguration = rootModel.getFramedConfiguration();
configuration = new Configuration(featureModel); configuration = new Configuration(featureModel);
configuration.getPropagator().update(); configuration.getPropagator().update();
...@@ -280,8 +277,6 @@ public class FRaMEDFeatureEditor extends EditorPart { ...@@ -280,8 +277,6 @@ public class FRaMEDFeatureEditor extends EditorPart {
* updates the labels text and color if the configuration is valid or not * updates the labels text and color if the configuration is valid or not
*/ */
private void updateInfoLabel() { private void updateInfoLabel() {
if(configuration == null)
return;
Boolean valid = configuration.isValid(); Boolean valid = configuration.isValid();
infoLabel.setText(valid ? "VALID Configuration" : "INVALID Configuration"); infoLabel.setText(valid ? "VALID Configuration" : "INVALID Configuration");
infoLabel.setForeground(valid ? COLOR_VALID_CONFIGURATION : COLOR_INVALID_CONFIGURATION); infoLabel.setForeground(valid ? COLOR_VALID_CONFIGURATION : COLOR_INVALID_CONFIGURATION);
...@@ -293,8 +288,6 @@ public class FRaMEDFeatureEditor extends EditorPart { ...@@ -293,8 +288,6 @@ public class FRaMEDFeatureEditor extends EditorPart {
private void updateTree() { private void updateTree() {
tree.removeAll(); tree.removeAll();
final TreeItem root = new TreeItem(tree, 0); final TreeItem root = new TreeItem(tree, 0);
if(configuration == null)
return;
final SelectableFeature rootFeature = configuration.getRoot(); final SelectableFeature rootFeature = configuration.getRoot();
root.setText(configuration.getRoot().getName()); root.setText(configuration.getRoot().getName());
root.setData(configuration.getRoot()); root.setData(configuration.getRoot());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment