|
Eclipse CDT Pre-release 3.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
Constructor Summary | |
---|---|
LanguageManager()
|
Method Summary | |
---|---|
ArrayList |
getAllContentTypes()
Deprecated. use getRegisteredContentTypes() instead. |
Map |
getContentTypeIdToLanguageDescriptionsMap()
|
IContributedModelBuilder |
getContributedModelBuilderFor(org.eclipse.cdt.internal.core.model.TranslationUnit tu)
|
static LanguageManager |
getInstance()
|
ILanguage |
getLanguage(String id)
|
org.eclipse.cdt.core.language.ProjectLanguageConfiguration |
getLanguageConfiguration(IProject project)
Returns the language configuration for the given project. |
ILanguageDescriptor |
getLanguageDescriptor(String id)
|
ILanguageDescriptor[] |
getLanguageDescriptors()
|
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,
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,
String contentTypeID)
Returns an ILanguage representing the language to be used for the given file. |
ILanguage |
getLanguageForFile(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. |
Map |
getPDOMLinkageFactoryMappings()
Returns mappings between IDs and IPDOMLinkageFactory. |
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(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(String id)
public ILanguageDescriptor[] getLanguageDescriptors()
public Map getContentTypeIdToLanguageDescriptionsMap()
public ILanguage getLanguage(String id)
public ArrayList getAllContentTypes()
public String[] getRegisteredContentTypeIds()
public boolean isContributedContentType(String contentTypeId)
public IContributedModelBuilder getContributedModelBuilderFor(org.eclipse.cdt.internal.core.model.TranslationUnit tu)
public Map 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(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, 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, 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.
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
|
Eclipse CDT Pre-release 3.0 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |