com.ibm.carma.ui
Class CarmaUtil

java.lang.Object
  extended by com.ibm.carma.ui.CarmaUtil

public class CarmaUtil
extends java.lang.Object

Utility class for going back and forth between CARMAResource object and IAdaptable objects of other types. Also has utility methods for storing and retrieving CARMAResource mappings.


Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
CarmaUtil()
           
 
Method Summary
static CARMAResource getCarmaResource(org.eclipse.core.resources.IResource resource)
          Deprecated. Migrated to ResourceUtils.getCarmaResource(Object) using adapters
static java.util.Map getCarmaResourceInfo(org.eclipse.core.resources.IResource resource)
          Deprecated. This has been migrated to the internal.adapter.ResourceAdapterFactory adaptation framework and the ICARMAResourceReference adaptation pattern
static CarmaPreferenceStore getPreferenceStore()
          Retrieves the CARMA preference store
static void storeInformation(org.eclipse.core.resources.IResource resource, CARMAResource cResource)
          Deprecated. Migrated to the internal.adapter.ResourceAdapterFactory adaptation framework and the ICARMAResourceReference adaptation pattern. Calls to this method should be replaced by ResourceUtils.storeMapping(pm, resource, cResource)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

CarmaUtil

public CarmaUtil()
Method Detail

getPreferenceStore

public static CarmaPreferenceStore getPreferenceStore()
Retrieves the CARMA preference store

Returns:
CARMA preference helper instance

getCarmaResourceInfo

@Deprecated
public static java.util.Map getCarmaResourceInfo(org.eclipse.core.resources.IResource resource)
                                          throws org.eclipse.core.runtime.CoreException
Deprecated. This has been migrated to the internal.adapter.ResourceAdapterFactory adaptation framework and the ICARMAResourceReference adaptation pattern

All of the values are either Strings or null.

Parameters:
resource - resource to find the association information for
Returns:
a Map with the following keys
Throws:
org.eclipse.core.runtime.CoreException - if
  • This resource does not exist.
  • This resource is not local.
  • This resource is a project that is not open.

getCarmaResource

@Deprecated
public static CARMAResource getCarmaResource(org.eclipse.core.resources.IResource resource)
                                      throws org.eclipse.core.runtime.CoreException,
                                             NotSynchronizedException
Deprecated. Migrated to ResourceUtils.getCarmaResource(Object) using adapters

Returns the CARMAResource associated with the given IResource

Parameters:
resource - IResource to find the associated CARMA resource for
Returns:
the corresponding CARMAResource or null if it cannot be found
Throws:
org.eclipse.core.runtime.CoreException - if
  • The resource does not exist
  • This resource is not local.
  • This resource is a project that is not open.
  • The resource does not have the associated information
NotSynchornizedException - if the model needs to be refreshed
NotSynchronizedException

storeInformation

@Deprecated
public static void storeInformation(org.eclipse.core.resources.IResource resource,
                                               CARMAResource cResource)
                             throws org.eclipse.core.runtime.CoreException
Deprecated. Migrated to the internal.adapter.ResourceAdapterFactory adaptation framework and the ICARMAResourceReference adaptation pattern. Calls to this method should be replaced by ResourceUtils.storeMapping(pm, resource, cResource)

This will store the appropriate meta information mapping cResource to resource.

Parameters:
resource - The IResource corresponding to cResource
cResource - The CARMAResource corresponding to resource
Throws:
org.eclipse.core.runtime.CoreException - if the types don't match correctly (container to file, etc), or if the IResource doesn't exist