Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorInput


    }
    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


    IDocument document = getDocumentProvider().getDocument(getEditorInput());
    return document;
  }
 
  protected IFile getInputFile() {
    IEditorInput editorInput = getEditorInput();
    IFile file = null;
    if (editorInput instanceof IFileEditorInput) {
      IFileEditorInput ife = (IFileEditorInput) getEditorInput();
      file = ife.getFile();
    }
View Full Code Here

  /**
   * retrieves the active file from the active editor
   */
  public IFile getActiveFile() {
    IEditorPart editor = getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    IEditorInput input=null;
   
   
    if(editor!=null){
      input = editor.getEditorInput();
    }
View Full Code Here

   */
  @SuppressWarnings("restriction")
  public void run(IAction action) {
    org.rssowl.ui.internal.editors.feed.FeedView activeFeedView = org.rssowl.ui.internal.OwlUI.getActiveFeedView();
    if (activeFeedView != null) {
      IEditorInput input = activeFeedView.getEditorInput();
      if (input instanceof org.rssowl.ui.internal.editors.feed.FeedViewInput) {
        org.rssowl.ui.internal.editors.feed.FeedViewInput feedInput = (org.rssowl.ui.internal.editors.feed.FeedViewInput) input;
        if (feedInput.getMark() instanceof IBookMark) {
          IBookMark bm = (IBookMark) feedInput.getMark();
          try {
View Full Code Here

      List<IFolderChild> startingNodes = new ArrayList<IFolderChild>();

      /* Check Current Active FeedView */
      FeedView activeFeedView = OwlUI.getActiveFeedView();
      if (activeFeedView != null) {
        IEditorInput input = activeFeedView.getEditorInput();
        if (input != null && input instanceof FeedViewInput) {
          INewsMark mark = ((FeedViewInput) input).getMark();
          if (mark != null)
            startingNodes.add(mark instanceof FolderNewsMark ? ((FolderNewsMark) mark).getFolder() : mark);
        }
View Full Code Here

  private void editorActivated(IEditorPart part) {
    if (!fLinkingEnabled || part == null)
      return;

    /* Try to select and reveal editor input in the Explorer */
    IEditorInput editorInput = part.getEditorInput();
    if (editorInput instanceof FeedViewInput)
      reveal(((FeedViewInput) editorInput).getMark(), false);
  }
View Full Code Here

        };

        Collections.sort(newsbins, comparator);

        IEditorPart activeEditor = OwlUI.getActiveEditor();
        IEditorInput activeInput = (activeEditor != null) ? activeEditor.getEditorInput() : null;
        for (INewsBin bin : newsbins) {
          if (activeInput != null && activeInput instanceof FeedViewInput && ((FeedViewInput) activeInput).getMark().equals(bin))
            continue;

          manager.add(new MoveCopyNewsToBinAction(selection, bin, isMove));
View Full Code Here

   * @return IEditorReference
   */
  public static IEditorReference findEditor(IEditorReference[] editorReferences, Object input) {
    for (IEditorReference reference : editorReferences) {
      try {
        IEditorInput editorInput = reference.getEditorInput();
        if (editorInput instanceof FeedViewInput) {
          FeedViewInput feedViewInput = (FeedViewInput) editorInput;
          Object inputObj = feedViewInput.getMark();
          if (inputObj instanceof FolderNewsMark)
            inputObj = ((FolderNewsMark) inputObj).getFolder();
View Full Code Here

    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
            feedView.updateFilterAndGrouping(true);
          }
        } catch (PartInitException e) {
View Full Code Here

    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
            feedView.updateColumns();
          }
        } catch (PartInitException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorInput

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.