Bug 513693 - Report issue when referencing "new" field, method or class
Summary: Report issue when referencing "new" field, method or class
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE API Tools Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2017-03-15 05:37 EDT by Mickael Istria CLA
Modified: 2017-03-15 14:26 EDT (History)
1 user (show)

See Also:


Attachments

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