Examples of FileEditorInput


Examples of org.eclipse.ui.part.FileEditorInput

    }

    protected void setInput(IEditorInput input) {
        IvyFileEditorInput ivyFileEditorInput = null;
        if (input instanceof FileEditorInput) {
            FileEditorInput fei = (FileEditorInput) input;
            IFile file = fei.getFile();
            ivyFileEditorInput = new IvyFileEditorInput(file);
        } else if (input instanceof IvyFileEditorInput) {
            ivyFileEditorInput = (IvyFileEditorInput) input;
        }
        super.setInput(ivyFileEditorInput);
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    }

    protected void setInput(IEditorInput input) {
        IvyFileEditorInput ivyFileEditorInput = null;
        if (input instanceof FileEditorInput) {
            FileEditorInput fei = (FileEditorInput) input;
            IFile file = fei.getFile();
            ivyFileEditorInput = new IvyFileEditorInput(file);
        } else if (input instanceof IvyFileEditorInput) {
            ivyFileEditorInput = (IvyFileEditorInput) input;
        }
        super.setInput(ivyFileEditorInput);
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        IFile file = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        if (file != null) {
            try {
                String editorId = "org.apache.ivyde.editors.IvyEditor";
                page.openEditor(new FileEditorInput(file), editorId, true);
                // only remember the default editor if the open succeeds
                IDE.setDefaultEditor(file, editorId);
            } catch (PartInitException e) {
                Shell parent = page.getWorkbenchWindow().getShell();
                String title = "Problems Opening Editor";
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        };

        try {
            new ProgressMonitorDialog(getSite().getWorkbenchWindow().getShell())
                    .run(false, true, op);
            setInput(new FileEditorInput(file));
            getCommandStack().markSaveLocation();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    }
    return editorId;
  }

  private IEditorPart getAndOpenEditor(IFile file, IWorkbenchPage page) throws PartInitException {
    IEditorInput input = new FileEditorInput(file);
    IEditorPart editor = page.findEditor(input);
    if (editor != null) {
      page.bringToTop(editor);
      page.activate(editor);
      return editor;
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    private Text           objText;        // for the object name
    private Combo          sortCombo;      // for the sort field

    public void doSave(IProgressMonitor monitor) {

        FileEditorInput input = (FileEditorInput) getEditorInput();
        File outputFile = input.getFile().getLocation().toFile();
        saveFile( monitor,
                  outputFile,
                  input );

    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        setVisibleName( editorInput );

        try {
            InputStream stream = null;
            if (editorInput instanceof FileEditorInput) {
                FileEditorInput input = (FileEditorInput) editorInput;
                stream = input.getFile().getContents();
            } else if (editorInput instanceof IStorageEditorInput) {
                IStorageEditorInput input = (IStorageEditorInput) editorInput;
                stream = input.getStorage().getContents();
            }

            model = new NLGrammarModel();
            DSLMappingFile file = new DSLTokenizedMappingFile();
            file.parseAndLoad( new InputStreamReader( stream ) );
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                Workspace w = (Workspace) ResourcesPlugin.getWorkspace();

                File file = (File) w.newResource(path, IResource.FILE);

                FileEditorInput input = new FileEditorInput(file);

                try
                {
                    int myFile = fefe(file.getContents(), getSelectedStatus(event).getTestName());
                    IWorkbenchPage activePage = PlatformUI
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
      page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
      page.showView(TruePositiveView.ID);
      page.showView(FalsePositiveView.ID);
      page.showView(FalseNegativeView.ID);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

  @Override
  protected PageRec doCreatePage(IWorkbenchPart part) {
    EditorPart source = (EditorPart) part;
    IEditorInput editorInput = source.getEditorInput();
    if (editorInput instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) editorInput;
      IResource r = fileInput.getFile();

      TestViewPage testPage = new TestViewPage(r);
      initPage(testPage);
      testPage.createControl(getPageBook());
      PageRec result = new PageRec(part, testPage);
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.