添加自己的擴(kuò)展點(diǎn)
1.需求現(xiàn)在有plugin A,plugin B,plugin C,plugin Core 4個(gè)插件,要求設(shè)計(jì)plugin A,plugin B,plugin C 采用一個(gè)注冊機(jī)制,
當(dāng)plugin Core 運(yùn)行時(shí)候自動(dòng)加載plugin A,plugin B,plugin C 的module接口 ,將其自動(dòng)注冊到plugin Core 的
ProjectModuleViewer窗口中,并可以對其操作.
由于workbench 采用的是LAZY模式,只有對plugin A,plugin B,plugin C各自運(yùn)行才執(zhí)行各自的插件,所以在同時(shí)
runtime中無法獲得他們的module.
故采用插件的新建擴(kuò)展點(diǎn)
<extension-point name="myextension" id="myextension"/>
plugin A,plugin B,plugin C分別實(shí)現(xiàn)這個(gè)擴(kuò)展點(diǎn).
ProjectModuleViewer窗口自動(dòng)裝入擴(kuò)展點(diǎn).
posted on 2005-11-03 18:18 jame 閱讀(574) 評論(1) 編輯 收藏 所屬分類: Eclipse plugin Extension points擴(kuò)展點(diǎn)