Community
Participate
Working Groups
I am using org.eclipse.jdt.ui.wizards.NewTypeWizardPage as a base for a wizard for creating java-like types. I use some of nice controls like the SuperClassControls but I would like to change the left label text to something more descriptive for my use case. Unfortunately, I can't currently do this as all NewTypeWizardPage controls are private and no accessor methods for labels are available. Trivial public accessor methods that allow me to change the labels would be nice!!
The API is froozen for 3.1. This has to wait > 3.1
maybe you can add some extra description on top of the control?
(In reply to comment #1) > The API is froozen for 3.1. This has to wait > 3.1 Is it far to late or can it somehow still make it into 3.0 ? It should take 5 minutes to add some access methods. Also, adding a few getters shouldn't possibly be able to "break" any existing code (not counting for wird reflection stuff).
(In reply to comment #3) > Is it far to late or can it somehow still make it into 3.0 ? Correction: ... into 3.1 (indeed too late for 3.0 :-))
At the current stage we are API frozen, and API can only be added by PMC approval. As a workaround you can override the createXYControls methods and create the controls yourself. Also create the getXY/setXY method where the values of your widgets are accessed. Note that accesses can also happen before the controls are created. The drawback of doing that for the super class fields is that you would loose the code assist functionality. Therefore, as I suggested why not just add an extra description label over or below the super class control?
Has this been fixed in 3.2?
No, this in not yet implemented. As asked in comment 5, what about just adding an extra description label over or below the super class control? Or is the current term 'superclass' wrong in your context?
I am using the wizard to generate code generation templates files for a special java-like languages. The Wizard does almost everything I need, although the meaning of the different settings changes slightly. This makes the current labels somewhat misleading in my case....And I don't like having to include text above the control essentially saying "please disregard the text below .. it really means ...". Could you please make the label controls protected or provide an accessor method ?
I can do that. But all errors and warnings will still talk about super classes. The dialog that shows up on browse will also be titeled 'Super Class Selection'. I don't want to make that customize that as well. Can you still use the new API to customize the labels then?
(In reply to comment #9) > I can do that. But all errors and warnings will still talk about super classes. > The dialog that shows up on browse will also be titeled 'Super Class > Selection'. > > I don't want to make that customize that as well. Can you still use the new API > to customize the labels then? Thanks for the warning about "super class" showing up in errors, warnings and the dialog too. Did not notice that. Hmmm, don't know what to do then. The NewTypeWizardPage is really good and I would prefer to use it as it will take quite some time to duplicate the functionality just in order to change "super class" to "super template" everywhere (also I don't want to maintain a copy if I can avoid it). On the other hand, the term "super class" is really misleading in my case. I do understand and respect that we can't have everything change just to allow my kind of customization. On ther other hand, small - however incomplete - changes like making the labels protected could be a start (and provide me with some choice in the matter). Question: I has been some time since I looked at the source, but isn't there some virtual methods I can override in order to change the dialog which will pop up? Maybe I can get what I need by overriding a few methods in addition to changing the labels ?
I could make the method protected that open the dialog. The original idea of the design was more that you don't use createSuperClassControls but have your own method that created label, textfield and browse button. By overriding 'getSuperClass' to access your controls you will be able to use validation and creation.
>I could make the method protected that open the dialog. Great, sounds like a plan! >The original idea of the design was more that you don't use >createSuperClassControls but have your own method that created label, textfield >and browse button. By overriding 'getSuperClass' to access your controls you >will be able to use validation and creation. I can't remember the details, but as far as I remember, if I don't use createSuperClassControls, I would have to do a lot of work to recreate your advanced functionality like completion etc. Right?
Rebuilding the code assist is also not that much work anymore in 3.2. However, there are now overridable methods that return the labels and also the choose APIs that open the selection dialogs are now overridable. released > 20060119
Great, I look forward to try it out in M6! Thanks and thanks again! BTW: What do you mean by the interesting comment "Rebuilding the code assist is also not that much work anymore in 3.2". Any fancy new features that I do not know about ? :-)
There's new JFace API to add code assist to text fields.