Class RenameResource

  • All Implemented Interfaces:
    IQuickFixer, org.eclipse.ui.IMarkerResolution, org.eclipse.ui.IMarkerResolution2

    public class RenameResource
    extends QuickFixAdapter
    Fixes a problem with the resource name by renaming the resource. This is typically used when a file is located in a project folder and has a name that is not valid, e.g. wrong file extension, or a name that is invalid.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringID
      The ID "RenameResource".
    • Constructor Summary

      Constructors 
      ConstructorDescription
      RenameResource() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetDescription()
      Returns optional additional information about the resolution.
      java.lang.StringgetLabel()
      Returns a short label indicating what the resolution will do.
      voidrun​(org.eclipse.core.resources.IMarker marker)
      Runs this resolution.
      • Methods inherited from class org.eclipse.ui.views.markers.WorkbenchMarkerResolution

        run
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • RenameResource

        public RenameResource()
    • Method Detail

      • run

        public void run​(org.eclipse.core.resources.IMarker marker)
        Runs this resolution.
        Specified by:
        run in interface org.eclipse.ui.IMarkerResolution
        Specified by:
        run in interface IQuickFixer
        Specified by:
        run in class QuickFixAdapter
        Parameters:
        marker - the marker to resolve.
      • getLabel

        public java.lang.String getLabel()
        Returns a short label indicating what the resolution will do.
        Specified by:
        getLabel in interface org.eclipse.ui.IMarkerResolution
        Specified by:
        getLabel in interface IQuickFixer
        Specified by:
        getLabel in class QuickFixAdapter
        Returns:
        a short label for this resolution
      • getDescription

        public java.lang.String getDescription()
        Returns optional additional information about the resolution. The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice.
        Specified by:
        getDescription in interface org.eclipse.ui.IMarkerResolution2
        Overrides:
        getDescription in class QuickFixAdapter
        Returns:
        the additional information or null