Bug 182338 - Something has changed on org.eclipse.jdt.core.dom.DefaultCommentMapper
Summary: Something has changed on org.eclipse.jdt.core.dom.DefaultCommentMapper
Status: VERIFIED DUPLICATE of bug 181393
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-13 11:14 EDT by Marcelo Paternostro CLA
Modified: 2007-04-27 10:16 EDT (History)
1 user (show)

See Also:


Attachments
Team xy to extract the EMF plugins into the workspace (411 bytes, text/plain)
2007-04-13 11:16 EDT, Marcelo Paternostro CLA
no flags Details
Light version of the EMF Test Tool plugin (253.17 KB, application/octet-stream)
2007-04-13 11:17 EDT, Marcelo Paternostro CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.