Examples of OpenFileAction


Examples of com.nanolaba.surtur.gui.actions.OpenFileAction

                if (!settings.getLastOpenedFiles().isEmpty()) {
                    removeAll();

                    for (File file : settings.getLastOpenedFiles()) {
                        if (file.exists()) {
                            OpenFileAction action = new OpenFileAction(file.getName(), file);
                            action.setFileReader(fileReader);
                            action.setSettings(settings);
                            add(new JMenuItem(action));
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.actions.OpenFileAction

        newAction.setText( "New..." );
       
        newDropDownAction = new NewWizardDropDownAction( window );
//        new NavigationHistoryAction( window, false );
       
        openFileAction = new OpenFileAction( window );
        register(openFileAction);
       
        closeAction = ActionFactory.CLOSE.create( window );
        register( closeAction );
       
View Full Code Here

Examples of org.apache.directory.studio.actions.OpenFileAction

        newAction.setText( Messages.getString( "ApplicationActionBarAdvisor.new" ) ); //$NON-NLS-1$

        newDropDownAction = new NewWizardDropDownAction( window );
        //        new NavigationHistoryAction( window, false );

        openFileAction = new OpenFileAction( window );
        register( openFileAction );

        closeAction = ActionFactory.CLOSE.create( window );
        register( closeAction );
View Full Code Here

Examples of org.apache.directory.studio.actions.OpenFileAction

        newAction.setText( "New..." );

        newDropDownAction = new NewWizardDropDownAction( window );
        //        new NavigationHistoryAction( window, false );

        openFileAction = new OpenFileAction( window );
        register( openFileAction );

        closeAction = ActionFactory.CLOSE.create( window );
        register( closeAction );
View Full Code Here

Examples of org.apache.directory.studio.actions.OpenFileAction

        newAction.setText( Messages.getString( "ApplicationActionBarAdvisor.new" ) ); //$NON-NLS-1$

        newDropDownAction = new NewWizardDropDownAction( window );
        //        new NavigationHistoryAction( window, false );

        openFileAction = new OpenFileAction( window );
        register( openFileAction );

        closeAction = ActionFactory.CLOSE.create( window );
        register( closeAction );
View Full Code Here

Examples of org.apache.directory.studio.actions.OpenFileAction

        newAction.setText( "New..." );

        newDropDownAction = new NewWizardDropDownAction( window );
        //        new NavigationHistoryAction( window, false );

        openFileAction = new OpenFileAction( window );
        register( openFileAction );

        closeAction = ActionFactory.CLOSE.create( window );
        register( closeAction );
View Full Code Here

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

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

          //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

Examples of org.eclipse.ui.actions.OpenFileAction

        IStructuredSelection iss = (IStructuredSelection)selection;
        if (iss.getFirstElement() instanceof JcrNode) {
          final JcrNode node = (JcrNode)iss.getFirstElement();
          final IFile file = node.getFileForEditor();
          if (file!=null) {
            actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, new OpenFileAction(getActivePage()) {
              @Override
              public void run() {
                try {
                  IDE.openEditor(getActivePage(), file, true);
                } catch (PartInitException e) {
View Full Code Here

Examples of org.eclipse.ui.actions.OpenFileAction

  }

  @Override
  public void init(ICommonActionExtensionSite site) {
    super.init(site);
    action = new OpenFileAction(getActivePage());
    ICommonViewerWorkbenchSite workbenchSite = null;
    if (site.getViewSite() instanceof ICommonViewerWorkbenchSite)
      workbenchSite = (ICommonViewerWorkbenchSite) site.getViewSite();

    if (workbenchSite != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.