Your SlideShare is downloading. ×
0
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Building Eclipse Plugins
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Building Eclipse Plugins

4,058

Published on

Basic terminology of eclipse plugins development

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,058
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
73
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Developing Eclipse Plugins<br />לירן זילכה<br />מנכ&amp;quot;ל משותף<br />Liran.zelkha@alunasoft.com<br />
  • 2. Aluna<br />Israel’s leading Java/JavaEE and SOA consulting company<br />Customers:<br />
  • 3. Eclipse plug-in architecture<br />Some of this material was taken from a plug-in course developed by the ECESIS project. <br />
  • 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. 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. 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. 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. 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. 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. 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. What&amp;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. 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. 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. Example manifest file<br />&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;<br />&amp;lt;?eclipse version=&amp;quot;3.0&amp;quot;?&amp;gt;<br />&amp;lt;plugin <br /> name=&amp;quot;Helloworld plug-in&amp;quot; <br /> id=&amp;quot;com.examples.helloworld&amp;quot; <br /> version=&amp;quot;1.0.0“<br />provider-name=&amp;quot;EXAMPLE&amp;quot;<br /> class=&amp;quot;com.example.helloworld.HelloworldPlugin&amp;quot;&amp;gt; &amp;gt; <br /> &amp;lt;requires&amp;gt;<br /> &amp;lt;import plugin=&amp;quot;org.eclipse.ui&amp;quot;/&amp;gt;<br /> &amp;lt;import plugin=&amp;quot;org.eclipse.core.runtime&amp;quot;/&amp;gt;<br /> &amp;lt;import plugin=&amp;quot;org.eclipse.core.runtime.compatibility&amp;quot;/&amp;gt;<br /> &amp;lt;/requires&amp;gt; <br /> &amp;lt;runtime&amp;gt;<br /> &amp;lt;library name=&amp;quot;helloworld.jar&amp;quot;&amp;gt;<br /> &amp;lt;export name=&amp;quot;*&amp;quot;/&amp;gt;<br /> &amp;lt;/library&amp;gt; <br /> &amp;lt;/runtime&amp;gt; <br /> &amp;lt;extension point=&amp;quot;org.eclipse.ui.views&amp;quot;&amp;gt;<br /> &amp;lt;category name=&amp;quot;Hello Category&amp;quot; id=&amp;quot;com.example.helloworld&amp;quot;&amp;gt; &amp;lt;/category&amp;gt; <br /> &amp;lt;view <br /> name=&amp;quot;Hello View&amp;quot; icon=&amp;quot;icons/sample.gif&amp;quot; category=&amp;quot;com.example.helloworld&amp;quot; class=&amp;quot;com.example.helloworld.HelloWorldView&amp;quot; id=&amp;quot;com.example.helloworld.HelloWorldView&amp;quot;&amp;gt; <br /> &amp;lt;/view&amp;gt; <br /> &amp;lt;/extension&amp;gt;<br />&amp;lt;/plugin&amp;gt;<br />
  • 15. Packaging plug-ins<br />Plug-ins are packaged as Java Archives – JAR files<br />Archives are named using naming convention:<br />&amp;lt;id&amp;gt;_&amp;lt;version&amp;gt;.jar<br />&amp;lt;id&amp;gt; is the identifier<br />&amp;lt;version&amp;gt; is the full version number from the manifest file<br />For example: org.eclipse.demo. plugin.simple_1.0.jar<br />
  • 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. Publishing plug-ins<br />Automatic publishing is available by using Eclipse wizards<br />You don&amp;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. 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. 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. 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. 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. 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. 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. 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 />

×