Class ChangeCorrectionProposalCore

    • Field Detail

      • fChange

        protected Change fChange
      • fName

        protected String fName
      • fRelevance

        protected int fRelevance
    • Constructor Detail

      • ChangeCorrectionProposalCore

        public ChangeCorrectionProposalCore​(String name,
                                            Change change,
                                            int relevance)
        Constructs a change correction proposal.
        name - the name that is displayed in the proposal selection dialog
        change - the change that is executed when the proposal is applied or null if the change will be created by implementors of createChange()
        relevance - the relevance of this proposal
    • Method Detail

      • performChange

        protected void performChange()
                              throws CoreException
        Performs the change associated with this proposal.

        Subclasses may extend, but must call the super implementation.

        CoreException - when the invocation of the change failed
      • getName

        public String getName()
        Returns the name of the proposal.
        the name of the proposal
      • getChange

        public Change getChange()
                         throws CoreException
        Returns the change that will be executed when the proposal is applied. This method calls createChange() to compute the change.
        the change for this proposal, can be null in rare cases if creation of the change failed
        CoreException - when the change could not be created
      • createChange

        protected Change createChange()
                               throws CoreException
        Creates the change for this proposal. This method is only called once and only when no change has been passed in {#ChangeCorrectionProposal(String, Change, int, Image)}. Subclasses may override.
        the created change
        CoreException - if the creation of the change failed
      • setDisplayName

        public void setDisplayName​(String name)
        Sets the display name.
        name - the name to set
      • getRelevance

        public int getRelevance()
      • setRelevance

        public void setRelevance​(int relevance)
        Sets the relevance.
        relevance - the relevance to set
        See Also: