Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


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 ()
           
static  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.
static org.eclipse.core.runtime.IStatus toIStatus ( ContextLogEntry logEntry)
          Convert a Context log entry into an IStatus;
 
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 abscence 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.

toIStatus

public static org.eclipse.core.runtime.IStatus toIStatus(
ContextLogEntry logEntry)
Convert a Context log entry into an IStatus;

Parameters:
logEntry - a log entry
Returns:
an IStatus

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 static 
ILoaderManager getModelLoaderManager()
Return the model loader manager.

Returns:
the model loader manager.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire