public List<IconDef> getIcons() { return icons; }
public IconSetExtension(IConfigurationElement element) {
type = element.getName();
id = element.getAttribute(ID_ATTRIBUTE);
icondef = element.getAttribute(ICONDEF_ATTRIBUTE);
MXParser parser = new MXParser();
Bundle bundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
URL icondefurl = FileLocator.find(bundle,new Path(icondef),null);
IPath path2 = new Path(icondef).removeLastSegments(1);
URL path2url = FileLocator.find(bundle,path2,null);
String path = icondefurl.getPath();
logger.finer("path: " + path);
logger.finer("path2url: " + path2url.toString());
try {
URL url = FileLocator.resolve(path2url);
logger.finer("path2url-resolved: " + url.toString());
rootpath = url.toString();
} catch (IOException e1) {
e1.printStackTrace();
}
try {
parser.setInput(icondefurl.openStream(),"UTF-8");
parseIconDef(parser);
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();