store full live template context (in compact form), not the difference from default; otherwise the parts same as in default are not honored

This commit is contained in:
peter
2016-05-23 17:39:03 +02:00
parent 8692887d89
commit b138fda21f
6 changed files with 29 additions and 54 deletions
@@ -575,20 +575,13 @@ class Outer {
def copy = defContext.createCopy()
def write = new Element("context")
copy.writeTemplateContext(write, defContext)
assert write.children.empty
copy.writeTemplateContext(write)
assert write.children.size() == 2 : JDOMUtil.writeElement(write)
copy.putValue(TemplateContextType.EP_NAME.findExtension(JavaCommentContextType), false)
write = new Element("context")
copy.writeTemplateContext(write, defContext)
assert JDOMUtil.writeElement(write) == '''\
<context>
<option name="JAVA_COMMENT" value="false" />
</context>'''
write = new Element("context")
copy.writeTemplateContext(write, null)
copy.writeTemplateContext(write)
assert write.children.size() == 3 : JDOMUtil.writeElement(write)
}