Element () { Element element = new Element("state"); if (!myMultiLine) { Element m = new Element(ELEMENT_MULTILINE); m.setText(Boolean.FALSE.toString()); element.addContent(m); } TodoPattern[] todoPatterns = myTodoPatterns; if (!Arrays.equals(myTodoPatterns, getDefaultPatterns())) { for (TodoPattern pattern : todoPatterns) { Element child = new Element(ELEMENT_PATTERN); pattern.writeExternal(child); element.addContent(child); } } for (TodoFilter filter : myTodoFilters) { Element child = new Element(ELEMENT_FILTER); filter.writeExternal(child, todoPatterns); element.addContent(child); } return element; }