直接看代码
InputStream is = EditorPlugin.getDefault().getBundle().getEntry("icons/project.gif").openStream();
protected IEntryDictionary importXMLEntryDictionary(
Bundle bundle, IEntryDictionary entryDictionary)
{
try
{
if (bundle == null)
return entryDictionary;
URL url=bundle.getEntry(ENTRY_DICTIONARY_FILE);
// get xml file's encoding
String encoding=getXmlFileEncoding(url);
if(encoding!=null)
fileEncoding=encoding;
InputStream is = url.openStream();
return importXMLEntryDictionary(is, entryDictionary);
} catch (Exception e)
{
e.printStackTrace();
}
return new CompoundEntryDictionary();
}