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

Bug 312639

Summary: [JavaExtensions] Duplicate error marker in editor
Product: [Modeling] M2T Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XpandAssignee: Project Inbox <m2t.xpand-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darius.jockel
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sebastian Zarnekow CLA 2010-05-12 10:48:20 EDT
1) Use the emf example
2) Create this class:
package metamodel;

import org.eclipse.emf.ecore.EObject;

public class Util {

	public EObject model(EObject object) {
		return object.eContainer();
	}
	
}

3) Change Extensions.ext:
Model model(Type this) :
	JAVA metamodel.Util.model(org.eclipse.emf.ecore.EObject);

4) Save the extension file
5) change the modifier o Util.model(EObject) to protected and save the class
6) Go back to the extension file, add a space, remove it and save the file.
7) You'll get two error markers in the problems view which both say "The method model is not public".
7.1) The error marker highlights not the complete method name but only "mode".
8) Add a blank line to Util.java and save the class.
9) Add a space and remove it from Extensions.ext and save the file. Only one marker will be created.
Comment 1 Darius Jockel CLA 2010-05-18 03:06:27 EDT
Hello Sebastian,

I used my Development Runtime Eclipse and the itemis Helios M7 distrubution, but
I can not reproduce the duplicate eror marker.
All I can reproduce is this bug:
> 7.1) The error marker highlights not the complete method name but only "mode".

This is an bug of the xtend parser (calculation of the end of an (java-)statement).
I dont like to fix it in this release.
Comment 2 Karsten Thoms CLA 2020-04-30 13:55:22 EDT
This is a batch close of open M2T Xpand bugs. It is not planned work on this component in the foreseeable future. If you think this issue needs to be solved and you plan to contribute a fix then feel free to reopen it.