@Override protected String buildFunctionsText(HaxeNamedComponent namedComponent) { if (!(namedComponent instanceof HaxeVarDeclarationPart)) { return ""; } final String typeText = HaxePresentableUtil.buildTypeText( namedComponent, ((HaxeVarDeclarationPart) namedComponent).getTypeTag()); final StringBuilder result = new StringBuilder(); if (myStratagy == Strategy.GETTER || myStratagy == Strategy.GETTERSETTER) { buildGetter(result, namedComponent.getName(), typeText); } if (myStratagy == Strategy.SETTER || myStratagy == Strategy.GETTERSETTER) { buildSetter(result, namedComponent.getName(), typeText); } return result.toString(); }
@Override protected void modifyElement(HaxeNamedComponent namedComponent) { if (!(namedComponent instanceof HaxeVarDeclarationPart)) { return; } if (((HaxeVarDeclarationPart) namedComponent).getPropertyDeclaration() != null) { // todo: modify return; } final HaxeVarDeclarationPart declarationPart = HaxeElementGenerator.createVarDeclarationPart( namedComponent.getProject(), buildVarDeclaration(namedComponent.getName())); final HaxePropertyDeclaration propertyDeclaration = declarationPart.getPropertyDeclaration(); if (propertyDeclaration != null) { namedComponent.addAfter(propertyDeclaration, namedComponent.getComponentName()); } }