Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NetBeans cant change modifier of a method.

 
Ben Hultin
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I went through the help file about changing the generated code to a public modifier. I went through the refractor process several times, but it wont change the modifier to a public access modifier. Anyone have any ideas why its not responding?

Thanks a lot for the help
 
Ben Hultin
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took a closer look at it says that it is a read only method and can not be refractored... what can I do to change this? I need to create a JUnit test case, but the private access modifier it was given is preventing this.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't you just edit it?
 
Ben Hultin
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish... When using the NetBeans GUI builder, it restricts how you can modify the source code. You have to go through special channels to make adjustments. I guess they do this keep errors down.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you'll have to check to see if the templates it uses can be modified, or change how you're testing it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic