eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Problem with introducing property page without filter #539

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 311625 | | Status | CLOSED WORKSFORME | | Importance | P3 normal | | Reported | May 04, 2010 16:29 EDT | | Modified | May 27, 2011 03:01 EDT | | Reporter | Lidija Grahek |

Description

As part of bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=289761, a property page was introduced without any filter or enablement expression - see org.eclipse.ocl.examples.modelregistry.ui/plugin.xml under extension point="org.eclipse.ui.propertyPages". It means that this property page is considered a valid one by Eclipse's properties action for all elemements, which results in Eclipse's Properties context menu entry being available everywhere. When clicking on Properties option for an element that shouldn't have it (but now it does because of this defect) an exception is shown and partially initiated property dialog is opened.

I marked this defect with severety normal, but could very well be major considering that it is a regression.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 04, 2010 17:26

This bug has been marked as a duplicate of bug 308601

eclipse-ocl-bot commented 1 month ago

By Lidija Grahek on May 05, 2010 10:33

Thank you Edward for a quick response. I tried out the patch you committed yesterday. Adding check for IResource did help remove Properties option from irrelevant elements.

There seems to be another restriction though that should take place. Namely, when I open OCL Model Registry property page on a project element (that does adapt to IResource), I get the exception as shown below. I assume we can keep bug 308601 closed, and this one opened then. Or maybe keep this closed and create a new defect?

Also, I noticed that you rolled back your change that checks for IResource soon after delivering it. I assume you will put it back in? It does solve the major part of this problem.

Thanks!

-----------------------------\ org.eclipse.core.internal.resources.ResourceException: Resource '/my project name/.settings/org.eclipse.ocl.modelregistry' does not exist.\ at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:326)\ at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:200)\ at org.eclipse.core.internal.resources.File.getContents(File.java:291)\ at org.eclipse.core.internal.resources.File.getContents(File.java:282)\ at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:204)\ at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:448)\ at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:301)\ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1254)\ at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)\ at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)\ at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)\ at org.eclipse.ocl.examples.modelregistry.model.ProjectRegistry.loadModel(ProjectRegistry.java:249)\ at org.eclipse.ocl.examples.modelregistry.ui.properties.ConfigurationBlock.(ConfigurationBlock.java:169)\ at org.eclipse.ocl.examples.modelregistry.ui.properties.PropertyPage.createControl(PropertyPage.java:137)\ at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501)

.....

And there is another error, the same stack as this but error message

org.eclipse.core.internal.resources.ResourceException: Resource '/my project name/.settings/org.eclipse.qvt.declarative.modelregistry' does not exist.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 05, 2010 11:30

I'm afraid that I had to roll-back the commit to try to find out why Hudson builds started to fail from this fix and five other trivial changes. (Bug 311658). I'll recommit once the nightmare is over.

On bug 308601 I asked for an example of a non-IResource but received no assistance in providing a repro. I could only test by temporarily adpting to IFile and verifying the selectivity.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jun 18, 2010 16:08

In the absence of any further test case.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 03:01

Closing WORKSFORME