Community
Participate
Working Groups
I20081211-1908 - set 3.4 as API baseline - check out org.eclipse.equinox/framework/bundles/org.eclipse.osgi from :pserver:anonymous@dev.eclipse.org:/cvsroot/rt/ - build => log (same status twice): !ENTRY org.eclipse.pde.api.tools 4 120 2008-12-16 16:07:41.459 !MESSAGE Error logged from API Tools Core: !STACK 1 org.eclipse.core.runtime.CoreException: Could not locate the source position for: getSubjectDN in the type: BundleSignerCondition at org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector.noSourcePosition(AbstractProblemDetector.java:264) at org.eclipse.pde.api.tools.internal.builder.SystemApiDetector.getSourceRange(SystemApiDetector.java:355) at org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector.createProblem(AbstractProblemDetector.java:106) at org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector.createProblems(AbstractProblemDetector.java:316) at org.eclipse.pde.api.tools.internal.builder.ReferenceAnalyzer.analyze(ReferenceAnalyzer.java:191) at org.eclipse.pde.api.tools.internal.builder.ReferenceAnalyzer.analyze(ReferenceAnalyzer.java:411) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkApiUsage(BaseApiAnalyzer.java:747) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.analyzeComponent(BaseApiAnalyzer.java:246) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.buildAll(ApiAnalysisBuilder.java:404) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.build(ApiAnalysisBuilder.java:307) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:280) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:361) at org.eclipse.core.internal.resources.Project$1.run(Project.java:524) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:502) at org.eclipse.core.internal.resources.Project.build(Project.java:102) at org.eclipse.pde.api.tools.internal.util.Util$BuildJob.run(Util.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) !SUBENTRY 1 org.eclipse.pde.api.tools 4 0 2008-12-16 16:07:41.459 !MESSAGE Could not locate the source position for: getSubjectDN in the type: BundleSignerCondition
I'll have a look.
The problem in this case comes from the fact that I don't get the expected source when requesting the source of a line number to the document. It might come from the boggus debug attribute. I'll investigate.
There is a suspicious entry in the line number table that screws up the retrieval of the right source code to locate the error.
I think we should fix two things. 1) Fix the debug attribute 2) Return a valid source position even if the right line cannot be retrieved. I propose the source range of the enclosing type.
Open bug 259129 for the issue in the debug attribute.
Created attachment 120770 [details] fix The problem was actually in our logic to select a method name within a line of code. Most of this was fixed with the fix for bug 251617, and the patch handles the rest of the edge case.
A bit more refactoring could be done to fully leverage the new Signatures class.
Applied patch with updates: 1. coalesced and pushed up methods for finding field and method source ranges 2. used the new Signatures class in additional locations in the System API Detector Please verify Olivier
FYI: I got the same error using latest I-build (I20090106-1323), see bug 260235.
Verified.