Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.StructuredSelection


    parent = DynamicDAO.getDAO(IFolderDAO.class).save(parent);

    /* Auto-Reload added BookMark */
    for (IMark mark : parent.getMarks()) {
      if (mark.equals(bookmark)) {
        new ReloadTypesAction(new StructuredSelection(mark), (Shell) getShell().getParent()).run();
        break;
      }
    }

    return true;
View Full Code Here


    new EntityGroupItem(group, label2);
    new EntityGroupItem(group, label3);

    Object selectedItems[] = new Object[] { label1, group };

    IStructuredSelection sel = new StructuredSelection(selectedItems);
    List<IEntity> entities = ModelUtils.getEntities(sel);

    assertEquals(3, entities.size());

    int l1 = 0, l2 = 0, l3 = 0;
View Full Code Here

  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
  }

  public void scrollToFirstRow() {
    if (mElements.length > 0) {
      mTreeViewer.setSelection(new StructuredSelection(mElements[0]),
          true);
    }
  }
View Full Code Here

      break;
    }
  }

  public void setSelected(IXFile pFile) {
    StructuredSelection lSelection = new StructuredSelection(pFile);
    switch (mCurrentView) {
    case ITEM_VIEW: {
      mItemViewer.mTreeViewer.setSelection(lSelection);
    }
      break;
View Full Code Here

  private void onOpen(IBookMark bookmark, INews news, MouseEvent e) {

    /* Open Link in Browser if Modifier Key is pressed */
    if ((e.stateMask & SWT.MOD1) != 0) {
      new OpenInBrowserAction(new StructuredSelection(news)).run();
      close();
      return;
    }

    /* Otherwise open Feedview and select the News */
    IWorkbenchPage page = OwlUI.getPage();
    if (page != null) {
      Shell shell = page.getWorkbenchWindow().getShell();

      /* Restore from Tray or Minimization if required */
      ApplicationWorkbenchWindowAdvisor advisor = ApplicationWorkbenchAdvisor.fgPrimaryApplicationWorkbenchWindowAdvisor;
      if (advisor != null && advisor.isMinimizedToTray())
        advisor.restoreFromTray(shell);
      else if (shell.getMinimized()) {
        shell.setMinimized(false);
        shell.forceActive();
      }

      /* First try if the Bookmark is already visible */
      IEditorReference editorRef = EditorUtils.findEditor(page.getEditorReferences(), bookmark);
      if (editorRef != null) {
        IEditorPart editor = editorRef.getEditor(false);
        if (editor instanceof FeedView) {
          ((FeedView) editor).setSelection(new StructuredSelection(news));
          page.activate(editor);
        }
      }

      /* Otherwise Open */
 
View Full Code Here

      DynamicDAO.getDAO(ISearchMarkDAO.class).saveAll(locationConditionSearches);
    }

    /* Reload imported Feeds */
    if (!InternalOwl.TESTING)
      new ReloadTypesAction(new StructuredSelection(entitiesToReload), OwlUI.getPrimaryShell()).run();
  }
View Full Code Here

              if (addedFolder.getParent() != null)
                addedFolders.add(addedFolder);
            }

            if (!addedFolders.isEmpty())
              fViewer.setSelection(new StructuredSelection(addedFolders), true);
          }
        });
      }
    };
View Full Code Here

        /* Select added Folder */
        JobRunner.runInUIThread(SELECTION_DELAY, fFolderViewer.getControl(), new Runnable() {
          public void run() {
            FolderEvent event = events.iterator().next();
            fFolderViewer.setSelection(new StructuredSelection(event.getEntity()));
          }
        });
      }
    };

View Full Code Here

        }
      }
    });

    /* Select the input Folder and expand */
    fFolderViewer.setSelection(new StructuredSelection(fSelectedFolder));
    fFolderViewer.setExpandedState(fSelectedFolder, true);

    /* Add Menu: "New Folder" */
    MenuManager menuManager = new MenuManager();
    menuManager.add(new Action("New Folder...") {
View Full Code Here

    else
      data = parentOfMinSelected.getItem().getData();

    /* Apply selection */
    if (data != null) {
      IStructuredSelection newSelection = new StructuredSelection(data);
      setSelection(newSelection);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.StructuredSelection

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.