| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> |
| <HEAD> |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <TITLE>Simple plug-in example</TITLE> |
| |
| <link rel="stylesheet" type="text/css" HREF="../book.css"> |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <H1> |
| Plug it in: Hello World meets the workbench</H1> |
| <P > |
| The Eclipse platform is structured as a core runtime engine and a set of additional features that are installed as platform |
| <b>plug-ins</b>. Plug-ins contribute functionality to the platform by contributing to pre-defined |
| <b> extension points</b>. The workbench UI is contributed by one such plug-in. When you start up the workbench, you are not starting up a single Java program. You are activating a platform runtime which can dynamically discover registered plug-ins and start them as needed.</P> |
| <P > |
| When you want to provide code that extends the platform, you do this by defining |
| system extensions in your plug-in. The platform has a well-defined set of extension |
| points - places where you can hook into the platform and contribute system behavior. From the platform's perspective, your plug-in is no different |
| from basic plug-ins like the resource management system or the workbench itself.</P> |
| <P > |
| So how does your code become a plug-in? </P> |
| <ul> |
| <li>Decide how your plug-in will be integrated with the platform.</li> |
| <li>Identify the extension points that you need to contribute in order to |
| integrate your plug-in.</li> |
| <li>Implement these extensions according to the specification for the |
| extension points.</li> |
| <li>Provide a manifest file (plugin.xml) that describes the extensions you are |
| providing and the packaging of your code.</li> |
| </ul> |
| <P > |
| Creating a plug-in is best demonstrated by implementing an old classic, "Hello World," as a plug-in. We'll gloss over some details at first in order to get it running. Then we'll look at extension points in more detail, see where they are defined, and learn how plug-ins describe their implementation of an extension.</P> |
| <p><a href="../hglegal.htm"><img border="0" src="../ngibmcpy.gif" alt="Copyright IBM Corporation and others 2000, 2003." border="0" width="324" height="14"></a></p> |
| </BODY> |
| </HTML> |