Package org.eclipse.ui

Examples of org.eclipse.ui.IViewPart


        final AsyncCaller<CallHierarchyView> ac = new AsyncCaller<CallHierarchyView>(100) {

            @Override
            protected CallHierarchyView prepare() {
                try {
                    final IViewPart p = page.showView("org.erlide.ui.callhierarchy");
                    final CallHierarchyView cvh = (CallHierarchyView) p
                            .getAdapter(CallHierarchyView.class);

                    cvh.setMessage("<searching... project "
                            + ErlangEngine.getInstance().getModelUtilService()
                                    .getProject(module).getName() + ">");
View Full Code Here


        if (SystemConfiguration.hasFeatureEnabled(Features.NEW_MODEL)) {
            if (input instanceof IFileEditorInput) {
                final IFile file = ((IFileEditorInput) input).getFile();
                final IErlSource fooFile = ErlModelCore.create(file);
                if (fooFile != null) {
                    final IViewPart navigatorView = PlatformUI.getWorkbench()
                            .getActiveWorkbenchWindow().getActivePage()
                            .findView(ErlangNavigator.ID);
                    if (navigatorView != null) {
                        final IStructuredSelection currentSelection = (IStructuredSelection) navigatorView
                                .getSite().getSelectionProvider().getSelection();
                        if (currentSelection != null && currentSelection.size() == 1) {
                            final Object element = currentSelection.getFirstElement();
                            if (element instanceof org.erlide.engine.new_model.IErlElement) {
                                if (fooFile
View Full Code Here

        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {
            final IViewPart view = window.getActivePage().showView(viewId);
            return view;
        } catch (final PartInitException e) {
            ErlLogger.error(e);
        }
        return null;
View Full Code Here

    static public IViewPart showView(final String viewId, final String secondaryID) {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {
            final IViewPart view = window.getActivePage().showView(viewId, secondaryID,
                    IWorkbenchPage.VIEW_ACTIVATE);
            return view;
        } catch (final PartInitException e) {
            ErlLogger.error(e);
        }
View Full Code Here

     */
    static public void hideView(final String viewId, final String secondaryId) {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        IViewPart view;
        final IViewReference viewr = window.getActivePage().findViewReference(viewId,
                secondaryId);
        if (viewr != null) {
            view = viewr.getView(false);
            if (view != null) {
View Full Code Here

    public static IViewPart showWarningView() {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {
            final IViewPart theView = window.getActivePage().showView(warningViewID);
            return theView;
        } catch (final PartInitException e) {
            ErlLogger.error(e);
        }
        return null;
View Full Code Here

     */
    public static void closeWarningView() {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        final IViewPart theView = window.getActivePage().findView(warningViewID);
        window.getActivePage().hideView(theView);

    }
View Full Code Here

    AbstractStorerTest<PartEvent, PartEventType, PartEventListType> {

  @Override
  protected PartEvent createEvent(DateTime dateTime) throws Exception {
    try {
      IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
          .getActivePage().showView("org.eclipse.ui.views.TaskList");
      return new PartEvent(new Interval(dateTime, dateTime.plus(1)), view);

    } catch (PartInitException e) {
      e.printStackTrace();
View Full Code Here

  }

  @Override
  protected PartEvent createEventDiff(final DateTime time) throws Exception {
    try {
      IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
          .getActivePage().showView("org.eclipse.ui.navigator.ProjectExplorer");
      return new PartEvent(new Interval(time, time.plus(2)), view);

    } catch (PartInitException e) {
      e.printStackTrace();
View Full Code Here

              display.asyncExec(new Runnable() {
                @Override
                public void run() {
                  CommonViewer viewer = null;
                  try {
                    IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                    if (view instanceof CommonNavigator) {
                      CommonNavigator navigator = (CommonNavigator) view;
                      viewer = navigator.getCommonViewer();
                    }
                  } catch (PartInitException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewPart

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.