Developing Eclipse Plugins<br />לירן זילכה<br />מנכ&quot;ל משותף<br />Liran.zelkha@alunasoft.com<br />
Aluna<br />Israel’s leading Java/JavaEE and SOA consulting company<br />Customers:<br />
Eclipse plug-in architecture<br />Some of this material was taken from a plug-in course developed by the ECESIS project.  ...
Eclipse plug-in architecture<br />Flexible, structured around extension points and plug-ins<br />This architecture allows ...
Eclipse plug-in architecture<br />Tool<br />(plug-in)<br />Tool<br />(plug-in)<br />Tool<br />(plug-in)<br />Plug-in <br /...
Platform runtime<br />In the Eclipse, everything is plug-in except the Platform Runtime (the kernel)<br />All other subsys...
Extension points<br />Describe additional functionality that could be integrated with the platform<br />External tools ext...
Extension points<br />There are two levels of extending Eclipse:<br />Extending core platform<br />Extending existing exte...
Plug-ins<br />Define extension points<br />Each plug-in defines its own set of extension points<br />Implement specialized...
Plug-ins<br />Implement behavior defined through extension point API interface<br />Can extend named extension points from...
What&apos;s in a plug-in?<br />A JAR file<br />An archive with the plug-in code<br />plugin.xml<br />Manifest that describ...
Describing plug-ins<br />An extension to the platform has to be registered somewhere<br />Each plug-in has a manifest file...
Describing plug-ins<br />The manifest file is plugin.xml. <br />There are Eclipse tools that make it easy to edit the file...
Example manifest file<br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;?eclipse version=&quo...
Packaging plug-ins<br />Plug-ins are packaged as Java Archives – JAR files<br />Archives are named using naming convention...
Publishing plug-ins<br />Used for preparing plug-in for deployment on a specific platform<br />Manual publishing makes use...
Publishing plug-ins<br />Automatic publishing is available by using Eclipse wizards<br />You don&apos;t have to use Ant sc...
Installing plug-ins<br />Plug-ins are installed under the plugins directory under the Eclipse installation directory<br />...
Plug-in fragments<br />Used for extending existing plug-ins<br />Provide an additional functionality to existing plug-ins<...
Plug-in fragments<br />Described in fragment.xml files<br />Similar to plug-in manifest files<br />Plug-in archive can con...
Eclipse API<br />Meant to be used by plug-in developers<br />API elements are documented and completely specified<br />The...
Eclipse API<br />The Eclipse platform code is separated into:<br />API packages<br />Contain API elements<br />Non-API pac...
Using the Eclipse API<br />The API can be used by doing one of the following:<br />Instantiating platform API classes<br /...
Using the Eclipse API<br />More ways to use the API:<br />Overriding API methods<br />Allowed for some methods<br />Implem...
Upcoming SlideShare
Loading in...5
×

Building Eclipse Plugins

4,102

Published on

Basic terminology of eclipse plugins development

