Search in sources :

Example 1 with IViewCategory

use of org.eclipse.ui.views.IViewCategory in project linuxtools by eclipse.

the class AbstractView method findRegisteredViewPath.

private String[] findRegisteredViewPath(Matcher<String> title) {
    IViewDescriptor viewDescriptor = findView(title);
    IViewCategory categoryDescriptor = findViewCategory(viewDescriptor);
    return pathForView(viewDescriptor, categoryDescriptor);
}
Also used : IViewDescriptor(org.eclipse.ui.views.IViewDescriptor) IViewCategory(org.eclipse.ui.views.IViewCategory)

Example 2 with IViewCategory

use of org.eclipse.ui.views.IViewCategory in project ecf by eclipse.

the class ShowViewDialogLabelProvider method getImage.

public Image getImage(Object element) {
    ImageDescriptor desc = null;
    if (element instanceof IViewCategory)
        desc = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
    else if (element instanceof IViewDescriptor)
        desc = ((IViewDescriptor) element).getImageDescriptor();
    if (desc == null)
        return null;
    Image image = (Image) images.get(desc);
    if (image == null) {
        image = desc.createImage();
        images.put(desc, image);
    }
    return image;
}
Also used : IViewDescriptor(org.eclipse.ui.views.IViewDescriptor) IViewCategory(org.eclipse.ui.views.IViewCategory) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) Image(org.eclipse.swt.graphics.Image)

Example 3 with IViewCategory

use of org.eclipse.ui.views.IViewCategory in project reddeer by eclipse.

the class ViewLookup method findRegisteredViewPath.

/**
 * Finds registered view path
 * @param title of view
 * @return view path
 */
public String[] findRegisteredViewPath(Matcher<String> title) {
    IViewDescriptor viewDescriptor = findView(title);
    IViewCategory categoryDescriptor = findViewCategory(viewDescriptor);
    return pathForView(viewDescriptor, categoryDescriptor);
}
Also used : IViewDescriptor(org.eclipse.ui.views.IViewDescriptor) IViewCategory(org.eclipse.ui.views.IViewCategory)

Aggregations

IViewCategory (org.eclipse.ui.views.IViewCategory)3 IViewDescriptor (org.eclipse.ui.views.IViewDescriptor)3 ImageDescriptor (org.eclipse.jface.resource.ImageDescriptor)1 Image (org.eclipse.swt.graphics.Image)1