JavaCore#getOptions
) using its plugin property store. Clients no longer need to save them. ResourcesPlugin.getEncoding()
.
* BUILDER / Abort if Invalid Classpath * Allow to toggle the builder to abort if the classpath is invalid * - option id: "org.eclipse.jdt.core.builder.invalidClasspath" * - possible values: { "abort", "ignore" } * - default: "ignore"
classpathContainerChanged()
got replaced with setter method JavaCore.setClasspathContainer(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer respectiveContainers)
ClasspathContainerResolver
got renamed into ClasspathContainerInitializer
CPE_SOURCE
entry.
IClasspathContainer
in order to allow containers to be presented in a UI.
extends
keyword of a class header the relevance grow if the type is a class.
implements
keyword of a class header the relevance grow if the type is an interface.
extends
keyword of an interface header the relevance grow if the type is an interface.
exception
or error
).
IJavaProject.findType(String)
IJavaProject.findType(String, String)
IMethod.isMainMethod()
IMethod.isSimilar(IMethod)
IType.getFullyQualifiedName(char)
IType.getTypeQualifiedName(char)
IWorkingCopy.findSharedWorkingCopy()
is now taking an extra argument: the buffer factory it is associated with. This ensures that
working copies can only be reused for the same buffer factories.
CPE_CONTAINER
), (see proposal here) so as to better encapsulate client defined libraries.
Typically, VM installs would use classpath containers instead of classpath variables (JRE_LIB
) so as to better describe the corresponding
set of libraries (including extension dirs) to be placed on the build path.
New APIs added to reflect this addition:
JavaCore.newContainerEntry(IPath containerPath)
JavaCore.newContainerEntry(IPath containerPath, boolean isExported)
JavaCore.classpathContainerChanged(IPath containerPath, IJavaElement scope)
ClasspathContainerResolver
IJavaElementDelta.F_SOURCEATTACHED
if a source
has been attached to a jar and no source previously existed.
IJavaElementDelta.F_SOURCEDETACHED
if a source
has been detached from a jar and no other source has been attached.
IJavaElementDelta.F_SOURCEDETACHED | JavaElementDelta.F_SOURCEATTACHED
if an attached source has been changed.
/**
* Event type constant (bit mask) indicating an after-the-fact
* report of creations, deletions, and modifications
* to one or more Java element(s) expressed as a hierarchical
* java element delta as returned by getDelta
.
*
* Note: this notification occurs during the corresponding POST_CHANGE
* resource change notification, and contains a full delta accounting for
* any JavaModel operation and/or resource change.
*
* @see IJavaElementDelta
* @see IResourceChangeEvent
* @see #getDelta
* @since 2.0
*/
public static final int POST_CHANGE = 1;
/**
* Event type constant (bit mask) indicating an after-the-fact
* report of creations, deletions, and modifications
* to one or more Java element(s) expressed as a hierarchical
* java element delta as returned by getDelta
.
*
* Note: this notification occurs during the corresponding PRE_AUTO_BUILD
* resource change notification. The delta which is notified here only contains
* information relative to the previous JavaModel operations (i.e. ignores the
* possible resources which have changed outside Java operations). In
* particular, it is possible that the JavaModel be inconsistent with respect to
* resources which got modified outside JavaModel operations (it will only be
* fully consistent once the POST_CHANGE notification has occured).
*
* @see IJavaElementDelta
* @see IResourceChangeEvent
* @see #getDelta
* @since 2.0
*/
public static final int PRE_AUTO_BUILD = 2;
/**
* Event type constant (bit mask) indicating an after-the-fact
* report of creations, deletions, and modifications
* to one or more Java element(s) expressed as a hierarchical
* java element delta as returned by getDelta
.
*
* Note: this notification occurs as a result of a working copy reconcile
* operation.
*
* @see IJavaElementDelta
* @see IResourceChangeEvent
* @see #getDelta
* @since 2.0
*/
public static final int POST_RECONCILE = 4;
/**
* Adds the given listener for changes to Java elements.
* Has no effect if an identical listener is already registered.
* After completion of this method, the given listener will be registered for exactly the
* the specified events. If they were previously registered for other events, they
* will be deregistered.
*
* Once registered, a listener starts receiving notification of changes to
* java elements in the model. The listener continues to receive
* notifications until it is replaced or removed.
*
* Listeners can listen for several types of event as defined in ElementChangeEvent
.
* Clients are free to register for any number of event types however if they register
* for more than one, it is their responsibility to ensure they correctly handle the
* case where the same java element change shows up in multiple notifications.
* Clients are guaranteed to receive only the events for which they are registered.
*
*
* @param listener the listener
* @param eventMask the bit-wise OR of all event types of interest to the listener
* @see IElementChangeListener
* @see ElementChangeEvent
* @see #removeElementChangeListener
* @since 2.0
*/
public static void addElementChangedListener(IElementChangedListener listener, int eventMask)
createArraySignature(char[], int arrayCount)
createCharArrayTypeSignature(char[], boolean)
createMethodSignature(char[][], char[])
getArrayCount(char[])
getElementType(char[])
getParameterCount(char[])
getParameterTypes(char[])
getQualifier(char[])
getReturnType(char[])
getSimpleName(char[])
getSimpleNames(char[])
toCharArray(char[], char[], char[][], boolean, boolean)
toCharArray(char[])
toQualifiedName(char[][])
IWorkingCopy#getSharedWorkingCopy(IProgressMonitor, IBufferFactory)
, use API with extra IProblemRequestor
IWorkingCopy#getWorkingCopy(IProgressMonitor, IBufferFactory)
, use API with extra IProblemRequestor
IWorkingCopy#reconcile(IProblemRequestor)
, use API with no IProblemRequestor
IJavaElement.getAncestor(int)
IJavaElement.getOpenable()
IJavaElement.getPath()
IJavaElement.getResource()
IJavaProject.isOnClasspath(IJavaElement)
IPackageFragmentRoot.getRawClasspathEntry()
IType.findMethods(IMethod)
IWorkingCopy.findElements(IJavaElement)
IWorkingCopy.findPrimaryType()
IProblemRequestor
. #beginReporting is always called before restarting error detection. #endReporting is always called at the
end of detection.
JavaCore#setClasspathVariables
, this allows to update
all affected projects exactly once, instead of iterating multiple times on each project (if it references the variable). This can improve performance
when setting JRE variables.
relevance
to be able to sort proposal by degree of relevance.
relevance
is a positive integer which are used for determine if this proposal is more relevant than another proposal.
This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
value is higher.
IBuffer
by saying that:
IBuffer
(e.g.
IType.createMethod(...)
) ensures that the same line delimiter
(i.e. either "\n"
or "\r"
or "\r\n"
) is
used accross the whole buffer. Thus these operations may change the line delimiter(s)
included in the string to be append, or replaced.
However implementors of this interface should be aware that other clients of IBuffer
might not do such transformations beforehand.addBufferChangedListener
and removeBufferChangedListener
have no effect if the buffer is already closed.setContent
might throw a RuntimeException
if called after the buffer
has been closed.IScanner#getSource
so as to retrieve the scanner original source
IScanner#setSourceBuffer
into IScanner#setSource
WaitUntilReady
policy.
The background indexer now takes all the CPU when another thread is waiting for it to
finish indexing.
User will notice this improvement when doing a search or opening a type and there are
still files to index.
org.eclipse.jdt.core.compiler.IScanner
). org.eclipse.jdt.core.ToolFactory#createScanner
), allowing to obtain
a scanner (implementing IScanner
API). org.eclipse.jdt.core.ICodeFormatter
). org.eclipse.jdt.core.ToolFactory#createCodeFormatter
), allowing to obtain
a code formatter (implementing ICodeFormatter
API). Note that an extension point was also added
to allow client code to contribute a code formatter implementation. The code formatter extension point is named
org.eclipse.jdt.core.codeFormatter
, also see associate comment in plugin.xml.org.eclipse.jdt.core.ToolFactory#createDefaultCodeFormatter
), allowing to obtain
a default code formatter (implementing ICodeFormatter
API). org.eclipse.jdt.core.IProblemRequestor
) to working copy #reconcile(...)
operation. The problem requestor is passed along at creation time.
IBufferFactory
got deprecated, they will be removed in a subsequent build.
org.eclipse.jdt.internal.core.parser.InvalidInputException
org.eclipse.jdt.core.compiler.InvalidInputException
org.eclipse.jdt.internal.core.parser.TerminalSymbols
org.eclipse.jdt.core.compiler.ITerminalSymbols
org.eclipse.jdt.core/debug/search=true
CorrectionEngine#computeCorrections(IProblem, ICompilationUnit, ICorrectionRequestor)
, allowing.
to compute replacement corrections for IProblem(s) detected while reconciling.ISourceReference#exists()
, allowing.
to check existency before invoking ISourceReference
behavior. All implementations did already provide
an exists()
method since they also are implementing IJavaElement
.IDOMFactory.createInterface()
and IDOMFactory.createClass()
.
See 10980 for details.IJavaElementDelta.F_FINE_GRAINED
that indicates
that a fine-grained delta was computed for a given delta.
Clients can use this flag to find out if a compilation unit
that have a F_CONTENT
change should assume that there are
no finer grained changes (F_FINE_GRAINED
is set) or if
finer grained changes were not considered (F_FINE_GRAINED
is not set).
org.eclipse.jdt.core.compiler.IProblem
)
ICompletionRequestor
to surface IProblems instead of IMarkers.IClassFile.getWorkingCopy(IProgressMonitor, IBufferFactory)
for consistence with IWorkingCopy
.
The returned working copy is just a wrapper on the class file's buffer.
Thus only the getBuffer()
operation is valid on this working
copy.
IWorkingCopy
instance when asking for a working copy.
See IWorkingCopy.getSharedWorkingCopy(IProgressMonitor, IBufferFactory)
,
IWorkingCopy.findSharedWorkingCopy()
and IWorkingCopy.destroy()
for more detail.
org.eclipse.jdt.core/debug/sharedworkingcopy=true
org.eclipse.jdt.core/debug/cpvariable=true
org.eclipse.jdt.core/debug/zipaccess=true
IBuffer
is created through an
IBufferFactory
, its content is set with the original
element's content.
IBufferFactory
used when creating an IWorkingCopy
(see ICompilationUnit.getWorkingCopy(IProgressMonitor monitor, IBufferFactory factory)
)
is now remembered and will be reused if the working copy is closed then reopen.
SearchEngine(IWorkingCopy[])
which takes a list of working copies that will take precedence
over their original compilation units in the subsequent search
operations on this search engine.
SearchEngine.createJavaSearchScope(IResource[]) has been deprecated. Use SearchEngine.createJavaSearchScope(IJavaElement[]) instead. The rational is that createJavaSearchScope(IResource[]) was not well defined for projects, and it could not define a search scope for java elements that didn't have a corresponding resource (e.g. external jars). This deprecated API's behavior has also reverted to the 1.0 state for backward compatibility. The specification of createJavaSearchScope(IJavaElement[]) is as follows:
Helper
method computing a resolved and expanded path (all exports from prerequisites)
+ IJavaProject.getExpandedClasspath(boolean)