Package org.cfeclipse.frameworks.fusebox.objects

Examples of org.cfeclipse.frameworks.fusebox.objects.FBXApplication


          cirFile = null;
          Utils.println("FBX3parser:getCircuits: circuit file not found");
        }
      }
   
    FBXApplication app = new FBXApplication(project.getName());
    this.fbxapp = app;
    if(cirFile != null){
      setCircuitFile(cirFile);
      app.setCircuitFile(cirFile);
    //get the children/Circuits
      ArrayList circuits = getCircuits(project, cirFile);
      String fusedoc = FusedocParser.getFusedoc(project, cirFile);
   
    app.setChildren(circuits);
    } else{
      app.setError(1);
    }
    return app;
  }
View Full Code Here


    return app;
  }
 
  public FBXApplication parse(IProject project, IFile cirFile){
    this.project = project;
    FBXApplication app = new FBXApplication(project.getName());
    //Set the root path for this app so we can do something like parent.getrootpath()
    //get the path from the file
   
   
   
    if(cirFile != null){
      this.fbxpath = cirFile.getParent().getProjectRelativePath().toString();
      app.setAppRootPath(fbxpath);
      setCircuitFile(cirFile);
      app.setCircuitFile(cirFile);
      //Just call it for this.. as we have to click into the rest
      app.setFusedoc(FusedocParser.getFusedoc(project, cirFile));
      //get the children/Circuits
      app.setChildren(getCircuits(project, cirFile));
    } else{
      app.setError(1);
    }
    return app;
  }
View Full Code Here

    ISelection selection = applicationTree.getSelection();
    Object obj = ((IStructuredSelection)selection).getFirstElement();
   
    if (obj instanceof FBXApplication){
      //Show the edit FBXApplication dialog
      FBXApplication app = (FBXApplication)obj;
      AddCurcuitDialog addCircuit =  new AddCurcuitDialog(applicationTree.getControl().getShell());
      addCircuit.setCreatefolders(true);
     
      if(addCircuit.open() == IDialogConstants.OK_ID){
        FBXCircuit circ = new FBXCircuit(addCircuit.getCircuitName(), addCircuit.getCircuitPath());
        circ.setCreateFolders(addCircuit.isCreatefolders());
        app.addChild(circ);
        //now we have set it, refresh the tree?
        applicationTree.refresh();
       
      }
       
View Full Code Here

  /**
   * @param obj
   */
  private void editApplication(Object obj) {
    //Show the edit FBXApplication dialog
    FBXApplication app = (FBXApplication)obj;
    EditApplicationDialog editApp = new EditApplicationDialog(applicationTree.getControl().getShell());
    editApp.setAppNameValue(app.getName());
   
    if(editApp.open() == IDialogConstants.OK_ID){
      app.setName(editApp.getAppNameValue());
      //now we have set it, refresh the tree?
      applicationTree.refresh();
    }
  }
View Full Code Here

    updateStatus(null);
  }

  private FBXRoot getInitialInput(){
    FBXRoot invisibleroot = new FBXRoot("");
    FBXApplication app = new FBXApplication("home");
    invisibleroot.addChild(app);
    return invisibleroot;
   
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
   */
  private void initialize(){
    invisibleRoot = new FBXRoot("");
    FBXApplication app = null;
    app.setName("root");
   
    invisibleRoot.addChild(app);
  }
View Full Code Here

       *  */
       
        if (obj instanceof FBXApplication){
         
          //Hopefully we dont need to go and get the path etc now
          FBXApplication fbxapp =(FBXApplication)obj;
          String circuitFile = fbxapp.getCircuitFile().getFullPath().toString();
               
          //showMessage("opening:" + circuitFile);
          OpenFileAction openFileAction = new OpenFileAction();
          openFileAction.setFilename(circuitFile);
          openFileAction.run();
View Full Code Here

    viewer.expandToLevel(2);
  }
  public void addCircuit(){
    //We need to get the slected object and test it
    IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
    FBXApplication app  = (FBXApplication)selection.getFirstElement();
    //Here we create a dialog and pass the items to the app
    AddCurcuitDialog dialog = new AddCurcuitDialog(this.getViewSite().getShell());
   
    if(dialog.open() == IDialogConstants.OK_ID){
      app.addCircuit(dialog.getCircuitName(), dialog.getCircuitPath(), dialog.isCreatefolders());
    }
   
   
  }
View Full Code Here

TOP

Related Classes of org.cfeclipse.frameworks.fusebox.objects.FBXApplication

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.