Example usage for org.eclipse.jface.util Assert isLegal

List of usage examples for org.eclipse.jface.util Assert isLegal

Introduction

In this page you can find the example usage for org.eclipse.jface.util Assert isLegal.

Prototype

public static boolean isLegal(boolean expression, String message) 

Source Link

Document

Asserts that an argument is legal.

Usage

From source file:org.eclipse.cdt.oprofile.ui.ProfileContentProvider.java

License:Open Source License

/**
 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
 *//*from   ww w.j  a  va 2  s. c  om*/
public Object[] getChildren(Object element) {
    Assert.isLegal(element instanceof IProfileElement, "in ProfileContentProvider"); //$NON-NLS-1$
    return ((IProfileElement) element).getChildren();
}

From source file:org.eclipse.cdt.oprofile.ui.ProfileContentProvider.java

License:Open Source License

/**
 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
 *///www  . j  a  va2s .  co m
public Object getParent(Object element) {
    Assert.isLegal(element instanceof IProfileElement, "in ProfileContentProvider"); //$NON-NLS-1$
    return ((IProfileElement) element).getParent();
}

From source file:org.eclipse.cdt.oprofile.ui.ProfileContentProvider.java

License:Open Source License

/**
 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(Object)
 *//*from  www  .j  av  a 2 s.c om*/
public boolean hasChildren(Object element) {
    Assert.isLegal(element instanceof IProfileElement, "in ProfileContentProvider"); //$NON-NLS-1$
    return ((IProfileElement) element).hasChildren();
}

From source file:org.eclipse.cdt.oprofile.ui.ProfileLabelProvider.java

License:Open Source License

/**
 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(Object)
 *///www. j  a va  2  s  .  c om
public Image getImage(Object element) {
    Assert.isLegal(element instanceof IProfileElement, "in ProfileLabelProvider"); //$NON-NLS-1$
    return ((IProfileElement) element).getLabelImage();
}

From source file:org.eclipse.cdt.oprofile.ui.ProfileLabelProvider.java

License:Open Source License

/**
 * @see org.eclipse.jface.viewers.ILabelProvider#getText(Object)
 *//*www .  jav a2  s.c o  m*/
public String getText(Object element) {
    Assert.isLegal(element instanceof IProfileElement, "in ProfileLabelProvider"); //$NON-NLS-1$
    return ((IProfileElement) element).getLabelText();
}