robotframework / JavalibCore

Base for implementing Java test libraries to be used with Robot Framework
Other
42 stars 25 forks source link

Document setting an AnnotationLibary's introduction #2

Closed ombre42 closed 12 years ago

ombre42 commented 12 years ago

Would be nice to have this in the usage for AnnotationLibrary as it is not that obvious.

@Override
public String getKeywordDocumentation(String keywordName) {
    if (keywordName.equals("__intro__"))
        return "This is the general library documentation."
    return super.getKeywordDocumentation(keywordName);
}
yanne commented 12 years ago

Would you care to create a patch & pull request for this?

ombre42 commented 12 years ago

Yes I will

ombre42 commented 12 years ago

Forked and got wiki via Git, but cannot do pull request as Git does not treat wiki the same as source. Realized the wiki is editable by anyone and just made the change myself.

yanne commented 12 years ago

That's true. Should this be mentioned somewhere in the source too?

ombre42 commented 12 years ago

I looked through the source and don't see where it would fit in. It wouldn't make sense as a unit test. All of the documentation is outside of source. Overriding is easy enough and I don't think AnnotationLibrary needs a setLibraryDocumentation method. I just think it needed to be documented so no one else tries and makes a dummy keyword __intro__ before realizing how to do it right like I did.

yanne commented 12 years ago

Sounds reasonable, thanks for the contribution.