|
OCL | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.editors.ocleditor.utils.OCLRuleUtil
public class OCLRuleUtil
A class with useful methods
Constructor Summary | |
---|---|
OCLRuleUtil()
|
Method Summary | |
---|---|
static EClassifier |
computeContextClassifier(org.eclipse.jface.text.IDocument document,
EPackage modelPackage,
org.eclipse.jface.text.ITypedRegion region,
org.eclipse.jface.text.ITypedRegion packageRegion)
Computes the context of the given region in the document |
static ETypedElement |
computeTypedContext(org.eclipse.jface.text.IDocument document,
EPackage modelPackage,
org.eclipse.jface.text.ITypedRegion region,
org.eclipse.jface.text.ITypedRegion packageRegion)
|
static org.eclipse.ocl.ecore.Constraint |
createConstraint(org.eclipse.jface.text.ITypedRegion region,
org.eclipse.jface.text.Document oclDocument,
org.eclipse.ocl.helper.OCLHelper<EClassifier,EOperation,EStructuralFeature,org.eclipse.ocl.ecore.Constraint> oclHelper)
Create the typed constraint for the identified region |
static EPackage |
findMetamodelPackage(URI mmUri)
|
static EPackage |
findSubPackage(EPackage currentPackage,
java.util.List<java.lang.String> packagePrefixes)
|
static java.lang.String |
getESuperPackage(java.lang.String mmUri)
Gets the highest package from a meta model |
static EObject |
loadModel(org.eclipse.core.resources.IFile file)
Uses the read service to read a model. |
static java.util.List<org.eclipse.ocl.Query<EClassifier,EClass,EObject>> |
loadRulesFromText(java.lang.String text,
EObject model,
EClassifier ruleType)
Reads, extracts and returns the list of rules found in the text file. |
static void |
registerMetaModel(EObject model)
Register the meta model if it has not been registered before. |
static EList<Resource> |
registerResolvedResources(EObject model)
Tries to resolve all resources |
static java.lang.String |
subModelsClauses()
Gives the 'subModels' clause. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCLRuleUtil()
Method Detail |
---|
public static org.eclipse.ocl.ecore.Constraint createConstraint(org.eclipse.jface.text.ITypedRegion region, org.eclipse.jface.text.Document oclDocument, org.eclipse.ocl.helper.OCLHelper<EClassifier,EOperation,EStructuralFeature,org.eclipse.ocl.ecore.Constraint> oclHelper) throws org.eclipse.ocl.ParserException
region
- : the identified regionoclDocument
- : the document partitionned in regionoclHelper
- : the helper which has the context set
org.eclipse.ocl.ParserException
public static java.util.List<org.eclipse.ocl.Query<EClassifier,EClass,EObject>> loadRulesFromText(java.lang.String text, EObject model, EClassifier ruleType)
text
- model
-
public static EObject loadModel(org.eclipse.core.resources.IFile file)
file
-
public static EClassifier computeContextClassifier(org.eclipse.jface.text.IDocument document, EPackage modelPackage, org.eclipse.jface.text.ITypedRegion region, org.eclipse.jface.text.ITypedRegion packageRegion)
document
- modelPackage
- region
-
public static ETypedElement computeTypedContext(org.eclipse.jface.text.IDocument document, EPackage modelPackage, org.eclipse.jface.text.ITypedRegion region, org.eclipse.jface.text.ITypedRegion packageRegion)
public static EPackage findMetamodelPackage(URI mmUri)
public static void registerMetaModel(EObject model)
model
- public static java.lang.String getESuperPackage(java.lang.String mmUri)
mmUri
-
public static EPackage findSubPackage(EPackage currentPackage, java.util.List<java.lang.String> packagePrefixes)
currentPackage
- packagePrefixes
-
public static EList<Resource> registerResolvedResources(EObject model)
model
-
public static java.lang.String subModelsClauses()
|
OCL | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.