use of org.eclipse.titan.designer.AST.IOutlineElement in project titan.EclipsePlug-ins by eclipse.
the class OutlineViewSorter method compare.
@Override
public int compare(final Viewer viewer, final Object e1, final Object e2) {
if (sortByName) {
return super.compare(viewer, e1, e2);
}
int cat1 = category(e1);
int cat2 = category(e2);
if (cat1 != cat2) {
return cat1 - cat2;
}
if (!(e1 instanceof IOutlineElement) || !(e2 instanceof IOutlineElement)) {
return 0;
}
IOutlineElement o1 = (IOutlineElement) e1;
IOutlineElement o2 = (IOutlineElement) e2;
return o1.getIdentifier().getLocation().getOffset() - o2.getIdentifier().getLocation().getOffset();
}
use of org.eclipse.titan.designer.AST.IOutlineElement in project titan.EclipsePlug-ins by eclipse.
the class OutlineLabelProvider method getImage.
@Override
public Image getImage(final Object element) {
String iconName = "titan.gif";
if (element instanceof IOutlineElement) {
IOutlineElement e = (IOutlineElement) element;
iconName = e.getOutlineIcon();
}
return ImageCache.getImage(iconName);
}
Aggregations