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

Bug 329936

Summary: Eclipse DOM AST with OT/J extensions problem
Product: [Tools] Objectteams Reporter: arlindolima
Component: OTDTAssignee: Project Teams <objectteams.otdt-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 0.7.1   
Target Milestone: 0.8 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description arlindolima CLA 2010-11-10 13:10:22 EST
Just downloaded the revision 986 of the Eclipse DOM AST with OT/J extensions:

http://trac.objectteams.org/ot/browser/trunk/src/plugins/org .eclipse.jdt.core/dom/org/eclipse/jdt/core/dom



I've noticed that in the package "org.eclipse.jdt.core.dom" there are two classes with the same code, but different names:

NameEnviromentWithProgress.java and
NameEnvironmentWithProgress.java

I assume NameEnviromentWithProgress.java, since it's misspelled, should be eliminated.



The real problem, however, is that both these classes import an interface that I think it doesn't exist:

import org.eclipse.jdt.internal.core.INameEnvironmentWithProgress;


In Revision 374 (where only the class NameEnviromentWithProgress.java existed), the interface imported was:

import org.eclipse.jdt.internal.core.INameEnviromentWithProgress;


I'm assuming the interface's source code was forgotten to be changed.
Comment 1 Stephan Herrmann CLA 2010-11-10 15:52:01 EST
(In reply to comment #0)
> Just downloaded the revision 986 of the Eclipse DOM AST with OT/J extensions:
> 
> http://trac.objectteams.org/ot/browser/trunk/src/plugins/org
> .eclipse.jdt.core/dom/org/eclipse/jdt/core/dom

At first this URL confused me, but digging deeper it's clear you are not
actually referring to the objectteams.org repository, but to the one at
eclipse.org, good. (objectteams.org doesn't have a rev. 986 at that location)

BTW: why did you chose that revision? If you are looking for something
compatible with Eclipse 3.7M3 please consider the brandnew tag at r1016.
This shall be our contribution to Indigo M3.

> I've noticed that in the package "org.eclipse.jdt.core.dom" there are two
> classes with the same code, but different names:
> 
> NameEnviromentWithProgress.java and
> NameEnvironmentWithProgress.java
> 
> I assume NameEnviromentWithProgress.java, since it's misspelled, should be
> eliminated.

Thanks for the notice, yes in JDT/Core the typo was corrected some time
between 3.6 and 3.7M2. I merged these changes in r884. Since the JDT/Core
is in a CVS repository the renaming consisted of adding one file and
removing the other. Apparently I missed the deletion.
A quick search confirms that the misspelled class is no longer used
and should be removed. 
 
> The real problem, however, is that both these classes import an interface that
> I think it doesn't exist:
> 
> import org.eclipse.jdt.internal.core.INameEnvironmentWithProgress;
> 
> 
> In Revision 374 (where only the class NameEnviromentWithProgress.java existed),
> the interface imported was:
> 
> import org.eclipse.jdt.internal.core.INameEnviromentWithProgress;
> 
> 
> I'm assuming the interface's source code was forgotten to be changed.

So that was the same typo. However, looking at the changeset 884 I see
the correct pair of removing INameEnviromentWithProgress and adding
INameEnvironmentWithProgress. 
The corrected file hasn't been touched since then.


I removed the obsolete class and I ask you to double check regarding
the interface. Note, that the interface is not in the source folder "dom"
but "model". Please re-open if you still see an error.
Comment 2 arlindolima CLA 2010-11-11 08:16:52 EST
(In reply to comment #1)

> At first this URL confused me, but digging deeper it's clear you are not
> actually referring to the objectteams.org repository, but to the one at
> eclipse.org, good.

You're right. My mistake. The URL I used was:
http://dev.eclipse.org/svnroot/tools/org.eclipse.objectteams


> BTW: why did you chose that revision?

It was the latest revision available, at the time I downloaded.
But only now I've noticed that revision it was supposed to work with Eclipse 3.7, that's why I was getting the errors (since I'm using 3.6).

Thanks.
Comment 3 Stephan Herrmann CLA 2010-11-11 08:21:30 EST
(In reply to comment #2)
> > BTW: why did you chose that revision?
> 
> It was the latest revision available, at the time I downloaded.
> But only now I've noticed that revision it was supposed to work with Eclipse
> 3.7, that's why I was getting the errors (since I'm using 3.6).

In that case I suggest you pick either of these tagged releases
(depending whether you have 3.6.0 or 3.6.1):

http://dev.eclipse.org/svnroot/tools/org.eclipse.objectteams/tags/releases/OTDT_0.7.0

http://dev.eclipse.org/svnroot/tools/org.eclipse.objectteams/tags/releases/OTDT_0.7.1

cheers
Comment 4 Stephan Herrmann CLA 2010-12-16 14:25:32 EST
Verified for M4 using build 201012150343 (by code inspection).