Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352943

Summary: [patch] Plug-in 'org.eclipse.m2e.refactoring' contributed an invalid Menu Extension (MNGECLIPSE-1732)
Product: z_Archived Reporter: Snjezana Peco <snjezana.peco>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgamache, charithsoori, ian, igor, manderse, mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fixing https://issues.jboss.org/browse/JBIDE-5914 igor: iplog+

Description Snjezana Peco CLA 2011-07-23 18:09:53 EDT
Build Identifier: I20110613-1736

This issue is described in https://issues.sonatype.org/browse/MNGECLIPSE-1732 and can be reproduced using m2e 1.0 and m2e master.

The issue happens if you select and right-click two or more maven projects from which at least one is not a Java project  or doesn't have a source classpath container.

Test case:

- clone the arquillian-core project (git://github.com/arquillian/arquillian-core.git)
- import all arquillian projects into Eclipse
You can see that the arquillian-bom project isn't a Java Project
- select the arquillian-bom project and one or more other Maven projects simultaneously and right-click
You will get 
!ENTRY org.eclipse.ui 4 4 2011-07-23 20:08:12.437
!MESSAGE Plug-in 'org.eclipse.m2e.refactoring' contributed an invalid Menu Extension (Path: 'org.eclipse.jdt.ui.refactoring.menu' is invalid): org.eclipse.m2e.editor.RenameProjectAction

The issue can't be reproduced by clicking two or more pom.xml files. However, right-clicking  pom.xml file(s) contributes the "Rename Maven Artifact..." action to the main context menu that isn't necessary. This action is visible, but disabled when right-clicking two or more pom.xml files.  

The attached patch fixes the issue and doesn't contribute any additional action to the main context menu. The "Rename Maven Artifact..." action is always placed in the Refactor submenu. It isn't shown when right-clicking two or more projects or right-clicking two or more pom.xml files. 

Reproducible: Always
Comment 1 Snjezana Peco CLA 2011-07-23 18:11:16 EDT
Created attachment 200238 [details]
Fixing https://issues.jboss.org/browse/JBIDE-5914
Comment 2 Igor Fedorenko CLA 2011-07-24 03:04:10 EDT
*** Bug 350293 has been marked as a duplicate of this bug. ***
Comment 3 Max Rydahl Andersen CLA 2011-07-25 08:05:39 EDT
Any chance this could go out in a service release ?

It's very noisy and occurs for pure pom parents projects which is a common pattern.
Comment 4 Igor Fedorenko CLA 2011-08-03 22:31:09 EDT
Applied the patch. Thank you.
Comment 5 Igor Fedorenko CLA 2011-12-14 09:57:40 EST
*** Bug 363654 has been marked as a duplicate of this bug. ***
Comment 6 Denis Roy CLA 2021-04-19 13:23:04 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/