Published in: Technology, Art & Photos
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,102
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
73
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Building Eclipse Plugins

  1. 1. Developing Eclipse Plugins<br />לירן זילכה<br />מנכ&quot;ל משותף<br />Liran.zelkha@alunasoft.com<br />
  2. 2. Aluna<br />Israel’s leading Java/JavaEE and SOA consulting company<br />Customers:<br />
  3. 3. Eclipse plug-in architecture<br />Some of this material was taken from a plug-in course developed by the ECESIS project. <br />
  4. 4. Eclipse plug-in architecture<br />Flexible, structured around extension points and plug-ins<br />This architecture allows for:<br />Other tools to be used within the platform<br />Other tools to be further extended<br />Integration between tools and the platform<br />No need to wait for new product releases<br />
  5. 5. Eclipse plug-in architecture<br />Tool<br />(plug-in)<br />Tool<br />(plug-in)<br />Tool<br />(plug-in)<br />Plug-in <br />Developer<br />Environment<br />(PDE)<br />Java <br />Development<br />Tooling<br />(JDT)<br />Eclipse Platform<br />Workbench<br />Help<br />JFace<br />SWT<br />…<br />Workspace<br />Team<br />Platform Runtime<br />Eclipse SDK<br />
  6. 6. Platform runtime<br />In the Eclipse, everything is plug-in except the Platform Runtime (the kernel)<br />All other subsystems build up on the Platform Runtime following the rules of plug-ins<br />The Basic platform includes:<br />Resources Management<br />Workbench<br />Team<br />Debug<br />Help<br />
  7. 7. Extension points<br />Describe additional functionality that could be integrated with the platform<br />External tools extend the platform to bring specific functionality<br />Java Development Tooling (JDT) and Plug-in Development Environment (PDE) are external tools integrated with the platform<br />
  8. 8. Extension points<br />There are two levels of extending Eclipse:<br />Extending core platform<br />Extending existing extensions<br />Extension points may have a corresponding API interface<br />Describes what should be provided in the extension<br />
  9. 9. Plug-ins<br />Define extension points<br />Each plug-in defines its own set of extension points<br />Implement specialized functionality<br />Usually key functionality that does not already exist in the platform<br />Provide their own set of APIs<br />Used for further extension of their functionalities<br />Are external, but fully integrated<br />
  10. 10. Plug-ins<br />Implement behavior defined through extension point API interface<br />Can extend named extension points from Eclipse or extension points of other plug-ins<br />Can declare an extension point and provide an extension to it<br />Are developed in Java programming language<br />
  11. 11. What&apos;s in a plug-in?<br />A JAR file<br />An archive with the plug-in code<br />plugin.xml<br />Manifest that describes plug-in<br />about.html<br />Textual description of the plug-in<br />plugin.properties<br />Plugin-in properties<br />
  12. 12. Describing plug-ins<br />An extension to the platform has to be registered somewhere<br />Each plug-in has a manifest file that describes:<br />Location of the plug-in code<br />Extensions added by the plug-in<br />
  13. 13. Describing plug-ins<br />The manifest file is plugin.xml. <br />There are Eclipse tools that make it easy to edit the file without using XML directly.<br />The manifest describes:<br />Name, id, and version of the plug-in<br />List of other plug-ins (and versions) required by the plug-in described<br />Extension points<br />Where the plug-in code is located<br />
  14. 14. Example manifest file<br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;?eclipse version=&quot;3.0&quot;?&gt;<br />&lt;plugin <br /> name=&quot;Helloworld plug-in&quot; <br /> id=&quot;com.examples.helloworld&quot; <br /> version=&quot;1.0.0“<br />provider-name=&quot;EXAMPLE&quot;<br /> class=&quot;com.example.helloworld.HelloworldPlugin&quot;&gt; &gt; <br /> &lt;requires&gt;<br /> &lt;import plugin=&quot;org.eclipse.ui&quot;/&gt;<br /> &lt;import plugin=&quot;org.eclipse.core.runtime&quot;/&gt;<br /> &lt;import plugin=&quot;org.eclipse.core.runtime.compatibility&quot;/&gt;<br /> &lt;/requires&gt; <br /> &lt;runtime&gt;<br /> &lt;library name=&quot;helloworld.jar&quot;&gt;<br /> &lt;export name=&quot;*&quot;/&gt;<br /> &lt;/library&gt; <br /> &lt;/runtime&gt; <br /> &lt;extension point=&quot;org.eclipse.ui.views&quot;&gt;<br /> &lt;category name=&quot;Hello Category&quot; id=&quot;com.example.helloworld&quot;&gt; &lt;/category&gt; <br /> &lt;view <br /> name=&quot;Hello View&quot; icon=&quot;icons/sample.gif&quot; category=&quot;com.example.helloworld&quot; class=&quot;com.example.helloworld.HelloWorldView&quot; id=&quot;com.example.helloworld.HelloWorldView&quot;&gt; <br /> &lt;/view&gt; <br /> &lt;/extension&gt;<br />&lt;/plugin&gt;<br />
  15. 15. Packaging plug-ins<br />Plug-ins are packaged as Java Archives – JAR files<br />Archives are named using naming convention:<br />&lt;id&gt;_&lt;version&gt;.jar<br />&lt;id&gt; is the identifier<br />&lt;version&gt; is the full version number from the manifest file<br />For example: org.eclipse.demo. plugin.simple_1.0.jar<br />
  16. 16. Publishing plug-ins<br />Used for preparing plug-in for deployment on a specific platform<br />Manual publishing makes use of Ant scripts<br />Ant is a open source build tool, commonly used in building processes with Java code<br />Ant scripts are Java based (platform independent) with XML configuration<br />Ant is supported in Eclipse<br />
  17. 17. Publishing plug-ins<br />Automatic publishing is available by using Eclipse wizards<br />You don&apos;t have to use Ant scripts <br />Wizards allow publishing in a single zip file. A single zip file can contain multiple plug-ins.<br />
  18. 18. Installing plug-ins<br />Plug-ins are installed under the plugins directory under the Eclipse installation directory<br />Usually c:eclipseplugins on Windows platforms<br />
  19. 19. Plug-in fragments<br />Used for extending existing plug-ins<br />Provide an additional functionality to existing plug-ins<br />Ideal for providing add-on functionality to plug-ins<br />Packaged in separate files<br />Fragment content is treated as it was original plug-in archive<br />At runtime the platform detects fragments and merges their content with the original plug-in<br />
  20. 20. Plug-in fragments<br />Described in fragment.xml files<br />Similar to plug-in manifest files<br />Plug-in archive can contain plug-ins or fragments<br />
  21. 21. Eclipse API<br />Meant to be used by plug-in developers<br />API elements are documented and completely specified<br />The API elements specify what they are supposed to do and how they are intended to be used.<br />
  22. 22. Eclipse API<br />The Eclipse platform code is separated into:<br />API packages<br />Contain API elements<br />Non-API packages<br />Contain internal platform implementation<br />
  23. 23. Using the Eclipse API<br />The API can be used by doing one of the following:<br />Instantiating platform API classes<br />Subclassing platform API classes<br />Calling public API methods<br />Most commonly used<br />Calling protected API methods<br />Possible from API subclasses<br />
  24. 24. Using the Eclipse API<br />More ways to use the API:<br />Overriding API methods<br />Allowed for some methods<br />Implementing platform API interfaces<br />Accessing Fields in API classes and interfaces<br />Mainly final, read-only fields<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×