Package org.eclipse.ui

Examples of org.eclipse.ui.IViewReference


    if (!_playlistName.isEmpty()) {
      Controller.getInstance().getPlaylistController().removePlaylist(_playlistName);
      try {       
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();             

        IViewReference playlistView = page.findViewReference(PlaylistView.ID, _playlistName);
                if (playlistView != null) {
                  page.hideView(playlistView);                   
                }                     
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here


import org.jampa.logging.Log;

public class ApplicationUtils {
 
  public static void closeViewByID(String id) {
    IViewReference view = null;
    IWorkbenchPage _page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IViewReference[] tabView = _page.getViewReferences();
   
    for (int i = 0; i < tabView.length; i++) {
      if ((tabView[i].getId() != null) &&
View Full Code Here

      _page.hideView(view);
    }
  }
 
  public static void closeViewByID(String primaryId, String secondaryId) {
    IViewReference view = null;
    IWorkbenchPage _page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IViewReference[] tabView = _page.getViewReferences();
   
    for (int i = 0; i < tabView.length; i++) {
      if ((tabView[i].getId() != null) &&
View Full Code Here

public class MenuDeletePlaylistHandler extends AbstractHandler implements IHandler {

  private IWorkbenchPage _page;
 
  private void closeViewByID(String id) {
    IViewReference view = null;
    IViewReference[] tabView = _page.getViewReferences();
   
    for (int i = 0; i < tabView.length; i++) {
      if ((tabView[i].getSecondaryId() != null) &&
          (tabView[i].getSecondaryId().equals(id))) {
View Full Code Here

  }
 
  private void initProgressMonitor() {
    IWorkbenchPage page = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IViewReference[] ref = page.getViewReferences();
    IViewReference view = null;
   
   
    for(int i=0;i<ref.length;i++) {
      if(ref[i].getId().equals("eu.admire.workbench.cv.plugin.views.CVView"));
        view = ref[i];
    }
   
   
    if(view != null) {
      IActionBars bars = view.getView(true).getViewSite().getActionBars();
      IStatusLineManager statusLine = bars.getStatusLineManager();
      pm = statusLine.getProgressMonitor();
     

    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.internal.LayoutPart#getCompoundId()
     */
    public String getCompoundId() {
        IViewReference ref = getViewReference();
        if (ref != null) {
      return ViewFactory.getKey(ref);
    }
       
        return super.getCompoundId();
View Full Code Here

    /**
     * Returns whether a view exists within the perspective.
     */
    public boolean containsView(IViewPart view) {
        IViewSite site = view.getViewSite();
        IViewReference ref = findView(site.getId(), site.getSecondaryId());
        if (ref == null) {
      return false;
    }
        return (view == ref.getPart(false));
    }
View Full Code Here

        presentation.dispose();

        fastViewPane.dispose();
       
        // Release each view.
        IViewReference refs[] = getViewReferences();
        for (int i = 0, length = refs.length; i < length; i++) {
            getViewFactory().releaseView(refs[i]);
        }

        mapIDtoViewLayoutRec.clear();
View Full Code Here

     *
     * @param viewId the view ID
     * @param secondaryId the secondary ID
     */
    public IViewReference findView(String id, String secondaryId) {
        IViewReference refs[] = getViewReferences();
        for (int i = 0; i < refs.length; i++) {
            IViewReference ref = refs[i];
            if (id.equals(ref.getId())
                    && (secondaryId == null ? ref.getSecondaryId() == null
                            : secondaryId.equals(ref.getSecondaryId()))) {
        return ref;
      }
        }
        return null;
    }
View Full Code Here

    public IViewReference[] getFastViews() {
      if (fastViewManager == null)
        return new IViewReference[0];
     
      List trueFVBRefs = fastViewManager.getFastViews(FastViewBar.FASTVIEWBAR_ID);
        IViewReference array[] = new IViewReference[trueFVBRefs.size()];
        trueFVBRefs.toArray(array);
        return array;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewReference

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.