| Summary: | New Plug-in wizard resets the "Generate an activator..." flag | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | UI | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P5 | CC: | atx, curtis.windatt.public, darin.eclipse, k.digeser, kai.mechel, klaus.froehlich, Lars.Vogel, m_momchil, remy.suen, rocco.graenitz, sja.eclipse, soenke.greve, wiesestefan |
| Version: | 3.6 | Keywords: | helpwanted |
| Target Milestone: | 4.3 M3 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Lars Vogel
*** Bug 355374 has been marked as a duplicate of this bug. *** *** Bug 378746 has been marked as a duplicate of this bug. *** *** Bug 278702 has been marked as a duplicate of this bug. *** Looks like every two years I open the same bug... ;-) Sorry for this. The following change should IMHO fix this bug:
PluginContentPage
if (visible) {
fMainPage.updateData();
- fGenerateActivator.setSelection(!fData.isSimple());
fGenerateActivator.setEnabled(!fData.isSimple());
fClassLabel.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection());
fClassText.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection());
@Curtis: Care for a patch?
Your solution ends up setting generator information in the wizard data object which is incorrect. Also I don't think the behaviour of whether the activator should be on or not is quite right. So, with bug 297143 closed, and creating an activator remaining the default, I have a better fix for this. I'll apply it after M2 week. Great to hear that Curtis. But I don't think I modified settings. I just removed this line: fGenerateActivator.setSelection(!fData.isSimple()); and IMHO fGenerateActivator is the UI field. The corresponding method was called whenever the page was displayed hence set the selection again. But if you have a better or different solution that is even better. Looking forward to it. The data object gathered its settings from the UI elements. Your change to leave the selection even if the element was enabled would change what is stored. I'm not saying that the page uses good design :) Fixed in master: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=fe8c42cffd5d1778fef3dcaba4719fab500c188e The activator setting now follows the same basic logic as the 'contribute to UI' checkbox. Turns on by default if you check the 'create a java project' option on the first page. Turns off if the field is disabled. Uses dialog settings otherwise. Verified in I20121030-0800 |