Package q_impress.pmi.lib.translators

Examples of q_impress.pmi.lib.translators.TranslationException


    guard += " = " + getStateNumber(node);
   
    try {
      bodyWriter.write(guard);
    } catch (IOException e) {
      throw new TranslationException(this, "Unable to create guard", e);
    }
   
    if (close == true) closeGuard();
  }
View Full Code Here


  private void addGuardCondition(String condition) throws TranslationException {
    String predicate = " & " + condition;
    try {
      bodyWriter.write(predicate);
    } catch (IOException e) {
      throw new TranslationException(this, "Unable to add guard", e);
    }
  }
View Full Code Here

   */
  private void createGuardCondition(String condition) throws TranslationException {
    try {
      bodyWriter.write(" " + condition);
    } catch (IOException e) {
      throw new TranslationException(this, "Unable to create guard condition", e);
    }
  }
View Full Code Here

   */
  private void closeGuard() throws TranslationException {
    try {
      this.bodyWriter.write(" -> ");
    } catch (IOException e) {
      throw new TranslationException(this, "Unable to close guard", e);
    }
  }
View Full Code Here

    else transition += " + ";
   
    try {
      this.bodyWriter.write(transition);
    } catch (IOException e) {
      throw new TranslationException(this, "Unable to generate transition", e);
    }
  }
View Full Code Here

        Model model = (Model)obj;
        try {
          modelDec = (ModelDecorator) decFactory.getDecorator(model);
          break;
        } catch (ClassNotFoundException e) {
          throw new TranslationException(this, "Initialization failed", e);
        } catch (InvalidContextException e) {
          throw new TranslationException(this, "Initialization failed", e);
        }
      }
    }
   
    if (modelDec == null) throw new TranslationException(this, "Initialization failed, no UML model found");
  }
View Full Code Here

        else flag = true;
       
        namesList += name;
      }
     
      throw new TranslationException(this, "Unable to find definitions for activities :\"" + namesList + "\"");
    }
  }
View Full Code Here

      for (Activity act : activitiesToAnalyze_copy) {
        ActivityDecorator actDec = null;
        try {
          actDec = (ActivityDecorator) decFactory.getDecorator(act);
        } catch (ClassNotFoundException e) {
          throw new TranslationException(this, "Unable to compute activities' dependencies.", e);
        } catch (InvalidContextException e) {
          throw new TranslationException(this, "Unable to compute activities' dependencies.", e);
        }
       
        // create or get the info object associated to the activity
        ActivityInfo actInfo = activitiesInfo.get(act);
        if (actInfo == null) {
          actInfo = new ActivityInfo(act, decFactory);
          activitiesInfo.put(act, actInfo);
        }
       
        Set<CallBehaviorAction> invocationActions = actDec.getInvokeActions();
        for (CallBehaviorAction invokeAct : invocationActions) {
          if (invokeAct.getBehavior() instanceof Activity) {
            actInfo.addDependency((Activity) invokeAct.getBehavior());
            activitiesToAnalyze.add((Activity) invokeAct.getBehavior());
          } else throw new TranslationException(this, "Unable to compute activities' dependencies : activity \"" +
              act.getQualifiedName() + "\" invokes the external behaviour \"" + invokeAct.getQualifiedName() +
              "\" which is not itself an activity.");
        }
       
        activitiesToAnalyze.remove(act); // remove this activity from the set of activities to analyze
View Full Code Here

      ActivityInfo actInfo = activitiesInfo.get(act);
      BranchesAnalyzer analyzer = new BranchesAnalyzer(act, decFactory);
      try {
        actInfo.setExecutionTree(analyzer.analyze());
      } catch (AnalysisException e) {
        throw new TranslationException(this, "Unable to extract the execution tree for activity : \"" + act.getQualifiedName() + "\"", e);
      }
    }
  }
View Full Code Here

      ActivityInfo actInfo = activitiesInfo.get(act);
      PathAnalyzer analyzer = new PathAnalyzer(actInfo);
      try {
        actInfo.setExecutionPaths(analyzer.analyze());
      } catch (AnalysisException e) {
        throw new TranslationException(this, "Unable to extract the execution paths for activity : \"" + act.getQualifiedName() + "\"", e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of q_impress.pmi.lib.translators.TranslationException

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.