Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: 1. create a new XMI file (for example this one from getting started guide : <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="library "nsURI="http:///library.ecore" nsPrefix="library"> <eClassifiers xsi:type="ecore:EClass" name="Book"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> </eClassifiers> </ecore:EPackage> 2. right click on editor 3. there is two validate actions in the menu More information: Using Eclipse 3.3, I have also WTP 2.0 plugins installed. Disabling all validation for projet colors in gray the second validation entry in the menu. ( in Window -> Preferences -> Validation, "Suspend all validators"
This isn't related to the EMF Validation Framework, but rather is a consequence of EMF's editor generation capability (which generated the Ecore editor) using the same "Validate" menu action label as the WST Validation Framework uses.
What does the validate action from WTP do for a .ecore file? Does it make sense that it should appear for .ecore files and even in the popup for our editors? I'd prefer these actions not apply to any of EMF's resources...
I totally agree with that.
I guess I should reassign the owner to make sure someone notices...
Hari- can we filter our popup menu so it doesn't appear on these resources? If this is not trivial, feel free to retarget to 3.0.
Moving to 3.0
Does this problem still exists in 30? I couldn't reproduce it, but maybe I didn't use the right file extension.
WTP 3.2 M1. I tried opening an XMI file with the Sample Reflective Ecore Model Editor and I cannot see the duplicate action. However the VF validate action is in the context menu. The Validate action is contributed like this: <extension point="org.eclipse.ui.popupMenus"> <objectContribution adaptable="true" objectClass="org.eclipse.core.resources.IResource" id="ValidationMenuAction"> <action label="%VBF_UI_POPUP_RUNVALIDATION" class="org.eclipse.wst.validation.internal.ui.ValidationMenuAction" menubarPath="additions" enablesFor="+" id="ValidationAction"> </action> </objectContribution> </extension> If I read this right, it means it will show up for every IResource, regardless of whether or not a validator is registered to validate this resource. We could think about moving this action to the new command/handler framework and using the more powerful enablement rules to get the enablement right. We'd have to watch for early/unwanted validation framework activation and for how expensive the enablement computation is.
*** Bug 235717 has been marked as a duplicate of this bug. ***
I have found another Bug 235717 that requests similar better enablement/visibility rules for the Validate menu action. I have marked it as a duplicate, changed the summary on this bug and converted it into an enhancement. See comment #8.
*** Bug 312408 has been marked as a duplicate of this bug. ***
*** Bug 319945 has been marked as a duplicate of this bug. ***
Given the number of people duplicating this and the clearly bad functionality being inflicted on other projects, this cannot be an enhancement. Please change to at least normal if not major. I'm sure you can fix it with custom enablement code.
Hi, This is still present in 4.2. Any improvements about this ?
Hi, I am backing Ed's comment. We are in a situation in which we can't get rid of the WST dependencies and because of that on all our editors the "validate" menu item appears which does absolutely nothing in our context and is confusing for the user. In my opinion this is a bug which should be fixed asap.
(In reply to comment #15) > Please change to at least normal if not major. Changing to major since nobody else has.