Method: write_wmc_LayerExtension
Add OpenLayers specific layer parameters to an Extension element.

Parameters:
context - {Object} A layer context object.

Returns:
{Element} A WMC Extension element (for a layer).
483385
function(context) {
        var node = this.createElementDefaultNS("Extension");
        
        var bounds = context.maxExtent;
        var maxExtent = this.createElementNS(
            this.namespaces.ol, "ol:maxExtent"
        );
        this.setAttributes(maxExtent, {
            minx: bounds.left.toPrecision(18),
            miny: bounds.bottom.toPrecision(18),
            maxx: bounds.right.toPrecision(18),
            maxy: bounds.top.toPrecision(18)
        });
        node.appendChild(maxExtent);
        
        if (context.tileSize && !context.singleTile) {
            var size = this.createElementNS(
                this.namespaces.ol, "ol:tileSize"
            );
            this.setAttributes(size, context.tileSize);
            node.appendChild(size);
        }
        
        var properties = [
            "transparent", "numZoomLevels", "units", "isBaseLayer",
            "opacity", "displayInLayerSwitcher", "singleTile"
        ];
        var child;
        for(var i=0, len=properties.length; i<len; ++i) {
            child = this.createOLPropertyNode(context, properties[i]);
            if(child) {
                node.appendChild(child);
            }
        }

        return node;
    }
1214124
protected void pushContext(Context c) {
		Stack<Context> stack = threadSafeContextStack.get();
		if (stack == null) {
			stack = new Stack<Context>();
			stack.push(c);
			threadSafeContextStack.set(stack);
		} else {
			threadSafeContextStack.get().push(c);
		}
	}
22196
public boolean addContextToVerb(String objectType, String id, String description)
    {
        Map<String, Object> container = new HashMap<String, Object>();
        
        if (objectType != null)
        {
            container.put("objectType", objectType);
        }
        if (id != null)
        {
            container.put("id", id);
        }
        if (description != null)
        {
            container.put("description", description);
        }
        
        String[] pathKeys = {"verb"};
        return addChild("context", container, pathKeys);
    }
491769
def append(self, context, data):
        
        return ContextStack(self._contexts + [context], self._data + [data])
283327
function do_create_context(context) {
		var context = context || {};
		
		if(!context.replace) {
			context.replace = (function(chunk, context, bodies, params) {
					return chunk.tap(function(data) {
						return (params.from && params.to && (data === params.from) ) ? params.to : data;
					}).render(bodies.block, context).untap();
				});
		}
		
		if(!context.toFixed) {
			context.toFixed = (function(chunk, context, bodies, params) {
					return chunk.tap(function(data) {
						return parseFloat(data).toFixed(params.x || 0);
					}).render(bodies.block, context).untap();
				}); // end of context
		}
		
		return context;
	}
767076
public ELContext setELContext(ELContext context) {
        ELContext prev = elContext;
        elContext = new StandardELContext(context);
        return prev;
    }
1103196
public void setContext(Context context) {
        log = Log.instance(context);
        options = Options.instance(context);
        classLoaderClass = options.get("procloader");
        locations.update(log, options, Lint.instance(context), FSInfo.instance(context));
    }
800115
def add_wf(self,wf_obj):
        
        if self.text_layer is None:
            self.text_layer = Ctext(type=self.type)
            self.root.append(self.text_layer.get_node())
        self.text_layer.add_wf(wf_obj)
229627
private int writeExtensions(
      TypeElement type,
      ExtensionContext context,
      ImmutableList<AutoValueExtension> applicableExtensions) {
    int writtenSoFar = 0;
    for (AutoValueExtension extension : applicableExtensions) {
      String parentFqName = generatedSubclassName(type, writtenSoFar + 1);
      String parentSimpleName = TypeSimplifier.simpleNameOf(parentFqName);
      String classFqName = generatedSubclassName(type, writtenSoFar);
      String classSimpleName = TypeSimplifier.simpleNameOf(classFqName);
      boolean isFinal = (writtenSoFar == 0);
      String source = extension.generateClass(context, classSimpleName, parentSimpleName, isFinal);
      if (source != null) {
        source = Reformatter.fixup(source);
        writeSourceFile(classFqName, source, type);
        writtenSoFar++;
      }
    }
    return writtenSoFar;
  }
887379
function(obj) {
        var context = {};
        if(obj.CLASS_NAME == "OpenLayers.Map") {
            context.bounds = obj.getExtent();
            context.maxExtent = obj.maxExtent;
            context.projection = obj.projection;
            context.size = obj.getSize();
            context.layers = obj.layers;
        }
        return context;
    }
1058503
def update_context(self, ctx):
        
        assert isinstance(ctx, dict)
        ctx[str(self.context_id)] = self.value
183413
public void marshal(Object obj, HierarchicalStreamWriter writer,
			MarshallingContext context) {
		XExtension extension = (XExtension)obj;
		writer.addAttribute("uri", extension.getUri().toString());
	}
517052
function(layerContext, node) {
        var srs    = this.getChildValue(node);
        if (typeof layerContext.projections != "object") {
            layerContext.projections = {};
        }
        var values = srs.split(/ +/);
        for (var i=0, len=values.length; i<len; i++) {
            layerContext.projections[values[i]] = true;
        }
    }
124496
function fixTemplateContext(template, fix) {
    var _template_r = template.r;
    template.r = function(contextStack) {
        var context = contextStack[contextStack.length-1];
        contextStack[contextStack.length-1] = fix(context);
        return _template_r.apply(this,arguments);
    };
}
152114
function context(phase, stage, mode, local) {
        return {phase: phase, stage: stage, mode: mode, local: local};
    }
1363523
public EventBuilder withContexts(Map<String, Map<String, Object>> contexts) {
        event.setContexts(contexts);
        return this;
    }
402750
private void applyPathsDocumentExtension(Context context) {
        extensionRegistry.getPathsDocumentExtensions().forEach(extension -> extension.apply(context));
    }