@Override public void updateDeclaration(SNode decl, ClassInfo ci) { if (ImportOptions.getInstance().isNeedUpdateDeclarations()) { String name = this.myNamesMap.getNameForClass(ci.getDeclarationClass()); if ((isEmpty_ixz87t_a0a0b0a0n9(SPropertyOperations.getString(decl, "name"))) || neq_ixz87t_a0a1a0a31j(SPropertyOperations.getString(decl, "name"), name)) { SPropertyOperations.set(decl, "name", name); System.out.format( "Declaration %s name has been set to %s.\n", ci.getDeclarationClass().getName(), name); } if (isEmpty_ixz87t_a0c0a0n9(SPropertyOperations.getString(decl, "classname"))) { SPropertyOperations.set(decl, "classname", ci.getDeclarationClass().getName()); } if (SPropertyOperations.getBoolean(decl, "abstract") != ci.isAbstract()) { System.out.format( "Declaration %s abstract proprety has been set to %b.\n", ci.getDeclarationClass().getName(), ci.isAbstract()); SPropertyOperations.set(decl, "abstract", "" + (ci.isAbstract())); } if (SPropertyOperations.getBoolean(decl, "canHaveInternalText") != ci.canHaveInternalText()) { System.out.format( "Declaration %s can have internal name proprety has been set to %b.\n", ci.getDeclarationClass().getName(), ci.canHaveInternalText()); SPropertyOperations.set(decl, "canHaveInternalText", "" + (ci.canHaveInternalText())); } if (!(SPropertyOperations.getBoolean(decl, "depracated")) && ci.isDeprecated()) { SPropertyOperations.set(decl, "depracated", "" + (ci.isDeprecated())); System.out.format( "Declaration %s has been set deprecated.\n", ci.getDeclarationClass().getName()); } } }
@Override public void addAttribute(SNode declaration, final ClassInfo.MyAttribute attribute) { SNode node = ListSequence.fromList(SLinkOperations.getTargets(declaration, "attributesDecl", true)) .where( new IWhereFilter<SNode>() { public boolean accept(SNode it) { return eq_ixz87t_a0a0a0a0a0a0a0g9( SPropertyOperations.getString(it, "name"), attribute.getName()); } }) .first(); if ((node == null)) { createAttribute(declaration, attribute); } else if (ImportOptions.getInstance().isNeedUpdateAttributes()) { this.updateAttribute(node, attribute); } }