org.eclipse.jet
Class JET2Platform

java.lang.Object
  extended by org.eclipse.jet.JET2Platform

public class JET2Platform
extends java.lang.Object

Utility class for invoking JET Transforms


Field Summary
static java.lang.String JET2_NATURE_ID
          The Project nature assigned to JET2 Transformation projects, "org.eclipse.jet.jet2Nature"
static java.lang.String PLUGIN_ID
          The Plugin identifier of the JET2 core plugin, "org.eclipse.jet".
 
Method Summary
static org.eclipse.core.runtime.IStatus execute(java.lang.String id, org.eclipse.core.resources.IResource resource, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. Use runTransformOnResource(String,IResource,Map, IProgressMonitor) instead
static org.eclipse.core.runtime.IStatus execute(java.lang.String id, java.lang.Object source, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. Use runTransformOnObject(String,Object,Map, IProgressMonitor) instead
static org.eclipse.core.runtime.IStatus execute(java.lang.String id, java.lang.String source, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. Use runTransformOnString(String,String,IProgressMonitor) instead
static org.eclipse.core.runtime.IStatus execute(java.lang.String id, java.lang.String source, java.lang.String kind, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. Use runTransformOnString(String,String,String,Map, IProgressMonitor) instead
static XPathFunctionMetaData[] getInstalledXPathFunctions()
          Return the XPath functions installed by the 'org.eclipse.jet.xpathFunctions' extension point.
static IJETBundleManager getJETBundleManager()
           
 ILoaderManager getModelLoaderManager()
          Return the model loader manager.
static IJETBundleDescriptor getProjectDescription(java.lang.String name)
          Return the bundle description for the named JET project
static java.lang.Object getShellContext()
          Return the value of the shell context, suitable for passing to TransformContextExtender.setShellContext(Object).
static org.eclipse.core.runtime.IStatus runTransform(java.lang.String id, JET2Context context, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET transform against the passed context
static org.eclipse.core.runtime.IStatus runTransformOnObject(java.lang.String id, java.lang.Object source, org.eclipse.core.runtime.IProgressMonitor monitor)
          Execute a JET transform with the passed object as the root of the source model.
static org.eclipse.core.runtime.IStatus runTransformOnObject(java.lang.String id, java.lang.Object source, java.util.Map variables, org.eclipse.core.runtime.IProgressMonitor monitor)
          Execute a JET transform with the passed object as the root of the source model.
static org.eclipse.core.runtime.IStatus runTransformOnResource(java.lang.String id, org.eclipse.core.resources.IResource resource, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET Transform on the pass resource, loading the resource using the transform's model loader.
static org.eclipse.core.runtime.IStatus runTransformOnResource(java.lang.String id, org.eclipse.core.resources.IResource resource, java.util.Map variables, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET Transform on the pass resource, loading the resource using the transform's model loader.
static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id, java.lang.String source, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET transform on the passed String representation of an XML model.
static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id, java.lang.String source, java.lang.String kind, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET transform on the passed String representation of an input model.
static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id, java.lang.String source, java.lang.String kind, java.util.Map variables, org.eclipse.core.runtime.IProgressMonitor monitor)
          Invoke a JET transform on the passed String representation of an input model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
The Plugin identifier of the JET2 core plugin, "org.eclipse.jet".

See Also:
Constant Field Values

JET2_NATURE_ID

public static final java.lang.String JET2_NATURE_ID
The Project nature assigned to JET2 Transformation projects, "org.eclipse.jet.jet2Nature"

See Also:
Constant Field Values
Method Detail

getShellContext

public static final java.lang.Object getShellContext()
Return the value of the shell context, suitable for passing to TransformContextExtender.setShellContext(Object). This method will work, even in the abscences of a shell or even SWT.

Returns:
the shell context or null if none is set

execute

public static org.eclipse.core.runtime.IStatus execute(java.lang.String id,
                                                       org.eclipse.core.resources.IResource resource,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated. Use runTransformOnResource(String,IResource,Map, IProgressMonitor) instead


execute

public static org.eclipse.core.runtime.IStatus execute(java.lang.String id,
                                                       java.lang.Object source,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated. Use runTransformOnObject(String,Object,Map, IProgressMonitor) instead

Execute a JET2 transformation

Parameters:
id -
source -
monitor -
Returns:
the execution status

execute

public static org.eclipse.core.runtime.IStatus execute(java.lang.String id,
                                                       java.lang.String source,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated. Use runTransformOnString(String,String,IProgressMonitor) instead

Invoke a JET transform on the passed String representation of the input model.


execute

public static org.eclipse.core.runtime.IStatus execute(java.lang.String id,
                                                       java.lang.String source,
                                                       java.lang.String kind,
                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated. Use runTransformOnString(String,String,String,Map, IProgressMonitor) instead

Invoke a JET transform on the passed String representation of an input model.

Parameters:
id - the transform id
source - the string respresentation of the input model.
kind - the kind of model (file extension) the string represents.
monitor - a progress monitor
Returns:
the transform's execution status.

getInstalledXPathFunctions

public static XPathFunctionMetaData[] getInstalledXPathFunctions()
Return the XPath functions installed by the 'org.eclipse.jet.xpathFunctions' extension point.

Returns:
an array of functions.

getJETBundleManager

public static IJETBundleManager getJETBundleManager()

getProjectDescription

public static IJETBundleDescriptor getProjectDescription(java.lang.String name)
Return the bundle description for the named JET project

Parameters:
name - an Eclipse project name
Returns:
a bundle description, or null if the project does not exist or is not a JET project.

runTransform

public static org.eclipse.core.runtime.IStatus runTransform(java.lang.String id,
                                                            JET2Context context,
                                                            org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET transform against the passed context

Parameters:
id - the JET Transform id
context - the JET2Context
monitor - a progress monitor
Returns:
the transform's execution status

runTransformOnObject

public static org.eclipse.core.runtime.IStatus runTransformOnObject(java.lang.String id,
                                                                    java.lang.Object source,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Execute a JET transform with the passed object as the root of the source model.

Parameters:
id - the JET Transform id
source - the source model root object.
monitor - a progress monitor
Returns:
the transform's execution status

runTransformOnObject

public static org.eclipse.core.runtime.IStatus runTransformOnObject(java.lang.String id,
                                                                    java.lang.Object source,
                                                                    java.util.Map variables,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Execute a JET transform with the passed object as the root of the source model.

Parameters:
id - the JET Transform id
source - the source model root object.
variables - A Map of variable names and their values. May be null.
monitor - a progress monitor
Returns:
the transform's execution status

runTransformOnResource

public static org.eclipse.core.runtime.IStatus runTransformOnResource(java.lang.String id,
                                                                      org.eclipse.core.resources.IResource resource,
                                                                      org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET Transform on the pass resource, loading the resource using the transform's model loader.

Parameters:
id - the JET Transform id
resource - the Eclipse Resource to load
monitor - a progress monitor
Returns:
the transform's execution status

runTransformOnResource

public static org.eclipse.core.runtime.IStatus runTransformOnResource(java.lang.String id,
                                                                      org.eclipse.core.resources.IResource resource,
                                                                      java.util.Map variables,
                                                                      org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET Transform on the pass resource, loading the resource using the transform's model loader.

Parameters:
id - the JET Transform id
resource - the Eclipse Resource to load
variables - A Map of variable names and their values. May be null.
monitor - a progress monitor
Returns:
the transform's execution status

runTransformOnString

public static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id,
                                                                    java.lang.String source,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET transform on the passed String representation of an XML model.

Parameters:
id - the transform id
source - the XML source, as a string
monitor - a progress monitor
Returns:
the transform execution status.

runTransformOnString

public static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id,
                                                                    java.lang.String source,
                                                                    java.lang.String kind,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET transform on the passed String representation of an input model.

Parameters:
id - the transform id
source - the string respresentation of the input model.
kind - the kind of model (file extension) the string represents.
monitor - a progress monitor
Returns:
the transform's execution status.

runTransformOnString

public static org.eclipse.core.runtime.IStatus runTransformOnString(java.lang.String id,
                                                                    java.lang.String source,
                                                                    java.lang.String kind,
                                                                    java.util.Map variables,
                                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke a JET transform on the passed String representation of an input model.

Parameters:
id - the transform id
source - the string respresentation of the input model.
kind - the kind of model (file extension) the string represents.
variables - A Map of variable names and their values. May be null.
monitor - a progress monitor
Returns:
the transform's execution status.

getModelLoaderManager

public ILoaderManager getModelLoaderManager()
Return the model loader manager.

Returns:
the model loader manager.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.