Package org.cfeclipse.frameworks.fusebox.actions

Examples of org.cfeclipse.frameworks.fusebox.actions.OpenFileAction


     */
//    1.Check there is a Circtuis file
    if(getCircuitFile() !=null){
      //We have a circuits file, lets open it, and add something along the lines of
      // <cfset f
      OpenFileAction ofa = new OpenFileAction();
      ofa.setFile(getCircuitFile());
      ofa.run();
     
      //Need to insert something at the END of the document
      GenericEncloserAction gea = new GenericEncloserAction();
      gea.setActiveEditor(null, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
      gea.setEnclosingStrings("\n<cfset fusebox.circuits." + name + " = \"" + path + "\">\n"," ");
View Full Code Here


          //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();
          if(!openFileAction.isSuccess()){
            showMessage("File Not found: " + circuitFile);
           
          }
        }
        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();
         
         
          //showMessage(fusePath);
          //We open the file then go to the line.(which we should have stored in the FBXFuseAction or we get it
          // again with a "getFuseActionLocation(circuit, fuseaction) from the FBXparser
          //Find if it already has
          openFileAction.setFilename(fusePath);
          openFileAction.run();
          if(!openFileAction.isSuccess()){
            showMessage("File Not found: " + fusePath);
           
          }
        }
        else if (obj instanceof FBXDo){
View Full Code Here

TOP

Related Classes of org.cfeclipse.frameworks.fusebox.actions.OpenFileAction

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.