Element (@NotNull NamedScope scope) { Element setElement = new Element(SCOPE_TAG); setElement.setAttribute(NAME_ATT, scope.getScopeId()); PackageSet packageSet = scope.getValue(); setElement.setAttribute(PATTERN_ATT, packageSet != null ? packageSet.getText() : ""); return setElement; }