Eclipse CDT
7.0

org.eclipse.cdt.core.model
Class LanguageMappingChangeEvent

java.lang.Object
  extended by org.eclipse.cdt.core.model.LanguageMappingChangeEvent
All Implemented Interfaces:
ILanguageMappingChangeEvent

public class LanguageMappingChangeEvent
extends java.lang.Object
implements ILanguageMappingChangeEvent

A minimal implementation of ILanguageMappingsChangeEvent.


Field Summary
 
Fields inherited from interface org.eclipse.cdt.core.model.ILanguageMappingChangeEvent
TYPE_FILE, TYPE_PROJECT, TYPE_WORKSPACE
 
Constructor Summary
LanguageMappingChangeEvent()
           
 
Method Summary
 IContentType[] getAffectedContentTypes()
          Returns an array of IContentTypes for which mappings have been changed, or an empty collection if there are no affected content types.
 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.
 java.lang.String getFilename()
          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.
 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.
 IProject getProject()
          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(IContentType[] affectedContentTypes)
          Sets the associated IContentTypes for this event.
 void setFile(IFile file)
          Sets the associated IFile for this event.
 void setFileName(java.lang.String fileName)
          Sets the associated String filename for this event.
 void setPath(IPath path)
          Sets the associated IPath for this event.
 void setProject(IProject project)
          Sets the associated project for this event.
 void setType(int type)
          Sets the type of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageMappingChangeEvent

public LanguageMappingChangeEvent()
Method Detail

getAffectedContentTypes

public 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 interface ILanguageMappingChangeEvent
Returns:
the content types for which mappings have been changed.

getFile

public 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 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.

getFilename

public java.lang.String 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 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.
See Also:
ILanguageMappingChangeEvent.getProject()

getPath

public 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 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. 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:
ILanguageMappingChangeEvent.getProject()

getProject

public 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 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.

getType

public int getType()
Description copied from interface: ILanguageMappingChangeEvent
Returns the type of even being reported.

Specified by:
getType in interface ILanguageMappingChangeEvent
Returns:
the type of even being reported
See Also:
ILanguageMappingChangeEvent.TYPE_WORKSPACE, ILanguageMappingChangeEvent.TYPE_PROJECT, ILanguageMappingChangeEvent.TYPE_FILE

setAffectedContentTypes

public void setAffectedContentTypes(IContentType[] affectedContentTypes)
Sets the associated IContentTypes for this event. The provided array will be returned subsequently by getAffectedContentTypes.

Parameters:
affectedContentTypes -

setFile

public void setFile(IFile file)
Sets the associated IFile for this event. This file will be returned subsequently by getFile().

Parameters:
file - the IFile to set

setFileName

public void setFileName(java.lang.String fileName)
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(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(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:
ILanguageMappingChangeEvent.TYPE_WORKSPACE, ILanguageMappingChangeEvent.TYPE_PROJECT, ILanguageMappingChangeEvent.TYPE_FILE

Eclipse CDT
7.0

Copyright (c) IBM Corp. and others 2004, 2012. All Rights Reserved.