Bug 182338

Summary: Something has changed on org.eclipse.jdt.core.dom.DefaultCommentMapper
Product: [Eclipse Project] JDT Reporter: Marcelo Paternostro <marcelop>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks
Version: 3.3   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Team xy to extract the EMF plugins into the workspace
none
Light version of the EMF Test Tool plugin none

Description Marcelo Paternostro CLA 2007-04-13 11:14:33 EDT
EMF has a merge tool that is based on AST.  In M6 all our tests were OK but now, with I20070410-1043, they are failing.  Olivier has analyzed the problem and narrowed down the problem to the class mentioned in the Summary.

To set up your environment with the EMF tests you will need the 2 files attached here.

The psf file extracts 2 EMF plugins into your workspace (use anonymous as the user and an empty password).  The zip contains a project with the test cases and a test launcher.  After importing the contents of the zip, open the Run Dialog, expand "JUnit Plugin Test" and select "Test EMF Tools".  This runs 105 tests.  Although they are OK in M6, in I20070410-1043 you should get 1 error and 8 failures.

I may be wrong but I think the test case  "AST Facade Test Suite -> Types Test -> testMoveAndModify1" is the best place for you to start.  This test reads the "Source.java" file located on "/org.eclipse.emf.test.tools/data/facade.ast/TypesTest" and applies a set of changes that should generate the contents of the file "TestMoveAndModify1.java" located in the same directory.  

Trying to give you some pointers about our code...  

- You will notice that we read and manipulate the nodes in a Java file through a set of interfaces located in "org.eclipse.emf.codegen.merge.java.facade".  This facade allows our Java merger tool to work with both JDOM and AST.  The AST facade implementation is located in "org.eclipse.emf.codegen.merge.java.facade.ast".

- Some important methods and classes in the AST facade implementation are:

org.eclipse.emf.codegen.merge.java.facade.ast.ASTFacadeHelper.createCompilationUnit(String, String)

org.eclipse.emf.codegen.merge.java.facade.ast.CommentAwareSourceRangeComputer
Comment 1 Marcelo Paternostro CLA 2007-04-13 11:16:08 EDT
Created attachment 63761 [details]
Team xy to extract the EMF plugins into the workspace
Comment 2 Olivier Thomann CLA 2007-04-13 11:16:50 EDT
Also be sure to execute the given launching configuration with a 1.5 VM.
Comment 3 Marcelo Paternostro CLA 2007-04-13 11:17:14 EDT
Created attachment 63762 [details]
Light version of the EMF Test Tool plugin
Comment 4 Jerome Lanneluc CLA 2007-04-13 11:40:42 EDT
Fix for bug 181393 fixes this problem.

*** This bug has been marked as a duplicate of bug 181393 ***
Comment 5 Eric Jodet CLA 2007-04-27 06:30:15 EDT
Verified for 3.3 M7 using build I20070427-0010
Comment 6 Marcelo Paternostro CLA 2007-04-27 10:16:02 EDT
Thank you very much for the quick fix, guys.