Class LanguageMappingChangeEvent

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

public class LanguageMappingChangeEvent extends Object implements 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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
    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
    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
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface ILanguageMappingChangeEvent
      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 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 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:
    • 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 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:
    • 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 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:
    • 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

      public void setFileName(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(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: