Thursday, March 1, 2012

How to create an Eclipse Extension Point and Implement in another Plug-in Project


Here I'm showing one simple example: How to create a new Extension Point in Eclipse Plug-in and also implement it in another Plug-in project.
According to viewer's request, I'm taking that simple example of Adding functionality.
I created two plug-ins:
1. X_ExtPoint
2. Y_Implement

X_ExtPoint Plug-in is for providing the Extension Point whose ID is com.addition In second plug-in Y_Implement, extend the existing extension point (com.addition) and implement it. This extension point provides three attributes:
a. Number_1
b. Number_2
c. class

Here, class attribute is not mandatory. If you provide the java class, then output will be shown according to the java class implementation, otherwise the output will be the total of the two numbers which are provided in attribute fields.
To get the output, Run these two plug-in project as Eclipse Application and click on "Execute" action button on either Menu-bar or Toolbar.
Attachment: To Download this project click here and have a look on this.    

3 comments:

  1. Hi,
    I'm added this page on the basis of on demand request. If anybody have any question regarding Extension Point, please put your questions as a comment.
    I'll get back to you soon then.

    Thanks.

    ReplyDelete
  2. Hi please post tutorial for creating extension in our own plugin. So that other plugin use it.

    ReplyDelete
    Replies
    1. Please download the project mentioned in "Attachment" section and see the "X_ExtPoint" plugin project. What you mentioned here, I already done this in "X_ExtPoint" plugin project. If you still have any query please get back to me again. Thanks.

      Delete