FileDocCategorySizeDatePackage
EclipseUiHelper.javaAPI DocAndroid 1.5 API2354Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.ui

EclipseUiHelper

public final class EclipseUiHelper extends Object
Helpers for Eclipse UI related stuff.

Fields Summary
public static final String
CONTENT_OUTLINE_VIEW_ID
View Id for the default Eclipse Content Outline view.
public static final String
PROPERTY_SHEET_VIEW_ID
View Id for the default Eclipse Property Sheet view.
Constructors Summary
private EclipseUiHelper()
This class never gets instantiated.

    
          
      
    
Methods Summary
public static voidshowView(java.lang.String viewId, boolean activate)
Shows the corresponding view.

Silently fails in case of error.

param
viewId One of {@link #CONTENT_OUTLINE_VIEW_ID}, {@link #PROPERTY_SHEET_VIEW_ID}.
param
activate True to force activate (i.e. takes focus), false to just make visible (i.e. does not steal focus.)

        IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        if (win != null) {
            IWorkbenchPage page = win.getActivePage();
            if (page != null) {
                try {
                    IViewPart part = page.showView(viewId,
                            null /* secondaryId */,
                            activate ? IWorkbenchPage.VIEW_ACTIVATE : IWorkbenchPage.VIEW_VISIBLE);
                } catch (PartInitException e) {
                    // ignore
                }
            }
        }