<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    West Farm
    吾本布衣,生于川北,躬耕于代碼的田地上。
    posts - 16,  comments - 15,  trackbacks - 0
    本文用英文寫的,主要是考慮到本文分享的內容即使在google上也搜索不到(至少我是沒有搜索到)。

    My English is at a very low level, don't care about this fact, just focus on the idea shared here.

    The idea comes from the source code of ConfigurationElement which is located in package org.eclipse.core.internal.registry, If you read through the source code, you can also get it. But I found there is no documentation about this topic, so I wrote this.

    Sometimes we need to contribute java class to a extension point. And we can use ConfigurationElement#
    createExecutableExtension(String attributeName) to create an instance of it, if such a class is just a normal class, eclipse will  call class#newInstance(). But there is obvious restriction for using this approach, can't pass parameter in to create instance for example.

    There are three different way how eclipse create instance of your class.

    1. normal, call class#newInstance()
    2. if your calss implements IExecutableExtension interface, IExecutableExtension#setInitializationData(IConfigurationElement config, String propertyName, Object data) will be called on the instance returned by class#newInstance()
    3. if your calss implements IExecutableExtensionFactory interface, IExecutableExtensionFactory#create() will be called

    When you use the second method or the third method, you can pass in parameters, check the source code of ConfigurationElement, you will know how to do that. :D forgive me, I'm lazy. 
    posted on 2012-04-15 16:33 West Farmer 閱讀(330) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     

    <2012年4月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    293012345

    常用鏈接

    留言簿

    隨筆分類

    隨筆檔案

    相冊

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费观看美女用震蛋喷水的视频| 美女黄网站人色视频免费国产| 亚洲国产综合自在线另类| 毛片免费观看的视频| 九九久久国产精品免费热6| 国产AV无码专区亚洲AVJULIA| 久久国产精品成人片免费| 亚洲av无码偷拍在线观看| 亚洲日韩中文字幕在线播放| AV大片在线无码永久免费| 色老头综合免费视频| 亚洲成a人片在线观看播放| 亚洲精品无码久久不卡| 国产精品爱啪在线线免费观看| 免费人成大片在线观看播放| 亚洲精品456在线播放| 国产国拍亚洲精品福利 | 两性刺激生活片免费视频| 国产精品亚洲五月天高清| 亚洲视频精品在线| 亚洲av无码天堂一区二区三区| 亚洲免费视频网址| 成人片黄网站色大片免费观看cn | 亚洲日韩乱码中文字幕| 亚洲色欲久久久综合网东京热| 大学生a级毛片免费观看| 免费国产成人午夜在线观看| 在线观看亚洲精品专区| 亚洲免费在线视频观看| 亚洲AV无码久久精品成人| 亚洲国产精品一区二区九九| 成年女人午夜毛片免费看| 最近中文字幕无免费| 两性色午夜免费视频| 美女一级毛片免费观看| 亚洲国产乱码最新视频| 亚洲精品国产第1页| 亚洲av无码国产精品色午夜字幕| 亚洲国产一级在线观看 | 一个人看的免费高清视频日本| 亚洲人片在线观看天堂无码|