if (element instanceof Baseline) {
return BundleTreeImages.resolveImage("bundle", ((Baseline)element).getDiff().getDelta().toString().toLowerCase(), null, null); //$NON-NLS-1$
}
if (element instanceof Diff) {
Diff tree = (Diff) element;
String type = tree.getType().toString().toLowerCase();
String strDelta = getDeltaString(tree);
String impExp = null;
if (tree.getType() == Type.PACKAGE) {
impExp = "export"; //$NON-NLS-1$
} else if (tree.getType() == Type.RESOURCE) {
String name = tree.getName();
int idx = name.lastIndexOf('.');
if (idx > -1) {
type = "dot_" + name.substring(idx + 1); //$NON-NLS-1$
}
}
return BundleTreeImages.resolveImage(type, strDelta, impExp, null);
}
if (element instanceof Tree) {
Tree tree = (Tree) element;
String type = tree.getType().toString().toLowerCase();
String impExp = null;
if (tree.getType() == Type.PACKAGE) {
impExp = "export"; //$NON-NLS-1$
} else if (tree.getType() == Type.RESOURCE) {
String name = tree.getName();
int idx = name.lastIndexOf('.');
if (idx > 0) {
type = "dot_" + name.substring(idx + 1); //$NON-NLS-1$
}
}