You can expose custom objects to a service by implementing the org.eclipse.core.exceptions.ServiceProviderConversionException
extension point and the ServiceProviderConversionUtil
utility.
This custom object's state can then be persisted to a persistent service using Content Manager.
For more information, see content handler.
By default, when a Java class and a C++ class are defined as ServiceProviderConversionClasses, the Eclipse IDE can convert Java classes to C++ classes. By adding C++ plugin classes as ContentHandlerClasses, the plugin can convert the Java classes to C++. This lets you write Java code, and have it compile into a C++ class.
You can run this example without any user interface. Open org.eclipse.mylyn.convenience.mylynconsole.MylynConsole and start the service using the menu option Mylyn... -> Run Mylyn Console...
With an installed Mylyn project, this example looks for MylynConsole.proj, and creates the Java, C++ and C projects in that project.
With a Mylyn project, Eclipse will look for any files in the workspace that have the file name ending in .proj and make sure there are at least two ProjectContentHandler and ProjectContentConversionHandler registered.
To run this example, start Eclipse and select the plug-in via the Run menu option. This example will display a window similar to the following:
Example of using Content Transformation to expose a Java API using a C++ plugin Name