画像の拡張ポイントを作成しようとしています。私が考えているのは、ユーザーが名前にIDと画像のパスを与える必要があるということですが、その後、どうすれば画像を作成できますか。拡張機能でクラスが指定されている場合、createExecutableExtension を使用してオブジェクトを作成できます。ただし、イメージのパスのみを実装する方法があります。助言がありますか?
1 に答える
0
そんな感じ:
// configuration element is the handle of your extension-point
String contributor = configurationElement.getContributor().getName();
String path = configurationElement.getAttribute("path");
InputStream openStream = FileLocator.openStream(Platform.getBundle(contributor), new Path(path), false);
Image image = new Image(null, openStream);
于 2012-07-24T07:32:46.267 に答える