Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.ShowInContext


        {
            return new IShowInSource()
            {
                public ShowInContext getShowInContext()
                {
                    return new ShowInContext( getMainWidget().getViewer().getInput(), getMainWidget().getViewer()
                        .getSelection() );
                }
            };
        }
View Full Code Here


            return new IShowInSource()
            {
                public ShowInContext getShowInContext()
                {
                    ISelection selection = getConfiguration().getCursor( getMainWidget().getViewer() ).getSelection();
                    return new ShowInContext( getMainWidget().getViewer().getInput(), selection );
                }
            };
        }

        return super.getAdapter( required );
View Full Code Here

        } else {
            selection = new TreeSelection(new TreePath(new Object[] {
                    DebugPlugin.getDefault().getLaunchManager(), target.getLaunch(),
                    target }));
        }
        return new ShowInContext(null, selection);
    }
View Full Code Here

        IWorkbenchPart sourcePart = getSourcePart();
        if (sourcePart == null) {
            return;
        }
        ShowInContext context = getContext(sourcePart);
        if (context == null) {
            return;
        }
        if (context.getInput() == null
                && (context.getSelection() == null || context.getSelection()
                        .isEmpty())) {
            return;
        }

        IViewDescriptor[] viewDescs = getViewDescriptors(sourcePart);
View Full Code Here

     * @return the <code>ShowInContext</code> to show or <code>null</code>
     */
    private ShowInContext getContext(IWorkbenchPart sourcePart) {
        IShowInSource source = getShowInSource(sourcePart);
        if (source != null) {
            ShowInContext context = source.getShowInContext();
            if (context != null) {
                return context;
            }
        } else if (sourcePart instanceof IEditorPart) {
            Object input = ((IEditorPart) sourcePart).getEditorInput();
            ISelectionProvider sp = sourcePart.getSite().getSelectionProvider();
            ISelection sel = sp == null ? null : sp.getSelection();
            return new ShowInContext(input, sel);
        }
        return null;
    }
View Full Code Here

        public ShowInContext getShowInContext() {
          ISelection selection= null;
          ISelectionProvider selectionProvider= getSelectionProvider();
          if (selectionProvider != null)
            selection= selectionProvider.getSelection();
          return new ShowInContext(getEditorInput(), selection);
        }
      };
    }

    if (IRevisionRulerColumn.class.equals(adapter)) {
View Full Code Here

    final IEditorPart editor = fEditor;

    if (key.equals(IShowInSource.class) && editor != null) {
      adapter = new IShowInSource() {
        public ShowInContext getShowInContext() {
          return new ShowInContext(editor.getEditorInput(), editor.getEditorSite().getSelectionProvider().getSelection());
        }
      };
    }
    else if (key.equals(IShowInTargetList.class) && editor != null) {
      adapter = editor.getAdapter(key);
View Full Code Here

    final IEditorPart editor = fEditor;

    if (key.equals(IShowInSource.class) && editor != null) {
      adapter = new IShowInSource() {
        public ShowInContext getShowInContext() {
          return new ShowInContext(editor.getEditorInput(), editor.getEditorSite().getSelectionProvider().getSelection());
        }
      };
    }
    else if (key.equals(IShowInTargetList.class) && editor != null) {
      adapter = editor.getAdapter(key);
View Full Code Here

        {
            return new IShowInSource()
            {
                public ShowInContext getShowInContext()
                {
                    return new ShowInContext( getMainWidget().getViewer().getInput(), getMainWidget().getViewer()
                        .getSelection() );
                }
            };
        }
View Full Code Here

            return new IShowInSource()
            {
                public ShowInContext getShowInContext()
                {
                    ISelection selection = getConfiguration().getCursor( getMainWidget().getViewer() ).getSelection();
                    return new ShowInContext( getMainWidget().getViewer().getInput(), selection );
                }
            };
        }

        return super.getAdapter( required );
View Full Code Here

TOP

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

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.