Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.FileEditorInput


  }

  @Override
  protected ICasDocument createDocument(Object element) throws CoreException {
    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile casFile = fileInput.getFile();

      // Try to find a type system for the CAS file
      // TODO: Change to only use full path
      IFile typeSystemFile = null;
View Full Code Here


  @Override
  protected void doSaveDocument(IProgressMonitor monitor, Object element, ICasDocument document,
          boolean overwrite) throws CoreException {

    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile file = fileInput.getFile();

      if (document instanceof DocumentUimaImpl) {

        DocumentUimaImpl documentImpl = (DocumentUimaImpl) document;
View Full Code Here

    fireElementDirtyStateChanged(element, false);
  }

  private String getTypesystemId(Object element) {
    if (element instanceof FileEditorInput) {
      FileEditorInput editorInput = (FileEditorInput) element;
      return documentToTypeSystemMap.get(editorInput.getFile().getFullPath().toPortableString());
    }

    return null;
  }
View Full Code Here

                .getCurrent().getActiveShell(), ResourcesPlugin.getWorkspace().getRoot(),
                "Select a Type System", "Please select a Type System:");

        if (resource != null) {

          FileEditorInput editorInput = (FileEditorInput) editor.getEditorInput();
          setTypeSystemForNextDocumentOnly(editorInput.getFile().getFullPath().toPortableString(),
                  resource.getFullPath().toString());

          // Now set the input again to open the editor with the
          // specified type system
          editor.reopenEditorWithNewTypeSystem();
View Full Code Here

    monitor.setTaskName("Starting editor for new descriptor...");
    getShell().getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page1 = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page1.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor");
        } catch (PartInitException e) {
        }
      }
    });
    monitor.worked(2);
View Full Code Here

    if (m_nSaveAsStatus == SAVE_AS_CANCELLED) {
      m_nSaveAsStatus = SAVE_AS_NOT_IN_PROGRESS;
      return;
    }
    // should only do if editorInput is new
    FileEditorInput newEditorInput = (FileEditorInput) sourceTextEditor.getEditorInput();

    // if(old)
    setInput(newEditorInput);
    firePropertyChange(PROP_INPUT);
    // setTitle(newEditorInput.getFile().getName());
    setPartName(newEditorInput.getFile().getName());
    // this next does NOT seem to change the overall page title

    firePropertyChange(PROP_TITLE);
    finishSave(null, modelOK);
  }
View Full Code Here

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "taeconfigurator.editors.MultiPageEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

            if (window != null)
            {
                IWorkbenchPage page = window.getActivePage();
                if (page != null)
                {
                    FileEditorInput input = new FileEditorInput(
                        (IFile) getMarker().getResource());
                    return input;
                }
            }
        }
View Full Code Here

            if (window != null)
            {
                IWorkbenchPage page = window.getActivePage();
                if (page != null)
                {
                    FileEditorInput input = new FileEditorInput(
                        (IFile) getMarker().getResource());
                    TextEditor editor = (TextEditor) page.findEditor(input);
                    doc = editor.getDocumentProvider().getDocument(input);
                }
            }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.FileEditorInput

Copyright © 2018 www.massapicom. 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.