Examples of FileEditorInput


Examples of org.eclipse.ui.part.FileEditorInput

        }

        @Override
        public void linkActivated(HyperlinkEvent e) {
            IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
            FileEditorInput input = new FileEditorInput(file);

            try {
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                page.openEditor(input, "bndtools.bndWorkspaceConfigEditor", true);
            } catch (PartInitException ex) {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        IPath path = new Path(this.path);
        IFile fileInWorkspace =
            ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
       
        return fileInWorkspace != null
            ? new FileEditorInput(fileInWorkspace)
            : FileUtilities.getFileEditorInput(path);
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

   * @param mode
   *            one of the launch modes defined by the launch manager
   * @see org.eclipse.debug.core.ILaunchManager
   */
  public void launch(IEditorPart editor, String mode) {
    FileEditorInput editorInput = (FileEditorInput) editor.getEditorInput();
    launch(editorInput.getFile(), mode);
  }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        File moduleFile,
        IFile fileInWorkspace,
        String searchString) throws CoreException
    {
        IWorkbenchPage page = getEditor().getSite().getPage();
        IEditorPart editor = page.findEditor(new FileEditorInput(fileInWorkspace));
       
        if (editor instanceof PerlEditor)
        {
            return searchEditor((PerlEditor) editor, searchString);
        }
        else
        {
            Result res = searchExternalFile(moduleFile, searchString);
            if (!res.isFound()) return res;

            try
            {
                FileEditorInput input = new FileEditorInput(fileInWorkspace);
                PerlEditor newEditor = (PerlEditor)
                    getEditor().getSite().getPage().openEditor(
                        input,
                        getEditor().getSite().getId());
               
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    }
   
    private IEditorInput fileEditorInput(String path)
    {
        return new FileEditorInput(
            ResourcesPlugin.getWorkspace().getRoot().getFile(
                new Path(path)));
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                            false);
                        file.create(in, true, monitor);
                    }

                    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                    FileEditorInput input = new FileEditorInput(file);
                    window.getActivePage().openEditor(input, editorID);
                }
                catch (IOException e)
                {
                    // TODO Auto-generated catch block
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        final IWorkbench wbench = PlatformUI.getWorkbench();
        final IWorkbenchPage page = wbench.getActiveWorkbenchWindow().getActivePage();
        final IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry()
                .getDefaultEditor(file.getName());
        try {
            page.openEditor(new FileEditorInput(file), desc.getId());
        } catch (final PartInitException e) {
            ErlLogger.error(e);
        }
    }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        IErlElement element = element0;
        final IResource resource = element.getResource();
        if (resource instanceof IFile) {
            IFile file = (IFile) resource;
            file = resolveFile(file);
            return new FileEditorInput(file);
        }
        String filePath = element.getFilePath();
        while (filePath == null) {
            final IErlElement parent = element.getParent();
            if (parent != null) {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        if (input instanceof IErlElement) {
            return getEditorInput((IErlElement) input);
        }

        if (input instanceof IFile) {
            return new FileEditorInput((IFile) input);
        }

        // if (input instanceof IStorage)
        // return new JarEntryEditorInput((IStorage)input);
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    @Override
    public IEditorInput getEditorInput(final Object element) {

        if (element instanceof IFile) {
            return new FileEditorInput((IFile) element);
        }
        if (element instanceof ILineBreakpoint) {
            return new FileEditorInput((IFile) ((ILineBreakpoint) element).getMarker()
                    .getResource());
        }
        return 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.