Bug 513693

Summary: Report issue when referencing "new" field, method or class
Product: [Eclipse Project] PDE Reporter: Mickael Istria <mistria>
Component: API ToolsAssignee: PDE API Tools Inbox <pde-apitools-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: Vikas.Chandra
Version: 4.5Keywords: investigate
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=513304
https://bugs.eclipse.org/bugs/show_bug.cgi?id=513722
Whiteboard:

Description Mickael Istria CLA 2017-03-15 05:37:01 EDT
I've written a plugin which
* has a dependency to org.eclipse.jface.text 3.11.0
* in the Java code, references a constructor defined in this dependency (ContentAssistant(true) in this case) which is annotated with @since 3.12 in Javadoc
and I see no warning reported by API Tools.
In such case, I would expect the API Tools to show a warning on the constructor reference to highlight that my dependency minimal version doesn't match the version required in the code.
Comment 1 Vikas Chandra CLA 2017-03-15 06:11:38 EDT
Does your target have org.eclipse.jface.text 3.11.0 or 3.12?

If the target doesnt have 3.11 it should give something like "Unsatisfied version constraint" in a manifest file.

I think I can recreate this but can you attach a sample project file so that we are sure that we are discussing the same problem.
Comment 2 Mickael Istria CLA 2017-03-15 06:13:48 EDT
(In reply to Vikas Chandra from comment #1)
> Does your target have org.eclipse.jface.text 3.11.0 or 3.12?
> 
> If the target doesnt have 3.11 it should give something like "Unsatisfied
> version constraint" in a manifest file.

Target has 3.11, but 3.12 is opened in the workspace.
Comment 3 Mickael Istria CLA 2017-03-15 06:33:42 EDT
To reproduce it:
* Set baseline to Eclipse 4.6.2
* Import and open org.eclipse.jface.text and org.eclipse.ui.genericeditor in workspace from eclipse.platform.text repo, using commit 	c88654a1094f40f402575bfd0e258aade7dac74b

You'll notice that:
* org.eclipse.ui.genericeditor/META-INF/MANIFEST.MF mentions org.eclipse.jface.text;bundle-version="3.11.0"
* org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java line 105 references a constructor for ContentAssistant which was introduced in 3.12 and has the annotation setup

And no warning is shown on the code, nor on the MANIFEST.MF
Comment 4 Vikas Chandra CLA 2017-03-15 06:35:52 EDT
Ok. I will investigate this further.