Package org.eclipse.cdt.core.model
Class LanguageMappingChangeEvent
java.lang.Object
org.eclipse.cdt.core.model.LanguageMappingChangeEvent
- All Implemented Interfaces:
ILanguageMappingChangeEvent
A minimal implementation of ILanguageMappingsChangeEvent.
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Fields inherited from interface org.eclipse.cdt.core.model.ILanguageMappingChangeEvent
TYPE_FILE, TYPE_PROJECT, TYPE_WORKSPACE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.core.runtime.content.IContentType[]
Returns an array of IContentTypes for which mappings have been changed, or an empty collection if there are no affected content types.org.eclipse.core.resources.IFile
getFile()
Returns an IFile corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.Returns a String corresponding to the full path to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.org.eclipse.core.runtime.IPath
getPath()
Returns an IPath corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.org.eclipse.core.resources.IProject
Returns an IProject corresponding to the project for which settings have changed if this event's type is TYPE_PROJECT or TYPE_FILE, or null otherwise.int
getType()
Returns the type of even being reported.void
setAffectedContentTypes
(org.eclipse.core.runtime.content.IContentType[] affectedContentTypes) Sets the associated IContentTypes for this event.void
setFile
(org.eclipse.core.resources.IFile file) Sets the associated IFile for this event.void
setFileName
(String fileName) Sets the associated String filename for this event.void
setPath
(org.eclipse.core.runtime.IPath path) Sets the associated IPath for this event.void
setProject
(org.eclipse.core.resources.IProject project) Sets the associated project for this event.void
setType
(int type) Sets the type of this event.
-
Constructor Details
-
LanguageMappingChangeEvent
public LanguageMappingChangeEvent()
-
-
Method Details
-
getAffectedContentTypes
public org.eclipse.core.runtime.content.IContentType[] getAffectedContentTypes()Description copied from interface:ILanguageMappingChangeEvent
Returns an array of IContentTypes for which mappings have been changed, or an empty collection if there are no affected content types. Since there currently should be no change event unless a content type has changed, this should always contain at least one content type, but clients should theoretically be prepared to handle an empty collection.- Specified by:
getAffectedContentTypes
in interfaceILanguageMappingChangeEvent
- Returns:
- the content types for which mappings have been changed.
-
getFile
public org.eclipse.core.resources.IFile getFile()Description copied from interface:ILanguageMappingChangeEvent
Returns an IFile corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.- Specified by:
getFile
in interfaceILanguageMappingChangeEvent
- Returns:
- an IFile corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.
-
getFilename
Description copied from interface:ILanguageMappingChangeEvent
Returns a String corresponding to the full path to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise. In order to obtain the full context for the file it may be required that you also call getProject(), as it is possible that this file may not live inside the workspace.- Specified by:
getFilename
in interfaceILanguageMappingChangeEvent
- Returns:
- a String corresponding to the full path to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.
- See Also:
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:ILanguageMappingChangeEvent
Returns an IPath corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise.- Specified by:
getPath
in interfaceILanguageMappingChangeEvent
- Returns:
- an IPath corresponding to the file for which settings have changed if this event's type is TYPE_FILE, or null otherwise. In order to obtain the full context for the file it may be required that you also call getProject(), as it is possible that this file may not live inside the workspace.
- See Also:
-
getProject
public org.eclipse.core.resources.IProject getProject()Description copied from interface:ILanguageMappingChangeEvent
Returns an IProject corresponding to the project for which settings have changed if this event's type is TYPE_PROJECT or TYPE_FILE, or null otherwise.- Specified by:
getProject
in interfaceILanguageMappingChangeEvent
- Returns:
- an IProject corresponding to the project for which settings have changed if this event's type is TYPE_PROJECT or TYPE_FILE, or null otherwise.
-
getType
public int getType()Description copied from interface:ILanguageMappingChangeEvent
Returns the type of even being reported.- Specified by:
getType
in interfaceILanguageMappingChangeEvent
- Returns:
- the type of even being reported
- See Also:
-
setAffectedContentTypes
public void setAffectedContentTypes(org.eclipse.core.runtime.content.IContentType[] affectedContentTypes) Sets the associated IContentTypes for this event. The provided array will be returned subsequently by getAffectedContentTypes.- Parameters:
affectedContentTypes
-
-
setFile
public void setFile(org.eclipse.core.resources.IFile file) Sets the associated IFile for this event. This file will be returned subsequently by getFile().- Parameters:
file
- the IFile to set
-
setFileName
Sets the associated String filename for this event. This filename will be returned subsequently by getFileName().- Parameters:
fileName
- the fFileName to set
-
setPath
public void setPath(org.eclipse.core.runtime.IPath path) Sets the associated IPath for this event. This path will be returned subsequently by getPath().- Parameters:
path
- the IPath to set
-
setProject
public void setProject(org.eclipse.core.resources.IProject project) Sets the associated project for this event. This project will be returned subsequently by getProject().- Parameters:
project
- the IProject to set
-
setType
public void setType(int type) Sets the type of this event. This type will be returned by getType().- Parameters:
type
- the type to set- See Also:
-