Pages

about my opensource eclipse java applications recently i'm studying GWT and Android

Saturday, March 05, 2005

how to get plugin dir on Eclipse RCP?

finally i choose that aproach.i don't that is best way.

public File toPluginDir(Plugin plugin){
return new File(Platform.getInstallLocation().getURL().getPath(),
"plugins/"
+plugin.getBundle().getSymbolicName()
+"_"
+plugin.getBundle().getHeaders().get("Bundle-Version"));
}

it's too difficult for me handle the Bundle Class.
it's sample of bundle.getHeaders() values.

Bundle-ClassPath='rcp_optipngwrapper.jar'
Bundle-Name='akJ OptipngWrapper Plug-in'
Bundle-Version='1.0.2'
Bundle-Localization='plugin'
Generated-from='1110021669453;type=2'
Bundle-SymbolicName='org.jpn.xucker.rcp.optipngwrapper; singleton=true'
Require-Bundle='org.jpn.xucker.commons,
org.eclipse.ui,
org.eclipse.core.runtime'
Bundle-Activator='org.jpn.xucker.rcp.optipngwrapper.OptipngWrapperPlugin'
Eclipse-AutoStart='true'
Bundle-Vendor='www.xucker.jpn.org'
Manifest-Version='1.0'
Provide-Package='org.jpn.xucker.rcp.optipngwrapper,
org.jpn.xucker.optipngwrapper'

No comments: