2003/06/16 08:03:15
[org.ibex.core.git] / src / org / xwt / js / ScopeImpl.java
index 10788fd..ecb9b91 100644 (file)
@@ -11,9 +11,9 @@ class ScopeImpl extends JS.Obj {
     private static Object NULL = new Object();
     public ScopeImpl(JS.Scope parentScope) { this(parentScope, false); }
     public ScopeImpl(JS.Scope parentScope, boolean sealed) {
-       super(sealed);
-       if (parentScope == this) throw new Error("can't make a scope its own parent!");
-       this.parentScope = parentScope;
+        super(sealed);
+        if (parentScope == this) throw new Error("can't make a scope its own parent!");
+        this.parentScope = parentScope;
     }
     public JS.Scope getParentScope() { return parentScope; }
     
@@ -22,16 +22,16 @@ class ScopeImpl extends JS.Obj {
     
     public boolean has(Object key) { return super.get(key) != null; }
     public Object get(Object key) {
-       if (!has(key)) return parentScope == null ? null : getParentScope().get(key);
-       Object ret = super.get(key); return ret == NULL ? null : ret;
+        if (!has(key)) return parentScope == null ? null : getParentScope().get(key);
+        Object ret = super.get(key); return ret == NULL ? null : ret;
     }
     public void put(Object key, Object val) {
-       if (!has(key) && parentScope != null) getParentScope().put(key, val);
-       else super.put(key, val == null ? NULL : val);
+        if (!has(key) && parentScope != null) getParentScope().put(key, val);
+        else super.put(key, val == null ? NULL : val);
     }
     public Object[] keys() { throw new Error("you can't enumerate the properties of a Scope"); }
     public void declare(String s) {
-       if (isTransparent()) getParentScope().declare(s);
-       else super.put(s, NULL);
+        if (isTransparent()) getParentScope().declare(s);
+        else super.put(s, NULL);
     }
 }