Community
Participate
Working Groups
I get this exception in the error log when right-clicking on an attribute in the JPA structure view. It appears to be related to the Open Diagram action. org.eclipse.core.runtime.CoreException: No property tester contributes a property org.eclipse.wst.common.project.facet.core.projectFacet to type class org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkPersistentAttribute at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123) at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
I get the similar exception in the error log when right-clicking on JPA Content in the Project Explorer. org.eclipse.core.runtime.CoreException: No property tester contributes a property org.eclipse.wst.common.project.facet.core.projectFacet to type class org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123) at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
Stefan...Is the "Open Diagram" menu item supposed to be included in every right-click context menu for Dali content? I'm not sure this question is related to this bug, but just curios as to the intention of where this menu item is placed.
(In reply to comment #2) > Stefan...Is the "Open Diagram" menu item supposed to be included in every > right-click context menu for Dali content? I'm not sure this question is > related to this bug, but just curios as to the intention of where this menu > item is placed. Yes, it's being propagated to all the subnodes of 'JPA Content' node. Do you think it's ok?
I didn't notice this bug was targeted to 3.1. This really should be fixed for Indigo. This is a common action that will result in exceptions in the error log which should be avoided if at all possible for a release. As for the location, I'm not sure if this item should be in the Structure View tree. I think of this area being more task focused to the current editor, and not a place to switch editors. What do others think?
Yes, we should certainly fix this for Indigo (along with other bugs, which I will retarget shortly). As for the location I'm also not sure ...
Created attachment 194796 [details] Patch proposal
We have found the problem and are proposing a patch. The issue was related to the changes in the package name of some Dali classes: in particular org.eclipse.jpt.jpa.core.JpaNode, which, together with another minor problem, was causing that JPA Diagram's property tester was not applied.
The patch works fine except for a specific scenario: 1. Double click on an entity in order to see it in the JPA structure view 2. Right click on the entity in the JPA structure view You get: ---------------------------------------------- java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jpt.jpadiagrameditor.ui.internal.propertytester.JpaProjectFacetVersionPropertyTester.test(JpaProjectFacetVersionPropertyTester.java:21) at org.eclipse.core.internal.expressions.Property.test(Property.java:58) at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99) at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53) at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53) at org.eclipse.ui.internal.ObjectActionContributor$ObjectContribution.isApplicableTo(ObjectActionContributor.java:374) at org.eclipse.ui.internal.ObjectActionContributor.isApplicableTo(ObjectActionContributor.java:242) at org.eclipse.ui.internal.ObjectContributorManager.isApplicabl .... ----------------------------------------------- Please, see into it ...
Created attachment 195046 [details] Fixing the IndexOutOfBounds exception Thanks Stefan, for pointing this out. I have proposed another patch (the JUnit tests are OK). Could you please take a look at it ?
This bug is a regression. Every (first) time the user tries to open the diagram she can't do it and gets an exception. The workaround is just to retry opening the diagram, but it's annoying. The fix was tested manually. The change is very small - in plugin.xml and in JpaProjectFacetVersionPropertyTester. It concerns project facet testing. I (as a component lead) have reviewed the fix. The risk is low.
Excellent. Obviously important to fix for Indigo, fix looks simple, and safe. Thanks for fixing ... and finding!
Fix looks good - thanks
Committed and released ...