- Create a new Plug-in
Project.
- Open “MANIFEST.MF” file
from Plug-in project.
- Go to the “Extension” tab
in the plug-in editor.
- Click “Add…” button. “New
Extension” dialog box will be opened. Select “org.eclipse.ui.perspectives”
from the list shown under “Extension Points” tab.
- Click “Finish”.
- A new perspective
extension is now created. Now provide the id*, name* and class*
information accordingly.
- To create a class, click
on the class*: -> A “New
Java Class” dialog box will be opened. Click “Finish” to create a new java
class to the give package location.
- Save all unsaved files.
- To run the project,
R-Click on the project -> Run As -> Eclipse Application.
- A new instance of an
Eclipse will be opened.
- Go to Window -> Open
Perspective -> Other…
- “Open Perspective” dialog
box will be opened. Select your perspective name from the list and click
OK.
- One blank perspective will
be opened.
- Now close this test eclipse
window and go back to the development eclipse window to modify this
perspective.
- Open this newly created java class and modify it using the following code snippet:
- Run the project and see
the effect of the code in newly launched test eclipse workbench.
NB: If you don’t
see the different in your perspective, just reset it using this following command.
Window -> Reset Perspective…
-> Yes
Attachment: To Download this project click here.
Simple and easy to understand! Thanks alot!
ReplyDeleteHi Debabrata...would you please explain how two extenion points can interact? for example..below scenario:
ReplyDeleteb. Add some functionality like interface for adding two numbers. Using that in create a class that implement that interface and add two numbers.
c. Create second new plugin and by using first plugin, add two numbers with new class implementation in second plugin.
Hi,
DeleteI'm added one topic in my blog as per your request.
Please have a look this following link:
http://projectdev.blogspot.in/2012/03/how-to-create-eclipse-extension-point.html
and, if you have any further clarification, please revert back to me.
hi i want to implement a drag and drop functionality like window builder(it should generate code when u drag from ui to the editor.please help me with this.
ReplyDeletehttp://stackoverflow.com/questions/22253936/eclipse-drag-and-drop-on-text-editor
Hi Junaid,
DeleteI'll look into this features and get back to you soon.
Thanks in advance.
Hi Debabrata.
ReplyDeleteI would like to create a perspective using 3 views called ViewChart1, ViewChart2 and ViewChart3. These 3 views implement ViewPart and have been defined by me in order to display some charts. I would like to know how to override createInitialLayout so as to add these views in my perspective extension.
Thank you in advance.
I read carefully your tutorial and finally managed to display the views of my perspective. Still, I want to thank you for your good tutorial.
ReplyDeleteThanks Alvine. If you need any help regarding eclipse plug-ins in future please get back to me again.
DeleteThanks again.