Package org.cfeclipse.frameworks.fusebox.objects

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


           } else{
             root = "";
           }
          
          
           FBXCircuit circ = new FBXCircuit(circuitName + root, circuitPath.replaceFirst(rootcirc, ""));
            
            
             circ.setProject(this.project);
             circ.setCircuitFile(getCircuitFile());
          
             // this should work?! circ.setParent(this.fbxapp);
             //Before we add any XFA's we should check if there are some, if so we add a folder
            
             XFAFolder xfas = new XFAFolder();
               FBXxfa myxfa = new FBXxfa("Test", "contiky");
               myxfa.setParent(xfas);

             //xfas.addChild(myxfa);
                    
             //xfas.addChildren(getXFAs(circ, this.project));
            
             //circ.addChild(xfas);  
             circ.addChildren(getFuseactions(circ, this.project));
             circ.setRoot(itemRoot);
          
            
           arrlist.add(circ);
            
            //circuits.put(circuitName.toString(),circuitPath.toString() );
View Full Code Here


      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

        }
        else if(obj instanceof FBXCircuit){
         
          //Maybe we should get a run action from the object?
          //Failing that ,we should ask the object what to do
          FBXCircuit circ = (FBXCircuit)obj;
         
         
          if(circ.getSwitchFile() != null){
            OpenFileAction openFileAction = new OpenFileAction();
            String switchPath = circ.getSwitchFile().getFullPath().toString();
            openFileAction.setFilename(switchPath);
            openFileAction.run();
            if(!openFileAction.isSuccess()){
              showMessage("File Not found: " + switchPath);
             
            }
          }
          else{
            Utils.println("No switch file exists.. create?");
            showMessage("Switch File not found");
          }
         
        } 
        else if(obj instanceof FBXFuseAction){
          FBXFuseAction fuseaction = (FBXFuseAction)obj;
          FBXCircuit circ = fuseaction.getCircuit();
          String switchFile = fuseaction.getSwichFile().getFullPath().toString();
         
          OpenFileAction openFileAction = new OpenFileAction();
       
          openFileAction.setFilename(switchFile);
          openFileAction.open(fuseaction.getTagStart(), fuseaction.getTagEnd());
          if(!openFileAction.isSuccess()){
            showMessage("File Not found: " + switchFile);
           
          }
        }
        else if(obj instanceof FBXFuse){
          FBXFuse fuse= (FBXFuse)obj;
          FBXFuseAction fuseaction = (FBXFuseAction)fuse.getParent();
          FBXCircuit circ = fuseaction.getCircuit();
         
         
         
          OpenFileAction openFileAction = new OpenFileAction();
          String fusePath = projcombo.getText() + "/" + fuse.getPath();
View Full Code Here

   
   
  }
  public void addFuseaction(){
    IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
    FBXCircuit circuit  = (FBXCircuit)selection.getFirstElement();
    AddFuseDialog dialog = new AddFuseDialog(this.getViewSite().getShell());
   
    if(dialog.open() == IDialogConstants.OK_ID){
      circuit.addFuseaction(dialog.getFuseactionName());
    }
   
  }
View Full Code Here

TOP

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

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.