Package de.FeatureModellingTool.FeatureModel

Examples of de.FeatureModellingTool.FeatureModel.Feature


  /*CompositeConstraint*/
  public static void updateCompositeConstraint_RevertRelation(CompositeConstraint cc , Set<Feature> features
      , ConstraintModel cm , ConstraintModelEditor cme
      , HashMap<String,Figure> mFigure) {
    for (Iterator<Feature> itFeature=features.iterator() ; itFeature.hasNext() ; ) {
      Feature feature = itFeature.next();
     
      boolean isSource = true;
      CFRelation rOld = cm.getCFRelation(feature , cc , true);
      if (rOld==null) {
        isSource = false;
View Full Code Here


    features.addAll(cc.getSourceFeatureSet());
    features.addAll(cc.getSinkFeatureSet());
   
    List<CFRelation> relations = new ArrayList<CFRelation>();
    for (Iterator<Feature> itFeature=features.iterator() ; itFeature.hasNext() ; ) {
      Feature feature = itFeature.next();
      CFRelation relation = cm.getCFRelation(feature , cc , true);
      if (relation==null) {
        relation = cm.getCFRelation(feature , cc , false);
      }
    }
View Full Code Here

    List<Feature> features = new ArrayList<Feature>();
    features.addAll(cc.getSourceFeatureSet());
    features.addAll(cc.getSinkFeatureSet());
   
    for (int i=0 ; i<features.size() ; i++) {
      Feature feature = features.get(i);
      if (!Customization.Undecided.equals(cv.getFinalCustomizationById(feature.getID()))) {
        CFRelation relation = cm.getCFRelation(feature , cc , true);
        if (relation==null) {
          relation = cm.getCFRelation(feature , cc , false);
        }
        dv.remove(mFigure.get(relation.getID()));
View Full Code Here

    plfNew.setAttribute("SinkType" , ccptSink.getName());
    dv.add(plfNew);
    plfNew.setDisplayBox(fOld.getDisplayBox());
   
    for (Iterator<Feature> itFeature=fSources.iterator() ; itFeature.hasNext() ; ) {
      Feature fSource = itFeature.next();
      Figure figureSource = mFigure.get(fSource.getID());
      CFRelation rOld = cm.getCFRelation(fSource , cOld , true);
      if (rOld==null) {
        rOld = cm.getCFRelation(fSource , cOld , false);
      }
      PLConnection plcOld = (PLConnection)mFigure.get(rOld.getID());
     
      CFRelation rNew = cme.addCFRelation(fSource , ccNew , true
          , rOld.getModifier().equals(CFRModifier.Affirmation) ? (revertSourceRelation ? CFRModifier.Negation : CFRModifier.Affirmation) : (revertSourceRelation ? CFRModifier.Affirmation : CFRModifier.Negation));
           
      PLConnection plcNew = new PLConnection();
      plcNew.setAttribute("id" , rNew.getID());
      plcNew.setAttribute("frameColor" , plcOld.getAttribute("frameColor"));
      plcNew.setAttribute("type" , plcOld.getAttribute("type"));
      plcNew.setAttribute("CFRModifier" , rNew.getModifier().getName());

      for (int i=0 ; i<plcOld.pointCount() ; i++) {
        plcNew.addPoint(plcOld.pointAt(i).x , plcOld.pointAt(i).y);
      }
      plcNew.startPoint(plfNew.getConnectors()[0].getDisplayBox().x , plfNew.getConnectors()[0].getDisplayBox().y);
      plcNew.connectStart(plfNew.getConnectors()[0]);
      plcNew.endPoint(figureSource.getConnectors()[4].getDisplayBox().x , figureSource.getConnectors()[4].getDisplayBox().y);
      plcNew.connectEnd(figureSource.getConnectors()[4]);
      dv.add(plcNew);
    }
   
    for (Iterator<Feature> itFeature=fSinks.iterator() ; itFeature.hasNext() ; ) {
      Feature fSink = itFeature.next();
      Figure figureSink = mFigure.get(fSink.getID());
      CFRelation rOld = cm.getCFRelation(fSink , cOld , true);
      if (rOld==null) {
        rOld = cm.getCFRelation(fSink , cOld , false);
      }
      CFRelation rNew = cme.addCFRelation(fSink , ccNew , true
View Full Code Here

      , ConstraintModel cm , ConstraintModelEditor cme , CompositeConstraintEditor cce , GroupConstraintEditor gce
      , CustomizationVersion cv , DrawingView dv , HashMap<String,Figure> mFigure) {
    Set<Feature> sourceFeatures = new HashSet<Feature>(cc.getSourceFeatureSet());
    Set<Feature> sinkFeatures = new HashSet<Feature>(cc.getSinkFeatureSet());
    for (Iterator<Feature> itFeature=cc.getSourceFeatureSet().iterator() ; itFeature.hasNext() ; ) {
      Feature f = itFeature.next();
      if (!Customization.Undecided.equals(cv.getFinalCustomizationById(f.getID()))) {
        sourceFeatures.remove(f);
      }
    }
    for (Iterator<Feature> itFeature=cc.getSinkFeatureSet().iterator() ; itFeature.hasNext() ; ) {
      Feature f = itFeature.next();
      if (!Customization.Undecided.equals(cv.getFinalCustomizationById(f.getID()))) {
        sinkFeatures.remove(f);
      }
    }
   
    return checkCompositeConstraint_TransformDualSide(pSource , sourceFeatures , true , cc , cc.getSourceType() , cm , cme , cce , gce , dv , mFigure)
View Full Code Here

      , GroupConstraintEditor gce , CustomizationVersion cv
      , DrawingView dv , HashMap<String,Figure> mFigure) {
    Set<Feature> sourceFeatures = new HashSet<Feature>(cc.getSourceFeatureSet());
    Set<Feature> sinkFeatures = new HashSet<Feature>(cc.getSinkFeatureSet());
    for (Iterator<Feature> itFeature=cc.getSourceFeatureSet().iterator() ; itFeature.hasNext() ; ) {
      Feature f = itFeature.next();
      if (!Customization.Undecided.equals(cv.getFinalCustomizationById(f.getID()))) {
        sourceFeatures.remove(f);
      }
    }
    for (Iterator<Feature> itFeature=cc.getSinkFeatureSet().iterator() ; itFeature.hasNext() ; ) {
      Feature f = itFeature.next();
      if (!Customization.Undecided.equals(cv.getFinalCustomizationById(f.getID()))) {
        sinkFeatures.remove(f);
      }
    }
   
    if (CompositeConstraintType.L2R_Implication.equals(cc.getPLType())) {
View Full Code Here

    @Override
    public Object getValueAt(Object node, int column) {

        String nodeType = ((FeatureNode) node).getNodeType();
        if (nodeType.equals(FeatureNode.NODE_TYPE_NORMAL)) {
            Feature feature = ((FeatureNode) node).getFeature();
            switch (column) {
                case 0:
                    return feature.getName();
                case 1:
                    return feature.getCategory();
                case 2:
                    return feature.getVariability();
                case 3:
                    return feature.getBindingTime();
                case 4:
                    return feature.getDescription();
                default:
                    return "";
            }
        } else {
            switch (column) {
View Full Code Here

  }
 
  List<FeatureNode> listNode = new ArrayList<FeatureNode>();
  Iterator<Feature> it = listFeature.iterator();
  while (it.hasNext()) {
      Feature _feature = it.next();
      FeatureNode node = new FeatureNode(context, _feature);
      listNode.add(node);
  }
  return listNode; 
    }
View Full Code Here

*/
public class FeatureModelHelper {

    static public Feature getParent(FeatureModel featureModel, ConstraintModel constraintModel,
      String featureId) {
  Feature parent = null;
  if (featureModel != null)
      parent = featureModel.getParentFeature(featureId);
  if (parent == null && constraintModel != null)
      parent = constraintModel.getParentFeature(featureId);
  return parent;
View Full Code Here

 
  String rootId = featureId;
  String tempId = featureId;
  while (tempId != null) {
      rootId = tempId;
      Feature parent = getParent(featureModel, constraintModel, tempId);
      if (parent != null)
    tempId = parent.getID();
      else
    tempId = null;
  }
  return featureModel.getFeature(rootId);
    }
View Full Code Here

TOP

Related Classes of de.FeatureModellingTool.FeatureModel.Feature

Copyright © 2018 www.massapicom. 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.