You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Peter Steele <st...@gmail.com> on 2019/01/07 10:10:59 UTC

Strangeness with auto encapsupation

Hi

When using the Refactor - Encapsulate menu item I get two different
behaviours depending on what I do.

1)

Action : select the whole text of the field you want to encapsulate, select
the encapsulate option and select get / set or both (doesn't matter)

Result : the get / set or both methods are generated at the very top of the
class

2)

Action : place the cursor caret in the text of the field you want to
encapsulate, select the encapsulate option and select get / set or both
(doesn't matter)

Result : the get / set or both methods are generated at the very bottom of
the class

Is there a reason for there being a difference?

Regards

Peter