UML Modeling Layer

com.ibm.xtools.uml.msl.internal.lang
Class LanguageContext

java.lang.Object
  extended by com.ibm.xtools.uml.msl.internal.lang.LanguageContext

public class LanguageContext
extends Object

A structure for containing the language context elements that a specialized descriptor can use to extract a language. Example: In some cases, the semantic object could be defined in one project (P1), but is redefined and being viewed in another project (P2). In this case the root project, P1, may have one defined model language, and the redefining project, P2, may have another. In this case we want to pass the semantic element that will store the code/language as the semanticContext. We want to pass the element's View or redefinition context as the persistedLanguageContext. The persistedLanguageContext parent hierarchy can then be traversed to find the P2 project to use for the persisted language context.


Constructor Summary
LanguageContext(EObject semanticContext, EObject persistedLanguageContext)
          Constructs a new LanguageContext object with both the semantic and persisted language context objects.
 
Method Summary
 EObject getPersistedLanguageContext()
           
 EObject getSemanticContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageContext

public LanguageContext(EObject semanticContext,
                       EObject persistedLanguageContext)
Constructs a new LanguageContext object with both the semantic and persisted language context objects.

Parameters:
semanticContext - The context object to use for extracting the first language or null if there is none.
persistedLanguageContext - The context object to use for extracting the persisted model language or null if there is none.
Method Detail

getPersistedLanguageContext

public EObject getPersistedLanguageContext()
Returns:
the persistedLanguageContext. Note: this could be null

getSemanticContext

public EObject getSemanticContext()
Returns:
the semanticContext. Note: this could be null

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.