org.eclipse.ohf.stem.ui
Class Utility

java.lang.Object
  extended by org.eclipse.ohf.stem.ui.Utility

public class Utility
extends java.lang.Object

This class contains common utility methods used in the STEM UI.


Constructor Summary
Utility()
           
 
Method Summary
static Identifiable getIdentifiable(org.eclipse.core.resources.IFile file)
           
static Identifiable getIdentifiable(org.eclipse.emf.common.util.URI identifableURI)
           
static java.util.List<org.eclipse.core.resources.IProject> getSTEMProjectsFromWorkspace()
           
static java.util.List<org.eclipse.core.resources.IProject> getSTEMProjectsFromWorkspace(org.eclipse.core.resources.IWorkspace workspace)
           
static boolean isSTEMProject(org.eclipse.core.resources.IProject project)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

getSTEMProjectsFromWorkspace

public static java.util.List<org.eclipse.core.resources.IProject> getSTEMProjectsFromWorkspace()
Returns:
a List of the projects in the workspace that have STEM Project "nature"
See Also:
Constants.ID_STEM_PROJECT_NATURE

getSTEMProjectsFromWorkspace

public static java.util.List<org.eclipse.core.resources.IProject> getSTEMProjectsFromWorkspace(org.eclipse.core.resources.IWorkspace workspace)
Parameters:
workspace - the workspace to search for STEM Projects
Returns:
a List of the projects in the workspace that have STEM Project "nature"
See Also:
Constants.ID_STEM_PROJECT_NATURE

isSTEMProject

public static boolean isSTEMProject(org.eclipse.core.resources.IProject project)
Parameters:
project - an Eclipse project
Returns:
true if the project has STEM project nature
See Also:
Constants.ID_STEM_PROJECT_NATURE

getIdentifiable

public static Identifiable getIdentifiable(org.eclipse.core.resources.IFile file)
Parameters:
file - a file with an Identifiable
Returns:
the Identifiable deserialized from the file, or null if an error occured.

getIdentifiable

public static Identifiable getIdentifiable(org.eclipse.emf.common.util.URI identifableURI)
Parameters:
identifableURI - the URI of file with a serilized Identifable.
Returns:
the Identifiable deserialized from the file, or null if an error occured.