com.ibm.jps.util
Class RSMResource

java.lang.Object
  extended by com.ibm.jps.util.RSMResource

public class RSMResource
extends java.lang.Object

Contains utilities to manipulate Eclipse resources.


Constructor Summary
RSMResource()
           
 
Method Summary
static org.eclipse.core.resources.IMarker addMarker(org.eclipse.core.resources.IResource onRsrc, java.lang.String description, int severity)
          Adds a new marker for the specified resource
static org.eclipse.core.runtime.IConfigurationElement findConfigElement(org.eclipse.core.runtime.IExtension inExt, java.lang.String inConfigElementName)
          Returns the configuration element with the specified name in the specified extension
static org.eclipse.core.runtime.IExtension findExtension(java.lang.String inExtensionPointName, java.lang.String inExtensionId)
          Retrieves the extension registered in this platform for the given extension point and id
static java.lang.String getId(org.eclipse.emf.ecore.EObject inEObject)
          Returns the unique ID of the input ecore object
static org.eclipse.core.resources.IProject getProject(org.eclipse.uml2.uml.NamedElement elt)
          Retrieves the Eclipse project containing the model of the specified NamedElement
static org.eclipse.core.resources.IProject getProject(java.lang.String projectName)
          Retrieves the Eclipse project corresponding to the specified project name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSMResource

public RSMResource()
Method Detail

addMarker

public static org.eclipse.core.resources.IMarker addMarker(org.eclipse.core.resources.IResource onRsrc,
                                                           java.lang.String description,
                                                           int severity)
Adds a new marker for the specified resource

Parameters:
onRsrc - The resource the marker will be added to
description - The text associated with the marker
severity - The severity of the marker (e.g. IMarker.SEVERITY_ERROR)
Returns:
The newly created marker or null

findConfigElement

public static org.eclipse.core.runtime.IConfigurationElement findConfigElement(org.eclipse.core.runtime.IExtension inExt,
                                                                               java.lang.String inConfigElementName)
Returns the configuration element with the specified name in the specified extension

Parameters:
inExt - The extension to search
inConfigElementName - The name of the configuration element
Returns:
The found configuration element or null

findExtension

public static org.eclipse.core.runtime.IExtension findExtension(java.lang.String inExtensionPointName,
                                                                java.lang.String inExtensionId)
Retrieves the extension registered in this platform for the given extension point and id

Parameters:
inExtensionPointName - The name of the extension point
inExtensionId - The ID of the extension
Returns:
The found extension or null

getId

public static java.lang.String getId(org.eclipse.emf.ecore.EObject inEObject)
Returns the unique ID of the input ecore object

Parameters:
inEObject - The ecore object
Returns:
The unique ID of the ecore object

getProject

public static org.eclipse.core.resources.IProject getProject(org.eclipse.uml2.uml.NamedElement elt)
Retrieves the Eclipse project containing the model of the specified NamedElement

Parameters:
elt - The NamedElement
Returns:
The project containing the model of the NamedElement

getProject

public static org.eclipse.core.resources.IProject getProject(java.lang.String projectName)
Retrieves the Eclipse project corresponding to the specified project name

Parameters:
projectName - The name of the Eclipse project
Returns:
The Eclipse project or null