Examples of FileEditorInput


Examples of org.eclipse.ui.part.FileEditorInput

   
      NewWGAPortlet wizard = new NewWGAPortlet();
      wizard.setDefaultPortletName(_portletNameToCreate);
      IEditorPart editorPart = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
      if (editorPart != null && editorPart.getEditorInput() instanceof FileEditorInput) {
        FileEditorInput input = (FileEditorInput) editorPart.getEditorInput();
        wizard.init(workbench, new SingleStructuredSelection(input.getFile().getParent()));
        WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
        dialog.open();
      }       
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

   
  public static void validateTMLFile(IFile file) { 
    try {
      TMLDocumentProvider provider = new TMLDocumentProvider();   
      IFileEditorInput input = new FileEditorInput(file);     
      provider.connect(input);
     
      VersionCompliance versionCompliance = WGADesignStructureHelper.getWGAVersionCompliance(file);
     
      Iterator<MarkingHandler> it = allHandlers.iterator();
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    try {
      IAdaptable element = getElement();
      if (element instanceof IFile) {
        IFile tmlFile = (IFile) getElement();
        TMLDocumentProvider provider = new TMLDocumentProvider();   
        IFileEditorInput input = new FileEditorInput(tmlFile);     
        provider.connect(input);
       
        if (provider.getDocument(input).getContentType(0).equals(TMLPartitionScanner.TML_METAHEADER)) {
          hasMDHeader = true;
        }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    }
    return filteredEditors;
  }

  public static IEditorPart openEditor(IWorkbench workbench, IFile file, String editorID) throws PartInitException {
    IEditorInput editorInput = new FileEditorInput(file);
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    IWorkbenchPage page = window.getActivePage();
    return page.openEditor(editorInput, editorID);
  }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    }
    if (wizardDesc != null) {
      IWorkbenchWizard wizard = wizardDesc.createWizard();
      IEditorPart editorPart = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
      if (editorPart != null && editorPart.getEditorInput() instanceof FileEditorInput) {
        FileEditorInput input = (FileEditorInput) editorPart.getEditorInput();
        wizard.init(workbench, new SingleStructuredSelection(input.getFile().getParent()));
        WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
        dialog.open();
        return wizard;
      } else {
        return null;
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

 
 
  public static void doGenericValidation(IFile file) {
    try {
      IDocumentProvider provider = new WGADesignFileDocumentProvider();
      IFileEditorInput input = new FileEditorInput(file);     
      provider.connect(input);
       
      VersionCompliance versionCompliance = WGADesignStructureHelper.getWGAVersionCompliance(file);
       
      InvalidEncodingMarkingHandler handler = new InvalidEncodingMarkingHandler();
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                changeBufferContent(cf, src);
            } else {
                setDecompiled(false);
            }
        } else if (input instanceof FileEditorInput) {
            FileEditorInput fileEditorInput = (FileEditorInput) input;
            // make class file from that
            IClassFileEditorInput cfi = (IClassFileEditorInput) transformEditorInput(input);
            // return changed reference
            input = cfi;
            setDecompiled(true);
            IClassFile cf = cfi.getClassFile();
            char[] src = getSourceMapper().getSource(
                fileEditorInput.getFile(), cf, decompilerFlags);
            changeBufferContent(cf, src);
        }
        return input;
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

            {
                file.create( new ByteArrayInputStream( "".getBytes() ), true, null ); //$NON-NLS-1$
            }

            // Creating the new input for the editor
            FileEditorInput fei = new FileEditorInput( file );

            // Saving the file to disk
            saveEditorPages();
            saveConfiguration( fei, monitor );
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        // Close editor if file removed or switch to new location if file moved
        if (delta.getKind() == IResourceDelta.REMOVED) {
            if ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
                IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(delta.getMovedToPath());
                final FileEditorInput newInput = new FileEditorInput(file);

                setInput(newInput);
                Display display = getEditorSite().getShell().getDisplay();
                if (display != null) {
                    SWTConcurrencyUtil.execForDisplay(display, true, new Runnable() {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        // Close editor if file removed or switch to new location if file moved
        if (delta.getKind() == IResourceDelta.REMOVED) {
            if ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
                IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(delta.getMovedToPath());
                final FileEditorInput newInput = new FileEditorInput(file);

                setInput(newInput);
                Display display = getEditorSite().getShell().getDisplay();
                if (display != null) {
                    SWTConcurrencyUtil.execForDisplay(display, true, new Runnable() {
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.