Class AddVSParticipant

All Implemented Interfaces:
IQuickFix, IQuickFixer, IMarkerResolution, IMarkerResolution2

public class AddVSParticipant extends QuickFixAdapter implements IQuickFix
Fixes a VirtualSpace participant reference whose VirtualSpace does not list the participant by adding the missing entry to the VirtualSpace's participant list, the repair "Fix back-references" in the VirtualSpace reference editor performs. The reference itself is kept.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • AddVSParticipant

      public AddVSParticipant()
      Constructs the quick-fixer with default constructor for Eclipse.
    • AddVSParticipant

      protected AddVSParticipant(GProp<?> property)
      Creates a quick-fixer for the VirtualSpace reference property of a participant.
      Parameters:
      property - The VirtualSpace reference property.
  • Method Details

    • getAttributes

      public Map<String,Object> getAttributes()
      Gets the attributes for the marker.
      Specified by:
      getAttributes in interface IQuickFix
    • run

      public void run(IMarker marker)
      Runs this resolution.
      Specified by:
      run in interface IMarkerResolution
      Specified by:
      run in interface IQuickFixer
      Specified by:
      run in class QuickFixAdapter
      Parameters:
      marker - the marker to resolve.
    • addEntry

      public static String addEntry(GProp<?> gp, IPropUndoRedo undoRedo)
      Adds the participant to the list of the VirtualSpace its reference names, as one operation of the undo history. The reference is kept as it is.
      Parameters:
      gp - The VirtualSpace reference property of the participant.
      undoRedo - The undo/redo instance.
      Returns:
      null for success, also when the list already had the entry, otherwise the error message.
    • getID

      public String getID()
      Returns the ID of the Quick Fixer.
      Specified by:
      getID in interface IQuickFix
    • getLabel

      public String getLabel()
      Gets the label of the quick fixer.
      Specified by:
      getLabel in interface IMarkerResolution
      Specified by:
      getLabel in interface IQuickFixer
      Specified by:
      getLabel in class QuickFixAdapter
      Returns:
      a short label for this resolution