This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Removing/Deleting method at the time of saving when not used in Eclipse

 
jami siva
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing follwing problem with Eclipse.
When the method is not used in my class then at the time of saving the class Eclipse is automatically deleting that method.
I Know i changed some thing in Window>Preferences>Java tab but I forgot what i changed.
Can Any one help in this.





Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something is wrong. It is not possible to determine that PlattsSheetMain.mOne is not being used, so it shouldn't be deleted.

mOne is defined as package scope, so any other class in the same package as PlattsSheetMain would be able to call it, including code that wasn't in the Eclipse project but was bound to it at runtime. That wouldn't be possible if this method was deleted.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic