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

Bug 313361

Summary: Compilation error when generate the code that contains phantom nodes
Product: [Modeling] GMF-Tooling Reporter: Patrick Tessier <Patrick.Tessier>
Component: CoreAssignee: gmf.generation-inbox <gmf.generation-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 2.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Used features none

Description Patrick Tessier CLA 2010-05-18 10:13:03 EDT
Created attachment 168933 [details]
Used features

I'm working in the team Papyrus.

I have download the M7 and  I have the following error  in the XXXDiagramUpdater into a method that contains phantom nodes:

public static List<UMLNodeDescriptor> getXXXSemanticChildren(

[...]
Resource resource = modelElement.eResource();
COMPILATION ERROR---->for (EObject childElement : getPhantomNodesIterator(resource)) {
	if (childElement == modelElement) {
		continue;
	}
if (UMLVisualIDRegistry.getNodeVisualID(view, childElement) == ShortCutDiagramEditPart.VISUAL_ID) {
	result.add(new UMLNodeDescriptor(childElement,
						ShortCutDiagramEditPart.VISUAL_ID));
				continue;
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Iterator<EObject> getPhantomNodesIterator(Resource resource) {
		return resource.getAllContents();
	}

The method returns an iterator and we have a loop that manipulates an array.
Comment 1 Eclipse Webmaster CLA 2010-07-19 22:21:55 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug