mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user