ISynchronizeModelElement node = (ISynchronizeModelElement)element;
element = node.getResource();
}
if (element instanceof IContainer) {
IContainer container = (IContainer) element;
if (container.isAccessible() && WGADesignStructureHelper.isDesignFolder(container)) {
WGADesignStructureHelper helper = new WGADesignStructureHelper(container);
if (helper.hasPluginConfig()) {
return WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_PLUGIN);
} else {
return WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_DESIGN);
}
} else if (container.isAccessible()) {
// we might have to resolve dirlinks
IFile dirlink = container.getFile(new Path("dirlink.xml"));
if (dirlink.exists()) {
File target = WGUtils.resolveDirLink(dirlink.getParent().getLocation().toFile());
if (WGADesignStructureHelper.isDesignFolder(target)) {
IContainer targets[] = ResourcesPlugin.getWorkspace().getRoot().findContainersForLocation(new Path(target.getAbsolutePath()));
if (targets != null && targets.length >= 1) {
WGADesignStructureHelper helper = new WGADesignStructureHelper(targets[0]);
if (helper.hasPluginConfig()) {
return WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_PLUGIN_LINK);
} else {