|
Eclipse CDT 7.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.core.model.LanguageManager
public class LanguageManager
Constructor Summary | |
---|---|
LanguageManager()
|
Method Summary | |
---|---|
java.util.ArrayList<java.lang.String> |
getAllContentTypes()
Deprecated. use getRegisteredContentTypes() instead. |
java.util.Map<java.lang.String,ILanguageDescriptor[]> |
getContentTypeIdToLanguageDescriptionsMap()
|
IContributedModelBuilder |
getContributedModelBuilderFor(ITranslationUnit tu)
|
IContributedModelBuilder |
getContributedModelBuilderFor(org.eclipse.cdt.internal.core.model.TranslationUnit tu)
Deprecated. use getContributedModelBuilderFor(ITranslationUnit) , instead. |
static LanguageManager |
getInstance()
|
ILanguage |
getLanguage(IContentType contentType)
|
ILanguage |
getLanguage(IContentType contentType,
IProject project)
Returns language binding to a particular content type for given project. |
ILanguage |
getLanguage(IContentType contentType,
IProject project,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configurationDescription)
Returns language binding to a particular content type for given project. |
ILanguage |
getLanguage(java.lang.String id)
|
org.eclipse.cdt.core.language.ProjectLanguageConfiguration |
getLanguageConfiguration(IProject project)
Returns the language configuration for the given project. |
ILanguageDescriptor |
getLanguageDescriptor(java.lang.String id)
|
ILanguageDescriptor[] |
getLanguageDescriptors()
|
ILanguage |
getLanguageForContentTypeID(java.lang.String contentTypeID)
|
ILanguage |
getLanguageForFile(IFile file,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration)
Returns an ILanguage representing the language to be used for the given file. |
ILanguage |
getLanguageForFile(IFile file,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration,
java.lang.String contentTypeId)
Returns an ILanguage representing the language to be used for the given file. |
ILanguage |
getLanguageForFile(IPath pathToFile,
IProject project,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration)
Returns an ILanguage representing the language to be used for the given file. |
ILanguage |
getLanguageForFile(IPath pathToFile,
IProject project,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration,
java.lang.String contentTypeID)
Returns an ILanguage representing the language to be used for the given file. |
ILanguage |
getLanguageForFile(java.lang.String fullPathToFile,
IProject project,
org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration)
Returns an ILanguage representing the language to be used for the given file. |
java.util.Map<java.lang.String,org.eclipse.cdt.internal.core.pdom.dom.IPDOMLinkageFactory> |
getPDOMLinkageFactoryMappings()
Returns mappings between IDs and IPDOMLinkageFactory. |
java.lang.String[] |
getRegisteredContentTypeIds()
Returns all content types that are registered with CDT. |
ILanguage[] |
getRegisteredLanguages()
Returns all of the languages registered with the Platform . |
org.eclipse.cdt.core.language.WorkspaceLanguageConfiguration |
getWorkspaceLanguageConfiguration()
Returns the language configuration for the workspace. |
boolean |
isContributedContentType(java.lang.String contentTypeId)
|
void |
notifyLanguageChangeListeners(ILanguageMappingChangeEvent event)
Notifies all language mappings change listeners of a change in the mappings. |
void |
registerLanguageChangeListener(ILanguageMappingChangeListener listener)
Adds a listener that will be notified of changes in language mappings. |
void |
storeLanguageMappingConfiguration(IFile file)
Saves the language configuration for the given file to persistent storage and notifies all ILanguageMappingChangeListeners
of changes. |
void |
storeLanguageMappingConfiguration(IProject project,
IContentType[] affectedContentTypes)
Saves the language configuration for the given project to persistent storage and notifies all ILanguageMappingChangeListeners
of changes. |
void |
storeWorkspaceLanguageConfiguration(IContentType[] affectedContentTypes)
Saves the workspace language configuration to persistent storage and notifies all ILanguageMappingChangeListeners of changes. |
void |
unregisterLanguageChangeListener(ILanguageMappingChangeListener listener)
Removes a language mapping change listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LanguageManager()
Method Detail |
---|
public static LanguageManager getInstance()
public ILanguageDescriptor getLanguageDescriptor(java.lang.String id)
public ILanguageDescriptor[] getLanguageDescriptors()
public java.util.Map<java.lang.String,ILanguageDescriptor[]> getContentTypeIdToLanguageDescriptionsMap()
public ILanguage getLanguage(java.lang.String id)
public ILanguage getLanguage(IContentType contentType)
public ILanguage getLanguageForContentTypeID(java.lang.String contentTypeID)
@Deprecated public java.util.ArrayList<java.lang.String> getAllContentTypes()
public java.lang.String[] getRegisteredContentTypeIds()
public boolean isContributedContentType(java.lang.String contentTypeId)
@Deprecated public IContributedModelBuilder getContributedModelBuilderFor(org.eclipse.cdt.internal.core.model.TranslationUnit tu)
getContributedModelBuilderFor(ITranslationUnit)
, instead.
public IContributedModelBuilder getContributedModelBuilderFor(ITranslationUnit tu)
public java.util.Map<java.lang.String,org.eclipse.cdt.internal.core.pdom.dom.IPDOMLinkageFactory> getPDOMLinkageFactoryMappings()
ILinkage
.
public ILanguage[] getRegisteredLanguages()
Platform
.
Platform
.public org.eclipse.cdt.core.language.WorkspaceLanguageConfiguration getWorkspaceLanguageConfiguration() throws CoreException
CoreException
public void storeWorkspaceLanguageConfiguration(IContentType[] affectedContentTypes) throws CoreException
ILanguageMappingChangeListeners
of changes.
affectedContentTypes
-
CoreException
public org.eclipse.cdt.core.language.ProjectLanguageConfiguration getLanguageConfiguration(IProject project) throws CoreException
project
-
CoreException
public void storeLanguageMappingConfiguration(IProject project, IContentType[] affectedContentTypes) throws CoreException
ILanguageMappingChangeListeners
of changes.
project
- affectedContentTypes
-
CoreException
public ILanguage getLanguageForFile(java.lang.String fullPathToFile, IProject project, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration) throws CoreException
fullPathToFile
- the full path to the file for which the language is requestedproject
- the IProject that this file is in the context of. This field cannot be null.configuration
- the active build configuration, or null
if build configurations
are not relevant to determining the language.
CoreException
public ILanguage getLanguageForFile(IPath pathToFile, IProject project, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration) throws CoreException
pathToFile
- the path to the file for which the language is requested.
The path can be either workspace or project relative.project
- the project that this file should be parsed in context of. This field is optional and may
be set to null. If the project is null then this method tries to determine the project context via workspace APIs.configuration
- the active build configuration, or null
if build configurations
are not relevant to determining the language.
CoreException
public ILanguage getLanguageForFile(IPath pathToFile, IProject project, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration, java.lang.String contentTypeID) throws CoreException
pathToFile
- the path to the file for which the language is requested.
The path can be either workspace or project relative.project
- the project that this file should be parsed in context of. This field is optional and may
be set to null. If the project is null then this method tries to determine the project context via workspace APIs.configuration
- the active build configuration, or null
if build configurations
are not relevant to determining the language.contentTypeID
- id of the content type, may be null
.
CoreException
public ILanguage getLanguageForFile(IFile file, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration) throws CoreException
file
- the file for which the language is requestedconfiguration
- the active build configuration, or null
if build configurations
are not relevant to determining the language.
CoreException
public ILanguage getLanguageForFile(IFile file, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configuration, java.lang.String contentTypeId) throws CoreException
file
- the file for which the language is requestedconfiguration
- the active build configuration, or null
if build configurations
are not relevant to determining the language.contentTypeId
- id of the content type, may be null
.
CoreException
public void registerLanguageChangeListener(ILanguageMappingChangeListener listener)
listener
- the ILanguageMappingChangeListener to addpublic void unregisterLanguageChangeListener(ILanguageMappingChangeListener listener)
listener
- the ILanguageMappingChangeListener to remove.public void notifyLanguageChangeListeners(ILanguageMappingChangeEvent event)
event
- the ILanguageMappingsChange event to be broadcast.public void storeLanguageMappingConfiguration(IFile file) throws CoreException
ILanguageMappingChangeListeners
of changes.
file
-
CoreException
public ILanguage getLanguage(IContentType contentType, IProject project)
contentType
- content type of the fileproject
- C/C++ workspace project
public ILanguage getLanguage(IContentType contentType, IProject project, org.eclipse.cdt.core.settings.model.ICConfigurationDescription configurationDescription)
contentType
- content type of the fileproject
- C/C++ workspace projectconfigurationDescription
- build configuration or null
|
Eclipse CDT 7.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |