Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPage.findView()


    if (fSelectionProvider != null) {
      IWorkbenchWindow window = SSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
      IWorkbenchPage page = window.getActivePage();
      if (page != null) {
        IViewPart findView = page.findView(getViewID());
        if (findView instanceof ISelectionListener && fPart != null) {
          ((ISelectionListener) findView).selectionChanged(fPart, fSelectionProvider.getSelection());
        }
        else {
          findView.getViewSite().getSelectionProvider().setSelection(fSelectionProvider.getSelection());
View Full Code Here


    public IViewPart openView(final String viewId) {
        IViewPart view = null;

        try {
            IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            view = workbenchPage.findView(viewId);

            if (view == null) {
                view = workbenchPage.showView(viewId);
            }
        } catch (PartInitException e) {
View Full Code Here

    public void actionPerformed(ActionEvent event) {

        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                IViewPart packageExplorer = page.findView(JavaUI.ID_PACKAGES);
                ISelection packageExplorerSelection = packageExplorer.getViewSite().getSelectionProvider().getSelection();
                fSelection = packageExplorerSelection;
            }
        });
View Full Code Here

  public Color getForeground(Object element) {
    if (element instanceof IViewDescriptor) {
      IWorkbenchPage activePage = window.getActivePage();
      if (activePage != null) {
        if (activePage
            .findView(((IViewDescriptor) element).getId()) != null) {
          return dimmedForeground;
        }
      }
    }
View Full Code Here

    logger.debug("entering execute");

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);

    // get the content provider and fill it with an empty list
    PWListContentProvider contentProvider = (PWListContentProvider) view
        .getContentProvider();
    try {
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    logger.debug("entering execute");
    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);
    TableViewer viewer = view.getViewer();

    // Get the selection
    PWListContentProvider contentProvider = (PWListContentProvider) view
        .getContentProvider();
View Full Code Here

    Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);

    // File standard dialog
    FileDialog fileDialog = new FileDialog(shell);
    fileDialog.setText("Select File");
    // Open Dialog and save result of selection
View Full Code Here

    logger.debug("entering execute");

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);

    PWListContentProvider contentProvider = (PWListContentProvider) view
        .getContentProvider();
    try {
View Full Code Here

    Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);

    // File standard dialog
    FileDialog fileDialog = new FileDialog(shell);
    // Set the text
    fileDialog.setText("Select file to merge");
View Full Code Here

    Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    IWorkbenchPage page = window.getActivePage();
    View view = (View) page.findView(View.ID);

    // File standard dialog
    FileDialog fileDialog = new FileDialog(shell, SWT.SAVE);
    // Set the text
    fileDialog.setText("Save as...");
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.