Package es.iiia.sgi.propertytesters

Source Code of es.iiia.sgi.propertytesters.IsRuleModification

package es.iiia.sgi.propertytesters;

import org.eclipse.core.expressions.PropertyTester;

import es.iiia.sgi.editors.RuleEditor;
import es.iiia.shapegrammar.rule.RuleModel;
import es.iiia.shapegrammar.rule.RuleModification;

public class IsRuleModification extends PropertyTester {

  public IsRuleModification() {
    // TODO Auto-generated constructor stub
  }

  @Override
  public boolean test(Object receiver, String property, Object[] args,
      Object expectedValue) {
    if (receiver instanceof RuleEditor) {
      RuleModel rule = (RuleModel) ((RuleEditor) receiver).getModel();
      System.out.println("[IsRuleModification]" + (rule instanceof RuleModification));
      return !(rule instanceof RuleModification);
    }
    return false;
  }

}
TOP

Related Classes of es.iiia.sgi.propertytesters.IsRuleModification

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.