This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 112163 - Problematic code generated by apisupport templates
Summary: Problematic code generated by apisupport templates
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 115962
Blocks:
  Show dependency tree
 
Reported: 2007-08-07 10:38 UTC by Geertjan Wielenga
Modified: 2007-09-19 20:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2007-08-07 10:38:02 UTC
After completing many of our apisupport wizards, the first thing the user sees is that the wizard generated code with a
redundant cast. We should not generate redundant casts. Also, in relation to Cookies vs. Lookup, maybe we need to look
at what is generated by the File Type wizard. Finally, the Options Panel wizard generates comments that include comments
about the deprecated System Option class. 

So, basically, all the code generated by the templates need to be reviewed and corrected for 6.0.
Comment 1 Jesse Glick 2007-08-09 22:20:14 UTC
Will fix redundant casts, missing @Override. I don't see anything wrong in the DataObject template. SystemOption is the
only option (excuse the pun) for code using pre-6 platforms; the first suggestion is to use NbPreferences on NB 6.

WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());

generates an unchecked warning in NB 6 but that cannot be fixed without splitting the code to work also in NB 5, which I
would rather not do; it can be suppressed with one editor hint anyway with no loss of functionality.

Checking in action/DataModel.java;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/action/DataModel.java,v
 <--  DataModel.java
new revision: 1.28; previous revision: 1.27
done
Checking in action/callableSystemAction.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/action/callableSystemAction.javx,v
 <--  callableSystemAction.javx
new revision: 1.7; previous revision: 1.6
done
Checking in action/cookieAction.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/action/cookieAction.javx,v
 <--  cookieAction.javx
new revision: 1.10; previous revision: 1.9
done
Checking in wizard/visualPanel.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/visualPanel.javx,v
 <--  visualPanel.javx
new revision: 1.4; previous revision: 1.3
done
Checking in wizard/sampleAction.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/sampleAction.javx,v
 <--  sampleAction.javx
new revision: 1.3; previous revision: 1.2
done
Checking in project/templatePanelVisual.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/project/templatePanelVisual.javx,v
 <--  templatePanelVisual.javx
new revision: 1.13; previous revision: 1.12
done
Checking in project/templateWizardPanel.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/project/templateWizardPanel.javx,v
 <--  templateWizardPanel.javx
new revision: 1.8; previous revision: 1.7
done
Checking in project/templateWizardIterator.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/project/templateWizardIterator.javx,v
 <--  templateWizardIterator.javx
new revision: 1.15; previous revision: 1.14
done
Checking in loader/templateDataObject.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/templateDataObject.javx,v
 <--  templateDataObject.javx
new revision: 1.4; previous revision: 1.3
done
Checking in loader/templateDataLoaderBeanInfo.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/templateDataLoaderBeanInfo.javx,v
 <--  templateDataLoaderBeanInfo.javx
new revision: 1.4; previous revision: 1.3
done
Checking in loader/templateDataLoader.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/templateDataLoader.javx,v
 <--  templateDataLoader.javx
new revision: 1.3; previous revision: 1.2
done
Checking in loader/templateDataNode.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/loader/templateDataNode.javx,v
 <--  templateDataNode.javx
new revision: 1.6; previous revision: 1.5
done
Checking in winsys/templateTopComponent.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/templateTopComponent.javx,v
 <--  templateTopComponent.javx
new revision: 1.17; previous revision: 1.16
done
Checking in moduleinstall/moduleInstall.javx;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/wizard/moduleinstall/moduleInstall.javx,v
 <--  moduleInstall.javx
new revision: 1.2; previous revision: 1.1
done