Community
Participate
Working Groups
It would be nice to have something like the execute method in GenerateEntitiesAction be public. Could there be a method added that accepts a project and shell and then launches the Dali wizard? GenerateEntitiesAction.launchWizard(IJpaProject project, Shell shell){} I'm trying to find a good way to launch the wizard programmatically, but it seems most methods are currently protected and requires an IWorkbenchPart to launch.
To follow up on this a bit... If the Dali wizard is launched programmatically then the field "currentSelection" in the class ProjectAction remains null because nothing was selected from the project explorer. This doesn't cause too much of a problem except when there are multiple projects in the workspace. The currentSelection is used to help populate the Source folder field in the Generate Entities from Tables page. IJavaElement jelem= getInitialJavaElement(selection); This line in GenerateEntitiesWizardPage will return null if there are multiple projects in the workspace(it works when there is one because it picks that as a default)which leads to the source field not having a default value. If the user finishes while leaving this field blank (there is currently no validation https://bugs.eclipse.org/bugs/show_bug.cgi?id=184795) then the wizard fails and nothing is generated. It'd be helpful if at some point we were able to pass the project we want to use into the wizard directly.
Moving JPA specific bugs to new JPA component in bugzilla.