de.cau.cs.kieler.kies.scoping
Class EsterelScopeProviderUtil

java.lang.Object
  extended by de.cau.cs.kieler.kies.scoping.EsterelScopeProviderUtil

public final class EsterelScopeProviderUtil
extends Object

Supplies some convenient methods for scoping of the esterel grammar.

Rating red

Field Summary
protected static ScopeFunction<Module> COLLECT_CONSTANTS
          collecting all constants of a passed module.
protected static ScopeFunction<Module> COLLECT_FUNCTIONS
          collecting all functions of a passed module.
protected static ScopeFunction<Module> COLLECT_PROCEDURES
          collecting all procedures of a passed module.
protected static ScopeFunction<Module> COLLECT_SENSORS
          collecting all sensors of a passed module.
protected static ScopeFunction<Module> COLLECT_SIGNALS
          collecting all signals of a passed module.
protected static ScopeFunction<Module> COLLECT_TASKS
          collecting all tasks of a passed module.
protected static ScopeFunction<Module> COLLECT_TYPES
          collecting all types of a passed module.
 
Method Summary
static List<org.eclipse.xtext.resource.IEObjectDescription> getAllElements(EObject context, ScopeFunction<Module> function)
          Gets all elements collected by the passed function within the context's scope up to its parent module and all other modules withing the .strl file!
static List<org.eclipse.xtext.resource.IEObjectDescription> getAllSignals(EObject context)
          Collects all Signals of the current module (including local signals) and all other modules.
static List<org.eclipse.xtext.resource.IEObjectDescription> getElements(EObject context, ScopeFunction<Module> function)
          Gets all elements collected by the passed function within the context's scope up to its parent module.
static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalSignals(EObject context)
          collect all local signals of the context up to its parent module.
static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalTraps(EObject context)
          collect all local traps of the context up to its parent module.
static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalVariables(EObject context)
          collect all local variables of the context up to its parent module.
static List<org.eclipse.xtext.resource.IEObjectDescription> getModules(EObject context)
          collect all modules of the current esterel file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECT_SENSORS

protected static final ScopeFunction<Module> COLLECT_SENSORS
collecting all sensors of a passed module.


COLLECT_CONSTANTS

protected static final ScopeFunction<Module> COLLECT_CONSTANTS
collecting all constants of a passed module.


COLLECT_FUNCTIONS

protected static final ScopeFunction<Module> COLLECT_FUNCTIONS
collecting all functions of a passed module.


COLLECT_PROCEDURES

protected static final ScopeFunction<Module> COLLECT_PROCEDURES
collecting all procedures of a passed module.


COLLECT_SIGNALS

protected static final ScopeFunction<Module> COLLECT_SIGNALS
collecting all signals of a passed module.


COLLECT_TYPES

protected static final ScopeFunction<Module> COLLECT_TYPES
collecting all types of a passed module.


COLLECT_TASKS

protected static final ScopeFunction<Module> COLLECT_TASKS
collecting all tasks of a passed module.

Method Detail

getAllSignals

public static List<org.eclipse.xtext.resource.IEObjectDescription> getAllSignals(EObject context)
Collects all Signals of the current module (including local signals) and all other modules.

Parameters:
context - context
Returns:
list with the new scope elements.

getElements

public static List<org.eclipse.xtext.resource.IEObjectDescription> getElements(EObject context,
                                                                               ScopeFunction<Module> function)
Gets all elements collected by the passed function within the context's scope up to its parent module.

Parameters:
context - context
function - function collecting scope elements
Returns:
list with the according scope elements.

getAllElements

public static List<org.eclipse.xtext.resource.IEObjectDescription> getAllElements(EObject context,
                                                                                  ScopeFunction<Module> function)
Gets all elements collected by the passed function within the context's scope up to its parent module and all other modules withing the .strl file!

Parameters:
context - context
function - function collecting scope elements
Returns:
list with the according scope elements.n

getLocalSignals

public static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalSignals(EObject context)
collect all local signals of the context up to its parent module.

Parameters:
context - context
Returns:
list with scope elements

getLocalVariables

public static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalVariables(EObject context)
collect all local variables of the context up to its parent module.

Parameters:
context - context
Returns:
list with scope elements

getLocalTraps

public static List<org.eclipse.xtext.resource.IEObjectDescription> getLocalTraps(EObject context)
collect all local traps of the context up to its parent module.

Parameters:
context - context
Returns:
list with scope elements

getModules

public static List<org.eclipse.xtext.resource.IEObjectDescription> getModules(EObject context)
collect all modules of the current esterel file.

Parameters:
context - context
Returns:
list with scope elements