[216172] cdamus - Nesting OCL Environments and adding variables
diff --git a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/helper/OCLHelper.java b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/helper/OCLHelper.java
index a29f2a0..c4979f7 100644
--- a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/helper/OCLHelper.java
+++ b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/helper/OCLHelper.java
@@ -12,7 +12,7 @@
  *
  * </copyright>
  *
- * $Id: OCLHelper.java,v 1.4 2008/01/03 15:17:55 cdamus Exp $
+ * $Id: OCLHelper.java,v 1.5 2008/04/17 19:38:15 cdamus Exp $
  */
 
 package org.eclipse.ocl.helper;
@@ -175,6 +175,25 @@
      */
     OCL<?, C, O, P, ?, ?, ?, ?, ?, CT, ?, ?> getOCL();
     
+    /**
+     * Obtains the environment defining my current
+     * {@linkplain #getContextClassifier() classifier},
+     * {@linkplain #getContextOperation() operation}, or
+     * {@linkplain #getContextAttribute() attribute} context.  Accessing the
+     * environment is convenient for, e.g., adding variable definitions to
+     * insert global objects into the OCL context.
+     * 
+     * @return my current context environment, or <code>null</code> if I have
+     *    not yet been assigned a context
+     * 
+     * @see #setContext(Object)
+     * @see #setOperationContext(Object, Object)
+     * @see #setAttributeContext(Object, Object)
+     * 
+     * @since 1.2
+     */
+    Environment<?, C, O, P, ?, ?, ?, ?, ?, CT, ?, ?> getEnvironment();
+    
 	/**
 	 * Queries whether I validate the expressions that I parse.  Validation
 	 * applies more well-formedness checks than are implied by parsing, especially
diff --git a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/helper/OCLHelperImpl.java b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/helper/OCLHelperImpl.java
index 81acf3b..a2c16e6 100644
--- a/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/helper/OCLHelperImpl.java
+++ b/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/helper/OCLHelperImpl.java
@@ -12,7 +12,7 @@
  *
  * </copyright>
  *
- * $Id: OCLHelperImpl.java,v 1.5 2008/01/03 15:17:55 cdamus Exp $
+ * $Id: OCLHelperImpl.java,v 1.6 2008/04/17 19:38:15 cdamus Exp $
  */
 
 package org.eclipse.ocl.internal.helper;
@@ -73,7 +73,7 @@
 		environmentFactory = ocl.getEnvironment().getFactory();
 	}
 	
-	protected Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E>
+	public Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E>
 	getEnvironment() {
 		return env == null? ocl.getEnvironment() : env;
 	}