Community
Participate
Working Groups
Build Identifier: Version: 2.3.4.v201104192310-7N7UF77FD3wTgcVbmmf0cT Build id: 20100915173744 org.eclipse.jpt.ui.internal.wizards.JpaFacetActionPage.setUpRuntimeListener()throws a class cast exception due to its cast to ModifyFacetedProjectWizard. IWizardPage.getWizard() should check for instanceof before making a cast. In our scenario this wizard page is not in the ModifyFacetedProjectWizard. Ideally you would get this property out of the datamodel using code like this: wc = (IFacetedProjectWorkingCopy) getDataModel().getProperty( IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY); if (wc != null) { // must do it manually the first time model.setProperty(RUNTIME, wc.getPrimaryRuntime()); runtimeListener = new IFacetedProjectListener() { public void handleEvent(final IFacetedProjectEvent event) { model.setProperty(RUNTIME, wc.getPrimaryRuntime()); } }; wc.addListener(runtimeListener, IFacetedProjectEvent.Type.PRIMARY_RUNTIME_CHANGED); } The working copy is in the datamodel and it would avoid the class cast issue when run in a wizard that is not that class. Reproducible: Always
Created attachment 206299 [details] proposed patch against 3.0 maintenance
I've fixed this in HEAD, seems like a good candidate for 3.0.2
fix checked in to maintenance
Any chance this could be backported to 2.3.x? We are seeing the problem in 2.3.3.
We would just need a stream to do the release. I'm not sure if there is going to be another maintenance build on that stream, but I would guess there is. The other option would be to do a custom patch on top of 2.3.4. I'll look into it. Remind me if you haven't heard anything in a week.