Bug 257108 - API for dependency information
Summary: API for dependency information
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 12:56 EST by Darin Wright CLA
Modified: 2008-12-02 10:59 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2008-12-01 12:56:31 EST
The API analysis builder uses non-API methods/classes from JCore to determine the set of classes it needs to analyze in an incremental build. (See the ApiAnalysisBuilder class in the org.eclipse.pde.api.tools project for the disouraged accesses). It would be better for the builder to use public API if it could be made available.

Basically, we need to be able to determine what classes are dependent on a given class file in terms of compilation (i.e. which classes need to be re-analyzed when change is made). Note that we also need to determine this when non-structural changes are made in addition to when structural changes are made. For example, changing java doc (changing an API restriction) requires the API analysis builder to run.
Comment 1 Olivier Thomann CLA 2008-12-02 10:59:06 EST
The complete list of references to internal JDT/Core code is:
org.eclipse.jdt.internal.core.JavaModelManager
	getJavaModelManager()
	getLastBuiltState(IProject, IProgressMonitor)

org.eclipse.jdt.internal.core.builder.ReferenceCollection
	internQualifiedNames(StringSet)
	internSimpleNames(StringSet)
	includes(char[][][] qualifiedNames, char[][] simpleNames, char[][] rootNames)

org.eclipse.jdt.internal.core.builder.State
	getReferences()

org.eclipse.jdt.internal.core.builder.StringSet
	StringSet(int)
	elementSize
	add(String)
	clear()

org.eclipse.jdt.internal.compiler.util.SimpleLookupTable
	keyTable
	valueTable

New tests org.eclipse.jdt.core.tests.builder.FriendDependencyTests have been added to keep track of these references.