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

Bug 251679

Summary: Error for API addition gets wrongly reported
Product: [Eclipse Project] PDE Reporter: Dani Megert <daniel_megert>
Component: API ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: darin.eclipse, Olivier_Thomann
Version: 3.5   
Target Milestone: 3.5 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Dani Megert CLA 2008-10-22 06:06:40 EDT
I20081022-0905.

1. start fresh workspace
2. define API baseline to 3.4
3. check org.eclipse.ltk.ui.refactoring  from HEAD
==> I get two invalid API tooling errors:

1) Missing @since tag on 
   org.eclipse.ltk.ui.refactoring.LanguageElementNode.internalAddChild(ChildNode)
   ==> this method is there since rev. 1.1 (R3.2, 2005)

2) The minor version should be incremented in version 3.4.0.qualifier, since new 
   APIs have been added
   ==> this is probably a follow-up of 1)

NOTE: same errors if I check out R3_4.
Comment 1 Olivier Thomann CLA 2008-10-22 10:03:53 EDT
yes, 2) would be a consequence of 1).
I am investigating.
Comment 2 Dani Megert CLA 2008-10-22 10:06:51 EDT
I also get this in the .log:

!ENTRY org.eclipse.pde.api.tools 4 0 2008-10-22 12:03:06.483
!MESSAGE Unable to resolve method signature: org.eclipse.ltk.ui.refactoring.LanguageElementNode#void internalAddChild(ChildNode)
Comment 3 Olivier Thomann CLA 2008-10-22 10:14:14 EDT
I also reproduce this issue. I am investigating.
We are wrongly retrieving the restrictions for the method on the baseline. I need to find out why we don't see the method as @noreference in the baseline.
Comment 4 Olivier Thomann CLA 2008-10-22 10:29:38 EDT
Sorry this is the opposite. @noreference is retrieved for the the baseline, but an exception occurred while reading the api description for the current workspace.
Then the method in the workspace is not seen as @noreference and therefore it is reported as a api addition. This is why we end up with the @since tag check.
I am investigating the failure in the api description decoding.
Comment 5 Olivier Thomann CLA 2008-10-22 10:34:38 EDT
The .api_description entry for this method looks like:
        <type handle="=org.eclipse.ltk.ui.refactoring/src&lt;org.eclipse.ltk.ui.refactoring{LanguageElementNode.java[LanguageElementNode" modificationStamp="2" restrictions="0" visibility="0">
            <method name="internalAddChild" restrictions="2048" signature="(QChildNode;)V" visibility="0"/>
        </type>

It might be related to the unresolved parameter types.
Comment 6 Olivier Thomann CLA 2008-10-22 11:27:42 EDT
Created attachment 115823 [details]
Proposed fix
Comment 7 Olivier Thomann CLA 2008-10-22 11:30:32 EDT
Released for 3.5M3.
Darin, please verify.
Comment 8 Dani Megert CLA 2008-10-24 04:22:14 EDT
Verified in N20081023-2000.