Factor out logic from Dialog? [message #1712275] |
Thu, 22 October 2015 15:11 |
|
I'm implementing a custom dialog for selecting workspaces in an RCP application (extends TitleAreaDialog).
The implementation is pretty straightforward, albeit, it includes some "logic". This is mainly (if you can call this logic at all?!?) reading from java.util.prefs.Preferences, knocking together String[] from these preferences to display in a combo box, a bit of file permissions checking, writing to Preferences.
Generally I'd like to keep my code clean, so was thinking about factoring out some of the afore-mentioned "logic". However, I'm unsure as to whether the refactoring would be worth it, especially since I'd probably just write all the procedural stuff into a util class, itself to be avoided.
The class itself is ~380 LOC, so not too big to be understandable.
Could I have some opinions on whether a refactoring would make sense, or even better, best practices/examples of how this could be done (avoiding a util class in the process)?
Many thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.02878 seconds