Bug 210877

Summary: [refactoring] PluginVersionPart needs refactoring
Product: [Eclipse Project] PDE Reporter: Chris Aniszczyk <caniszczyk>
Component: UIAssignee: Les Jones <lesojones>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: baumanbr, lesojones
Version: 3.4Keywords: bugday
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Chris Aniszczyk CLA 2007-11-25 19:15:05 EST
PluginVersionPart and DependencyPropertiesDialog are in need of a rewrite. Right now, they are written in a very non-object oriented way and are very hard to extend. PluginVersionPart should be refactored out into an AbstractVersionPart and have at least three extenders, PluginVersionPart, PackageVersionPart, FragmentVersionPart. A lot of the logic in DependencyPropertiesDialog should belong in the parts as they construct themselves... too much "business logic" in the dialog currently.
Comment 1 Les Jones CLA 2008-01-10 04:03:13 EST
Chris,

Quick query - I can certainly see why this needs doing, but why Plugin/Package/Fragment -VersionPart? From the quick skim I've done, it would appear that three candidate concrete classes could be Plugin/PackageImport/PackageExport -VersionPart. I'm not sure I can see how fragments would be involved?

Am I missing something obvious?
Comment 2 Les Jones CLA 2008-01-10 05:10:31 EST
I was... and I've now found it :-)
Comment 3 Les Jones CLA 2008-01-10 06:48:38 EST
Seems to me from the quick look I've had that there should be a new VersionPart class containing the min/max (or single value) fields, which can be used in all the relevant scenarios, but which doesn't need to be subclassed. This can be used directly by FragmentContentPage and indirectly by the DependencyPropertiesDialog. There should also remain the  Plugin/PackageImport/PackageExport -VersionPart classes (with a common base class). These will taking some of the logic away from the DependencyPropertiesDialog as well as using the VersionPart class if required.

Doing this should simplify the classes quite a lot, as well as allowing the new VersionPart to become ever more consumable - e.g. as part of FragmentGeneralInfoSection.
Comment 4 Chris Aniszczyk CLA 2008-01-10 14:44:44 EST
That sounds pretty much what I had in mind Les. As currently, things are messy and there's too much logic in the dependency dialog :)
Comment 5 Chris Aniszczyk CLA 2008-01-10 14:45:01 EST
btw, lmk if you want this one :)
Comment 6 Les Jones CLA 2008-01-11 04:06:11 EST
Yup, you can assign it to me. It probably won't be resolved in the next few days though.
Comment 7 Brian Bauman CLA 2008-01-11 12:21:08 EST
> Yup, you can assign it to me. It probably won't be resolved in the next few
> days though.

Not to worry, we aren't in a rush :) 

Comment 8 Les Jones CLA 2008-01-11 14:29:32 EST
Probably a good job with this beast ;-)
Comment 9 Eclipse Webmaster CLA 2019-09-06 16:13:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 10 Julian Honnen CLA 2019-09-09 02:42:35 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.