Package tool.model

Examples of tool.model.ToolPlan


    try {
      planName = planDir.getPersistentProperty(toolPlanNameQualifiedName);
      if (planName != null){
        return true;
      } else {
        ToolPlan plan = addPlanToFolder(planName, planDir);
        return (plan != null);
      }
    } catch (CoreException e) {
      ToolModelActivator.showError("Error checking Tool plan folder", e);
    }
View Full Code Here


   */
  public static ToolPlan getPlanFromFolder(IFolder planDir) {
    if (!isPlanFolder(planDir))
      return null;
    try {
      ToolPlan plan = (ToolPlan)planDir.getSessionProperty(toolPlanQualifiedName);
      if (plan == null)
        plan = addPlanToFolder(planDir.getName(), planDir);
      return plan;
    } catch (CoreException e) {
      ToolModelActivator.showError("Error getting Plan from folder", e);
View Full Code Here


  public static ToolPlan addPlanToFolder(String planName, IFolder planDir) throws CoreException{
    IFile prxFile = (IFile)planDir.findMember(planDir.getName() + ".prx");
    if (prxFile != null){
      ToolPlan plan = ToolPlan.getInstance(prxFile);
      planDir.setPersistentProperty(toolPlanNameQualifiedName, planName);
      planDir.setSessionProperty(toolPlanQualifiedName, plan);
      return plan;
    }
    return null;
View Full Code Here

      ToolModelActivator.showError("Error getting Repository Name from persistence store",e);
    }
    return reposName;
  }
  public static boolean isRunnablePlanFolder(IFolder resource) {
    ToolPlan plan = getPlanFromFolder(resource);
    if (plan == null)
      return false;
    return ((plan.getStartMethod() != null && !plan.getStartMethod().isEmpty()) &&
        (plan.getStartClass() != null && !plan.getStartClass().isEmpty()));
  }
View Full Code Here

    int errors = parser.getNumberOfSyntaxErrors();
    System.out.println(prx.getName() + " completed with " + errors + " errors");
    if (errors > 0){
      Assert.fail(prx.getName() + " completed with " + errors + " errors");
    }
    ToolPlan plan = parseUsingPRXTree(tree, tokenStream, prx.getName());
    //plan.writePrxFile("StringTemplates/Tool/PRX.stg", "Output/Tool/" + prx.getName());
   
  }
View Full Code Here

    //plan.writePrxFile("StringTemplates/Tool/PRX.stg", "Output/Tool/" + prx.getName());
   
  }

  private ToolPlan parseUsingPRXTree(CommonTree tree, TokenStream tokens, String name) throws RecognitionException{
    ToolPlan plan = new ToolPlan(name);
    CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree);
    nodes.setTokenStream(tokens);
    FortePRXTree walker = new FortePRXTree(plan, nodes);
    walker.project();
    int errors = walker.getNumberOfSyntaxErrors();
View Full Code Here

  @Override
  public void setElement(IAdaptable element) {
    super.setElement(element);
    planFolder = (IFolder)element;
    if (ToolProjectSupport.isPlanFolder(planFolder)){
      ToolPlan plan = ToolProjectSupport.getPlanFromFolder(planFolder);
      if (plan != null){
        setModel(plan);
      }
    }
  }
View Full Code Here

      monitor.beginTask("Loading Plan Cache", pexFiles.size());
      for (IFile pexFile : pexFiles){
        if (monitor.isCanceled())
          break;
        monitor.subTask(pexFile.getName());
        ToolPlan plan = ToolPlan.createPlanFromFile(pexFile);
        if (plan != null){
          cache.put(plan.getToolName().toUpperCase(), plan);
          System.out.println("+++ Adding to cache: " + plan.getToolName());
        } else {
          System.out.println("--- Plan not parsed: " + pexFile.getName());
        }
        monitor.worked(1);
      }
View Full Code Here

        Set<String> suppliers = plan.getSupplierPlans();
        for (String name : suppliers){
          // skip over forte libraries
          if (ToolProjectSupport.forteLibrariesSet.contains(name))
            continue;
          ToolPlan supplierPlan = ToolPlan.fetch(project, name);
          if (supplierPlan == null){
            System.out.println("looking for:"+name+":got null");
            continue;
          }

          supplierPlan.addSupplierTo(plan.getToolName());
        }
        //Do the traversal
        if (!importedPlans.contains(plan))
          traverseAndImport(plan, importedPlans);
       
View Full Code Here

 
  public void init(IEditorSite site, IEditorInput editorInput) {
    super.init(site, editorInput);
    IFileEditorInput ifei = (IFileEditorInput)editorInput;
    IFile modelFile = ifei.getFile();
    ToolPlan plan = ToolPlan.getInstance(modelFile);
    setPartName(plan.getToolName());
    this.setModel(plan);
  }
View Full Code Here

TOP

Related Classes of tool.model.ToolPlan

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.