Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.core.runtime.content.IContentType[] getAffectedContentTypes()
      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.
      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.
      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 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​(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 Detail

      • LanguageMappingChangeEvent

        public LanguageMappingChangeEvent()
    • Method Detail

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