Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between pages "GEF/Developer FAQ" and "Adaptor Hooks"

< GEF(Difference between pages)
(Coding)
 
 
Line 1: Line 1:
= General =
+
== Overview ==
 +
Since Eclipse 3.0 the Framework Adaptor API has been available in the Equinox OSGi Framework.  A framework adaptor implementation is called upon by the Equinox OSGi Framework to perform a number of tasks.  A framework adaptor may be used to add functionality to the framework.
  
== What is GEF ==
+
A single framework adaptor is specified when the framework is launched. By default in Eclipse 3.0 this is set to the EclipseAdaptor. In order to add new functionality in an adaptor in Eclipse 3.0 and 3.1 it is required that the adaptor implementation either re-implement the complete framework adaptor API or extend one of the existing framework adaptor implementations.  This makes it impossible for two parties to add new functionality to the framework in separate adaptors at the same time because the Equinox OSGi Framework can only be configured to use one adaptor.
The [http://www.example.com Graphical Editing Framework] is an open source framework dedicated to providing a rich, consistent graphical editing environment for applications on the [http://www.eclipse.org/eclipse/index.php Eclipse Platform].
+
  
== Why should I use GEF? ==
+
In Eclipse 3.2 a new hookable adaptor has been included that is used by default as the framework adaptor. The framework adaptor API has remained unchanged for the most part in Eclipse 3.2. What has changed is the actual implementation of the adaptor API. A new implementation of the adaptor API is now included which provides hooks that others can implement to provide functionality to the adaptor implementation.
GEF enables developers to easily create rich graphical editors within Eclipse. GEF has been used to build a variety of applications, including state diagrams, activity diagrams, class diagrams, GUI builders for AWT, Swing and SWT, and process flow editors. For more information on GEF features, please see the [http://www.eclipse.org/gef/overview.html?cvsroot=Tools_Project Project Overview].  
+
  
== What version of Eclipse do I need? ==
+
== Hookable Adaptor ==
A given version of GEF requires the exact same version of the Eclipse PlatformFor example, GEF 3.0.1 requires Eclipse 3.0.1.
+
The hookable adaptor is implemented in the package org.eclipse.osgi.baseadaptor.  This adaptor implementation provides all of the default behavior required of a FrameworkAdaptor to provide an OSGi R4 compliant Framework.  It also provides many hooks that allow others to insert additional functionality into the framework through what are called framework extension bundlesSee the OSGi Core Specification chapter 3.15 "Extension Bundles" for more information.
  
== How do I make a suggestion for this FAQ? ==
+
Framework extension bundles are fragments of the system bundle (org.eclipse.osgi).  As a fragment they can provide extra classes which the framework can use. A framework extension bundle can define a set of hook implementations that are configured with the hookable adaptor (using a hookconfigurators.properties file).
This FAQ is hosted as a Wiki. Anyone can edit this page after creating an account.
+
  
== Which operating systems does GEF support? ==
+
=== The Base Adaptor ===
GEF is written in pure Java and should run on all operating systems officially supported by the Eclipse platform. It's primarily tested on Windows and Linux (GTK and Motif). See the readme file that came with your installation of GEF for specific versions.
+
The class org.eclipse.osgi.baseadaptor.BaseAdaptor implements the interface org.eclipse.osgi.framework.adaptor.FrameworkAdaptor.  This class is used by default as the adaptor of the framework.  You should avoid extending this class, instead you should use hook implementations to add functionality to the BaseAdaptor.
  
== How is GEF licensed? ==
+
In some cases it may be impossible to do what you want with the current set of adaptor hooks. In this case you may be forced to extend the BaseAdaptor class to provide your own adaptor implementation. If you find yourself in this situation then you should open a bug against Framework Equinox requesting a new hook method or interface.
GEF if licensed in accordance with the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License]. Third party components built using GEF are made available under their own licenses.
+
  
----
+
=== The Hook Registry ===
 +
The hook registry is implemented in the class org.eclipse.osgi.baseadaptor.HookRegistry. The hook registry is used to store all the hooks configured in the framework.  When the hook registry is initialized it will discover all the hook configurators installed in the framework and will call on them to add hooks to the registry.  The BaseAdaptor uses the hook registry at runtime to lookup and use the different hooks configured with the registry.
  
= Download and Install =
+
==== Hook Configurators ====
 +
Hook configurators must implement the org.eclipse.osgi.baseadaptor.HookConfigurator interface.  Hook configurators can add one or more hook implementations to the hook registry using the various add methods on the registry.
  
== How do I Install GEF? ==  
+
==== Discovering Hook Configurators ====
 +
In order for a hook configurator to be discovered by the hook registry its implementation must be accessable by the framework's classloader.  This implies that hook configurators must be built into the framework itself (org.eclipse.osgi) or be supplied by a framework extension bundle.  Again a framework extension bundle is really just a fragment to Framework (i.e org.eclipse.osgi or the System Bundle).
  
=== Download the bits manually ===
+
A hook configurator also must be declared in one of the following ways to indicate to the hook registry which classes should be loaded as hook configurators.
[http://download.eclipse.org/tools/gef/downloads/ Download] the version of GEF that matches your installation of Eclipse. (The SDK download contains documentation and source, while the runtime download does not.) Exit Eclipse and unzip into the "eclipse" directory's parent directory. Restart Eclipse and verify that everything is installed. To do so, go to Help->About Eclipse Platform->Plug-in Details. Check the following entries:
+
  
'''Provider'''        '''Plug-in name'''
+
===== hookconfigurators.properties files =====
Eclipse.org        Draw2d
+
A hookconfigurators.properties file can be used to declare a list of hook configator classes. The key hook.configurators is used in a hook configurators properties file to specify a comma separated list of fully qualified hook configurator classes.  For example, the Equinox Framework (org.eclipse.osgi) is shipped with a default set of hook configurators specified a hookconfigurators.properties file included in the org.eclipse.osgi.jar:
Eclipse.org        Draw2d Documentation (SDK only)
+
Eclipse.org        Graphical Editing Framework
+
Eclipse.org        Graphical Editing Framework Documentation (SDK only)  
+
Eclipse.org       Graphical Editing Framework SDK (SDK only)
+
  
The following directories should be present in your eclipse/plugins directory:
+
<code>
(Note: Version numbers may differ according to download. This list assumes Eclipse build 2.1.0):
+
hook.configurators=
 +
    org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator,
 +
    org.eclipse.osgi.internal.baseadaptor.DevClassLoadingHook,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseClassLoadingHook,
 +
    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter,
 +
    org.eclipse.core.runtime.internal.stats.StatsManager,
 +
    org.eclipse.osgi.internal.verifier.SignedBundleHook
 +
</code>
  
org.eclipse.draw2d.doc.isv_2.1.0 (SDK only)
+
Quite a few hook configurators are automatically enabled by default withing the Equinox Framework. The only hook configurator required for a fully functional OSGi R4 Framework is the org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator. All other configurators declared above add extra functionality needed by eclipse and can be disabled.
org.eclipse.draw2d_2.1.0
+
org.eclipse.gef.doc.isv_2.1.0 (SDK only)
+
org.eclipse.gef.source_2.1.0 (SDK only)
+
org.eclipse.gef_2.1.0
+
  
The following directories should be present in your eclipse/features directory:
+
Extension bundles may provide their own hookconfigurators.properties file to specify additional hook configurators. The hook registry will discover all hookconfigurator.properties files on its classpath and will merge all declared configurator classes into one list.
(Note: Version numbers may differ according to download. This list assumes Eclipse build 2.1.0):
+
  
org.eclipse.gef.source_2.1.0 (SDK only)
+
===== osgi.hook.configurators property =====
org.eclipse.gef_2.1.0
+
The osgi.hook.configurators configuration property is used to specify the list of hook configurators. If this property is set then the list of configurators specified will be the only configurators used.  If this property is set then the hookconfigurators.properties files will not be processed for additional configurators. This property can be used in a config.ini to lock down the set of configurators to a specific set.
  
=== Use the Eclipse Update Manager ===
+
===== osgi.hook.configurators.include property =====
1. Go to the Help / Software Updates / Find and Install..."
+
The osgi.hook.configurators.include configuration property is used to add additional hook configurators.  This is helpful for configuring optional hook configurators.  Hooks that should be enabled by default should be included in a hookconfigurators.properties file.  This property is ignored if the osgi.hook.configurators is set.
  
2. Choose the "Search for new features to install" option
+
===== osgi.hook.configurators.exclude property =====
 +
The osgi.hook.configurators.include configuration property is used to exclude any hook configurators.  This is helpful for disabling hook configurators that are specified in hook configurator properties files.  This property is ignored if the osgi.hook.configurators is set.
  
3. Add one of the update sites below.
+
== Hook interfaces ==
  
Release site:
+
=== Adaptor Hook ===
http://download.eclipse.org/tools/gef/releases/update-site/site.xml
+
  
Milestone site:
+
=== Bundle File Factory Hook ===
http://download.eclipse.org/tools/gef/milestones/update-site/site.xml
+
  
Update site for integration builds:
+
=== Bundle File Wrapper Factory Hook ===
http://download.eclipse.org/tools/gef/updates/site-interim.xml
+
  
You could also take a look at the Callisto site which by design lines up all
+
=== Bundle Watcher Hook ===
the components together for a particular milestone.
+
http://download.eclipse.org/callisto/releases/
+
  
== Why isn't GEF showing up in Eclipse? ==  
+
=== Class Loading Hook ===
After installing GEF by extracting it to the necessary directories, it may be necessary to accept the changes within Eclipse. This can be accomplished by going to Help->Software Updates->Manage Configuration and right-clicking on Eclipse Platform. Select "Detected Changes..." from the menu and click Finish to complete the installation. This is the most common cause of the install not showing up in the aforementioned Plug-in Details view.
+
  
== How do I Run the Logic Example? ==  
+
=== Class Loading Stats Hook ===
[http://download.eclipse.org/tools/gef/downloads/ Download] the example that matches your version of GEF.  Exit Eclipse and unzip into the eclipse directory.  Restart Eclipse and verify it was installed by going to Help->About Eclipse Platform->Plug-in Details and checking for Logic GEF Example in the list.  Next, create a simple Project. Then run the Logic Wizard. The wizard can be found at File->New->Other (Control+N), under the Examples heading. Select the simple project as the container in which the wizard will place the example document. The document should open automatically when you press Finish.
+
  
== Where do I find the documentation? ==
+
=== Storage Hook ===
The 3.1 documentation is now available [http://help.eclipse.org/help31 online].  [[Image:help_menu-1.png]]
+
  
The latest documentation is available in the SDK download. After unzipping this build into your Eclipse installation directory, start Eclipse (and possibly restart after updating via the update manager), click on the Help menu and then Help Contents.
+
== Bundle Files ==
  
When the Help window opens, there will be a section called GEF and Draw2d Plug-in Developer Guide. [[Image:help_toc.png]]
+
== Class Loaders ==
  
In this section, you'll find Developer Guides which contain high-level descriptions of GEF and Draw2d, as well as API References containing javadoc. 
+
== Examples ==
[[Image:gef_dev_guide.png]]
+
 
+
== How do I checkout GEF via CVS? ==
+
Open the CVS Repositories View using the Window menu.  Right-click on the view and select "New" --> "Repository Location..."
+
Enter the data shown here. Check out both the GEF and Draw2d plug-ins from the head stream for the most recent versions.
+
[[Image:FAQ_CVS.gif]]
+
 
+
----
+
 
+
= Developer =
+
 
+
== When should I use GEF and when should I use just Draw2d? ==
+
The simple answer to this question lies in their names. Draw2d is for drawing. GEF (or Graphical Editing Framework) is for editing.
+
 
+
Draw2d is used for rendering and layout. If all you want is to display data, all you need is Draw2d. If, on the other hand, you want to be able to manipulate that data, you should use GEF. GEF adds important functionality for editing -- commands for changing your model, a palette and tools for selecting and manipulating the edit parts that represent your model, direct edit, accessibility support such as keyboard navigation, native drag and drop, and much more that I've probably missed.
+
 
+
There may be only a few of these functions that you need -- for instance, you may just want to add drag and drop support so that you can drag files from the navigator or a file explorer and drop them onto your application/view, but otherwise only need to display the dropped data and not manipulate it. This is where the line gets blurred. You'll need to weigh the advantages and disadvantages of both options. On the one hand, you could move to GEF, get a bunch of functionality that you don't need and increase the complexity of your code. Or you could stick with Draw2d and implement the functionality you need yourself, maintaining a much simpler implementation. For the above example, I would personally implement the drag and drop function myself and stick with Draw2d. However, you should also consider future needs. You may want more of these functions down the road and moving to GEF now may be helpful.
+
 
+
== How do I redistribute GEF with my application? ==
+
First off, you should probably check out the [http://www.eclipse.org/legal/legalfaq.html Eclipse.org Legal FAQ], the [http://www-106.ibm.com/developerworks/library/os-cplfaq.html CPL FAQ], and/or the [http://www.eclipse.org/legal/cpl-v10.html CPL] itself. More information forthcoming.
+
 
+
== How do I ask questions? ==
+
Questions about the use of GEF in user projects that are not addressed in this FAQ should be posted to the [news://news.eclipse.org/eclipse.tools.gef GEF newsgroup]. Questions and comments regarding the implementation of GEF itself should be posted to the [https://dev.eclipse.org/mailman/listinfo/gef-dev GEF mailing list].
+
 
+
== How do I report a bug or request a feature? ==
+
GEF, like the Eclipse project, uses [http://www.bugzilla.org/ Bugzilla] as its bug and feature tracking system. Entering a bug\feature report is as simple as filling in a web form on the [http://dev.eclipse.org/bugs/ eclipse bugzilla page]. The first time you enter a bug you will need to [http://dev.eclipse.org/bugs/createaccount.cgi create a new bugzilla account] for yourself by providing an email address and choosing a password. Before submitting a bug, please be sure to check the list of [https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=GEF&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Reuse+same+sort+as+last+time open GEF bugs] and [https://bugs.eclipse.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=GEF&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=7&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0= recently closed GEF bugs].
+
 
+
== Can I develop a standalone GEF application without use of the Eclipse platform? ==
+
The official answer is No, this is not supported. The main reason involves the use of an Eclipse-specific file titled plugin.properties which GEF uses for string externalizations. However, since GEF is an open source project, modifications to the GEF codebase could potentially allow a GEF editor external to Eclipse.
+
 
+
== How can I get started on my GEF-based editor? ==
+
The best place to investigate initially is the [http://www.eclipse.org/gef/developer/faq.html#install_doc GEF documentation]. This provides high-level concepts of GEF and Draw2d. There is also a sample GEF editor that can be downloaded at the [http://download.eclipse.org/tools/gef/downloads/ GEF download page] . The source code is made entirely available.
+
 
+
----
+
 
+
= Coding =
+
 
+
== How do I instrument domain model changes that support undo/redo ==
+
 
+
You can define custom request types that represent model changes for your
+
domain.  An example would be how the logic example increments / decrements
+
the LED model item.  The IncrementDecrementAction creates a new request constant -->
+
...
+
request = new Request(INCREMENT_REQUEST);
+
...
+
 
+
Then the request is sent to the selected objects on the diagram surface. If the selected object is an LEDEditPart, then it has a custom EditPolicy installed on it's EditPolicy.COMPONENT_ROLE (LEDEditPolicy) that is used to handle model changes.  This EditPolicy is instrumented to understand the INCREMENT_REQUEST in it's getCommand method. It then returns a custom command that can handle undo/redo that will get executed on the command stack. 
+
 
+
@see LEDEditPolicy#IncrementDecrementCommand
+
 
+
If the request is not understood by the selected EditPart (i.e. no EditPolicy installed on EditPolicy.COMPONENT_ROLE), then a null command is returned.  This can indicate to the action that it should be disabled for the user.
+
 
+
== How do I do move an element from one container to another ==
+
If you're moving an element from one container into another, first you need to consider the model changes that persist the container changes.  To do that, an EditPolicy for removing the model element on the source (ContainerEditPolicy) is needed and an EditPolicy for adding the model element (XYLayoutEditPolicy).
+
 
+
If we consider moving a LED from the diagram to a Circuit:
+
First to remove it from the owned container using the OrphanChildCommand in Logic designer which will remove it from the first container.
+
@see LogicContainerEditPolicy#getOrphanChildrenCommand
+
 
+
Then it is added to the target container using an AddCommand
+
@see LogicXYLayoutEditPolicy#getAddCommand
+
 
+
These instrument the model changes.  Then the EditParts will listen to the model changes accordingly.  Both the DiagramEditPart and CircuitEditPart are LogicContainerEditPart which override the method getModelChildren.  Subsequent calls to refreshChildren will synchronize the EditPart children with the model children.  Alternatively, for performance they can listen to the model changes specifically which will invoke addChild or removeChild based on the corresponding event.
+
@see LogicEditPart@propertyChange
+
 
+
== How do I do "X" when the User double-clicks? ==
+
Mouse events are handled by a Draw2D event dispatcher.  When using GEF, a DomainEventDispatcher is used which allows heterogeneous handling of mouse events.  Mouse presses in general can either be processed by a Figure, or by a Tool.  A double-click is also a click, so the first event is a MouseDown, followed by a DoubleClick event.  When a MouseDown is dispatched, the event dispatcher will continue to send events to either the Figure or Tool until the Mouse is released.  So this means if the Tool processes MouseDown, it continues to get DoubleClick, dragging, and MouseUp.  If a Figure consumes the MouseDown event, it will receive these events.
+
 
+
The GEF SelectionTool already processes double-click and will send a SelectionRequest to the target EditPart under the mouse of the type REQ_OPEN.  The request is sent by calling EditPart.performRequest(Request).  This is the preferred way to do something in response to double-clicks.
+
 
+
== How do I find the location of the context menu? ==
+
Often, GEF clients want to know the location of the context menu so that, for instance, new parts can be created or pasted at that location. The context menu can be brought up via the keyboard (Shift+F10) and there's no guarantee that the mouse cursor will be over the editor (or even the active window) when the context menu comes up. Hence, we recommend to do this in a location-neutral manner. For instance, new parts can be added to the top-left visible corner of the selected container, or the location can be determined based on the location of the part that was copied.
+

Revision as of 11:48, 22 April 2006

Overview

Since Eclipse 3.0 the Framework Adaptor API has been available in the Equinox OSGi Framework. A framework adaptor implementation is called upon by the Equinox OSGi Framework to perform a number of tasks. A framework adaptor may be used to add functionality to the framework.

A single framework adaptor is specified when the framework is launched. By default in Eclipse 3.0 this is set to the EclipseAdaptor. In order to add new functionality in an adaptor in Eclipse 3.0 and 3.1 it is required that the adaptor implementation either re-implement the complete framework adaptor API or extend one of the existing framework adaptor implementations. This makes it impossible for two parties to add new functionality to the framework in separate adaptors at the same time because the Equinox OSGi Framework can only be configured to use one adaptor.

In Eclipse 3.2 a new hookable adaptor has been included that is used by default as the framework adaptor. The framework adaptor API has remained unchanged for the most part in Eclipse 3.2. What has changed is the actual implementation of the adaptor API. A new implementation of the adaptor API is now included which provides hooks that others can implement to provide functionality to the adaptor implementation.

Hookable Adaptor

The hookable adaptor is implemented in the package org.eclipse.osgi.baseadaptor. This adaptor implementation provides all of the default behavior required of a FrameworkAdaptor to provide an OSGi R4 compliant Framework. It also provides many hooks that allow others to insert additional functionality into the framework through what are called framework extension bundles. See the OSGi Core Specification chapter 3.15 "Extension Bundles" for more information.

Framework extension bundles are fragments of the system bundle (org.eclipse.osgi). As a fragment they can provide extra classes which the framework can use. A framework extension bundle can define a set of hook implementations that are configured with the hookable adaptor (using a hookconfigurators.properties file).

The Base Adaptor

The class org.eclipse.osgi.baseadaptor.BaseAdaptor implements the interface org.eclipse.osgi.framework.adaptor.FrameworkAdaptor. This class is used by default as the adaptor of the framework. You should avoid extending this class, instead you should use hook implementations to add functionality to the BaseAdaptor.

In some cases it may be impossible to do what you want with the current set of adaptor hooks. In this case you may be forced to extend the BaseAdaptor class to provide your own adaptor implementation. If you find yourself in this situation then you should open a bug against Framework Equinox requesting a new hook method or interface.

The Hook Registry

The hook registry is implemented in the class org.eclipse.osgi.baseadaptor.HookRegistry. The hook registry is used to store all the hooks configured in the framework. When the hook registry is initialized it will discover all the hook configurators installed in the framework and will call on them to add hooks to the registry. The BaseAdaptor uses the hook registry at runtime to lookup and use the different hooks configured with the registry.

Hook Configurators

Hook configurators must implement the org.eclipse.osgi.baseadaptor.HookConfigurator interface. Hook configurators can add one or more hook implementations to the hook registry using the various add methods on the registry.

Discovering Hook Configurators

In order for a hook configurator to be discovered by the hook registry its implementation must be accessable by the framework's classloader. This implies that hook configurators must be built into the framework itself (org.eclipse.osgi) or be supplied by a framework extension bundle. Again a framework extension bundle is really just a fragment to Framework (i.e org.eclipse.osgi or the System Bundle).

A hook configurator also must be declared in one of the following ways to indicate to the hook registry which classes should be loaded as hook configurators.

hookconfigurators.properties files

A hookconfigurators.properties file can be used to declare a list of hook configator classes. The key hook.configurators is used in a hook configurators properties file to specify a comma separated list of fully qualified hook configurator classes. For example, the Equinox Framework (org.eclipse.osgi) is shipped with a default set of hook configurators specified a hookconfigurators.properties file included in the org.eclipse.osgi.jar:

hook.configurators= 
   org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator,
   org.eclipse.osgi.internal.baseadaptor.DevClassLoadingHook,
   org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook,
   org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,
   org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler,
   org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook,
   org.eclipse.core.runtime.internal.adaptor.EclipseClassLoadingHook,
   org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter,
   org.eclipse.core.runtime.internal.stats.StatsManager,
   org.eclipse.osgi.internal.verifier.SignedBundleHook

Quite a few hook configurators are automatically enabled by default withing the Equinox Framework. The only hook configurator required for a fully functional OSGi R4 Framework is the org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator. All other configurators declared above add extra functionality needed by eclipse and can be disabled.

Extension bundles may provide their own hookconfigurators.properties file to specify additional hook configurators. The hook registry will discover all hookconfigurator.properties files on its classpath and will merge all declared configurator classes into one list.

osgi.hook.configurators property

The osgi.hook.configurators configuration property is used to specify the list of hook configurators. If this property is set then the list of configurators specified will be the only configurators used. If this property is set then the hookconfigurators.properties files will not be processed for additional configurators. This property can be used in a config.ini to lock down the set of configurators to a specific set.

osgi.hook.configurators.include property

The osgi.hook.configurators.include configuration property is used to add additional hook configurators. This is helpful for configuring optional hook configurators. Hooks that should be enabled by default should be included in a hookconfigurators.properties file. This property is ignored if the osgi.hook.configurators is set.

osgi.hook.configurators.exclude property

The osgi.hook.configurators.include configuration property is used to exclude any hook configurators. This is helpful for disabling hook configurators that are specified in hook configurator properties files. This property is ignored if the osgi.hook.configurators is set.

Hook interfaces

Adaptor Hook

Bundle File Factory Hook

Bundle File Wrapper Factory Hook

Bundle Watcher Hook

Class Loading Hook

Class Loading Stats Hook

Storage Hook

Bundle Files

Class Loaders

Examples

Back to the top