#topicpath
----
//ここにコンテンツを記述します。
拡張ポイントの作成
 <extension
       point="kino.plugin.samples.dictionary">
    <dictionary name="stock.dat"/>
    <dictionary name="stock2.dat"/>
 </extension>
 <extension
       point="kino.plugin.samples.dictionary">
    <dictionary name="stock3.dat"/>
 </extension>
としたとき

 IPluginRegistry registry = Platform.getPluginRegistry();
 IExtensionPoint point = registry.getExtensionPoint("kino.plugin.samples.dictionary");
 IExtension[] extensions = point.getExtensions(); <-ここですでに他のプラグインの分も勘定されてる。
 
 // このforは extension の繰り返し
 for (int i = 0; i < extensions.length; i++) {
     IConfigurationElement[] elements = extensions[i]
             .getConfigurationElements();
 
     // このforは dictionary の繰り返し
     for (int j = 0; j < elements.length; j++) {
         System.out.println(elements[j].getAttribute("name"));
     }
 }


----
この記事は
#vote(おもしろかった,そうでもない)

#comment
#topicpath


SIZE(10){現在のアクセス:&counter;}

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS