|
JavaScript Development Tools Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer
org.eclipse.wst.jsdt.libraries.BasicBrowserLibraryJsGlobalScopeContainerInitializer
public class BasicBrowserLibraryJsGlobalScopeContainerInitializer
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer |
|---|
ATTRIBUTE_NOT_SUPPORTED, ATTRIBUTE_READ_ONLY |
| Fields inherited from interface org.eclipse.wst.jsdt.core.IJsGlobalScopeContainer |
|---|
K_APPLICATION, K_DEFAULT_SYSTEM, K_SYSTEM |
| Constructor Summary | |
|---|---|
BasicBrowserLibraryJsGlobalScopeContainerInitializer()
|
|
| Method Summary | |
|---|---|
boolean |
canUpdateJsGlobalScopeContainer(IPath containerPath,
IJavaScriptProject project)
Returns true if this container initializer can be requested to perform updates
on its own container values. |
java.lang.String[] |
containerSuperTypes()
returns a String of all SuperTypes provided by this library. |
protected IJsGlobalScopeContainer |
getContainer(IPath containerPath,
IJavaScriptProject project)
|
java.lang.String |
getDescription(IPath containerPath,
IJavaScriptProject project)
Returns a readable description for a container path. |
java.lang.String |
getInferenceID()
Get the id of the inference provider for this library |
LibraryLocation |
getLibraryLocation()
|
void |
initialize(IPath containerPath,
IJavaScriptProject project)
Binds a includepath container to a IJsGlobalScopeContainer for a given project,
or silently fails if unable to do so. |
| Methods inherited from class org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer |
|---|
allowAttachJsDoc, getAccessRulesStatus, getAttributeStatus, getComparisonID, getDescription, getFailureContainer, getHostPath, getIncludepathEntries, getKind, getPath, getSourceAttachmentStatus, removeFromProject, requestJsGlobalScopeContainerUpdate, resolvedLibraryImport |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.wst.jsdt.core.IJsGlobalScopeContainer |
|---|
getDescription, getIncludepathEntries, getKind, getPath, resolvedLibraryImport |
| Constructor Detail |
|---|
public BasicBrowserLibraryJsGlobalScopeContainerInitializer()
| Method Detail |
|---|
public LibraryLocation getLibraryLocation()
getLibraryLocation in interface IJsGlobalScopeContainerInitializer
public boolean canUpdateJsGlobalScopeContainer(IPath containerPath,
IJavaScriptProject project)
IJsGlobalScopeContainerInitializertrue if this container initializer can be requested to perform updates
on its own container values. If so, then an update request will be performed using
JsGlobalScopeContainerInitializer#requestJsGlobalScopeContainerUpdate/
canUpdateJsGlobalScopeContainer in interface IJsGlobalScopeContainerInitializercanUpdateJsGlobalScopeContainer in class JsGlobalScopeContainerInitializercontainerPath - the path of the container which requires to be updatedproject - the project for which the container is to be updated
true if the container can be updated
protected IJsGlobalScopeContainer getContainer(IPath containerPath,
IJavaScriptProject project)
getContainer in class JsGlobalScopeContainerInitializer
public java.lang.String getDescription(IPath containerPath,
IJavaScriptProject project)
IJsGlobalScopeContainerInitializerIJsGlobalScopeContainer.getDescription()).
getDescription in interface IJsGlobalScopeContainerInitializergetDescription in class JsGlobalScopeContainerInitializercontainerPath - the path of the container which requires a readable descriptionproject - the project from which the container is referenced
public void initialize(IPath containerPath,
IJavaScriptProject project)
throws CoreException
IJsGlobalScopeContainerInitializerIJsGlobalScopeContainer for a given project,
or silently fails if unable to do so.
A container is identified by a container path, which must be formed of two segments. The first segment is used as a unique identifier (which this initializer did register onto), and the second segment can be used as an additional hint when performing the resolution.
The initializer is invoked if a container path needs to be resolved for a given project, and no
value for it was recorded so far. The implementation of the initializer would typically set the
corresponding container using JavaScriptCore#setJsGlobalScopeContainer.
A container initialization can be indirectly performed while attempting to resolve a project
includepath using IJavaScriptProject#getResolvedClasspath(; or directly when using
JavaScriptCore#getJsGlobalScopeContainer. During the initialization process, any attempt
to further obtain the same container will simply return null so as to avoid an
infinite regression of initializations.
A container initialization may also occur indirectly when setting a project includepath, as the operation needs to resolve the includepath for validation purpose. While the operation is in progress, a referenced container initializer may be invoked. If the initializer further tries to access the referring project includepath, it will not see the new assigned includepath until the operation has completed. Note that once the JavaScript change notification occurs (at the end of the operation), the model has been updated, and the project includepath can be queried normally.
This method is called by the JavaScript model to give the party that defined this particular kind of includepath container the chance to install includepath container objects that will be used to convert includepath container entries into simpler includepath entries. The method is typically called exactly once for a given JavaScript project and includepath container entry. This method must not be called by other clients.
There are a wide variety of conditions under which this method may be invoked. To ensure that the implementation does not interfere with correct functioning of the JavaScript model, the implementation should use only the following JavaScript model APIs:
JavaScriptCore#setJsGlobalScopeContainer(IPath, IJavaScriptProject[], IJsGlobalScopeContainer[], org.eclipse.core.runtime.IProgressMonitor)JavaScriptCore.getJsGlobalScopeContainer(IPath, IJavaScriptProject)JavaScriptCore#create(org.eclipse.core.resources.IWorkspaceRoot)JavaScriptCore#create(org.eclipse.core.resources.IProject)IJavaScriptModel.getJavaScriptProjects()
initialize in interface IJsGlobalScopeContainerInitializerinitialize in class JsGlobalScopeContainerInitializercontainerPath - a two-segment path (ID/hint) identifying the container that needs
to be resolvedproject - the JavaScript project in which context the container is to be resolved.
This allows generic containers to be bound with project specific values.
CoreException - if an exception occurs during the initializationJavaScriptCore.getJsGlobalScopeContainer(IPath, IJavaScriptProject),
JavaScriptCore#setJsGlobalScopeContainer(IPath, IJavaScriptProject[], IJsGlobalScopeContainer[], org.eclipse.core.runtime.IProgressMonitor),
IJsGlobalScopeContainerpublic java.lang.String[] containerSuperTypes()
IJsGlobalScopeContainerInitializer
containerSuperTypes in interface IJsGlobalScopeContainerInitializercontainerSuperTypes in class JsGlobalScopeContainerInitializerpublic java.lang.String getInferenceID()
IJsGlobalScopeContainerInitializer
getInferenceID in interface IJsGlobalScopeContainerInitializergetInferenceID in class JsGlobalScopeContainerInitializer
|
JavaScript Development Tools Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||