Examples of FileEditorInput


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());
        }
        if (element instanceof LocalFileStorage) {
            final LocalFileStorage lfs = (LocalFileStorage) element;
            try {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

            true, new NullProgressMonitor());
      }
      IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
          .getActivePage();
     
      ConsoleEditor openEditor = (ConsoleEditor) activePage.openEditor(new FileEditorInput(file),
              "com.onpositive.google.scrapbook.javaeditor");
    } catch (CoreException e) {
      Activator.getDefault().log(e);
      MessageDialog.openError(Display.getCurrent().getActiveShell(),
          "Error", e.getMessage());
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    if(root.exists(filepath))
    {
      try
      {
        FileEditorInput htmlEditorInput = new FileEditorInput(root.getFile(filepath));
        htmlEditor = new StructuredTextEditor();
       
        htmlEditorIndex = addPage(htmlEditor, htmlEditorInput);
        setPageText(htmlEditorIndex, htmlEditor.getTitle());
      } catch (PartInitException e) {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    if(root.exists(filepath))
    {
      try
      {
        FileEditorInput cssEditorInput = new FileEditorInput(root.getFile(filepath));
        cssEditor = new StructuredTextEditor();
       
        cssEditorIndex = addPage(cssEditor, cssEditorInput);
        setPageText(cssEditorIndex, cssEditor.getTitle());
      } catch (PartInitException e) {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

      {
        PropertiesFileEditor propertiesEditor = new PropertiesFileEditor();
       
        int propertiesEditorIndex;
        try {
          propertiesEditorIndex = addPage(propertiesEditor, new FileEditorInput(((IFile)res)));
        } catch (PartInitException e) {
          ErrorDialog.openError(getSite().getShell(), "Error creating Properties editor", null, e.getStatus());
          continue;
        }
       
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

   */
  private void updateEditors()
  {
    if(htmlEditor != null)
    {
      htmlEditor.setInput(new FileEditorInput(ResourcesPlugin.getWorkspace().getRoot().getFile(getFilePath("html"))));
      setPageText(htmlEditorIndex, htmlEditor.getTitle());
    }
   
    if(cssEditor != null)
    {
      htmlEditor.setInput(new FileEditorInput(ResourcesPlugin.getWorkspace().getRoot().getFile(getFilePath("css"))));
      setPageText(cssEditorIndex, cssEditor.getTitle());
    }
   
    removePropertiesEditors();
    createPropertiesEditors();
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    Resource diagramResource = diagram.eResource();
    for (Iterator it = diagramResource.getContents().iterator(); it
        .hasNext();) {
      EObject nextEObject = (EObject) it.next();
      if (nextEObject == diagram) {
        return new FileEditorInput(WorkspaceSynchronizer
            .getFile(diagramResource));
      }
      if (nextEObject instanceof Diagram) {
        break;
      }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    private IEditorInput getEditorInput() {
      for (Iterator it = myDiagram.eResource().getContents().iterator(); it
          .hasNext();) {
        EObject nextEObject = (EObject) it.next();
        if (nextEObject == myDiagram) {
          return new FileEditorInput(WorkspaceSynchronizer
              .getFile(myDiagram.eResource()));
        }
        if (nextEObject instanceof Diagram) {
          break;
        }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

   */
  protected IEditorPart openNewEditor() throws Exception {
    IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(
        "a.txt");
    return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(
        new FileEditorInput(getFileForTesting()), desc.getId(), true);
  }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

   * element. For all other elements null is returned.
   */
  @Override
  protected IDocument createDocument(Object element) throws CoreException {
    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile file = fileInput.getFile();

      INlpElement nlpElement = CasEditorPlugin.getNlpModel().findMember(file);

      if (nlpElement instanceof DocumentElement) {

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.