Reputation: 257
Is it possible to have a single class over multiple files ?
I have a Database class that extends SQLLiteOpenHelper currently around 3030 lines Everytime I restart eclipse
I get Failed to create the part's controls
java.lang.StringIndexOutOfBoundsException: String index out of range: 51
at java.lang.String.charAt(String.java:658)
at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isSentinel(UserDefinedRegionHelper.java:53)
at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isOpeningSentinel(UserDefinedRegionHelper.java:29)
at com.cb.eclipse.folding.java.calculation.CommentHelper.isUserDefinedSentinel(CommentHelper.java:90)
at com.cb.eclipse.folding.java.calculation.CommentHelper.handle(CommentHelper.java:67)
Thanks in advance
Upvotes: 1
Views: 197
Reputation: 41188
You have two tools here to help you - composition and inheritance.
Look at all the functionality within your monster class and consider what is the best way to separate it out into their a super class or a component class. Look at what will be the best way to allow you to re-use the code in future. What will group similar concepts together, etc.
Upvotes: 1
Reputation: 32391
It sounds like you need to do some re-design. You cannot have one class over multiple files, but you can redesign one class into multiple classes.
Upvotes: 2