Class BslRenameElementContext

  • All Implemented Interfaces:
    org.eclipse.xtext.ui.refactoring.IChangeRedirector.Aware, org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext

    public class BslRenameElementContext
    extends org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext.Impl
    Special IRenameElementContext.Impl for Bsl modules
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext

        org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext.Impl
    • Constructor Summary

      Constructors 
      Constructor Description
      BslRenameElementContext​(org.eclipse.emf.common.util.URI targetElementURI, org.eclipse.emf.ecore.EClass targetElementEClass, org.eclipse.emf.ecore.EObject targetObject, org.eclipse.emf.ecore.EObject initializeTargetObject)
      Constructor
      BslRenameElementContext​(org.eclipse.emf.common.util.URI targetElementURI, org.eclipse.emf.ecore.EClass targetElementEClass, org.eclipse.ui.IEditorPart triggeringEditor, ISelection triggeringEditorSelection, org.eclipse.emf.common.util.URI contextResourceURI, org.eclipse.emf.ecore.EObject targetObject, org.eclipse.emf.ecore.EObject initializeTargetObject)
      Constructor
    • Constructor Detail

      • BslRenameElementContext

        public BslRenameElementContext​(org.eclipse.emf.common.util.URI targetElementURI,
                                       org.eclipse.emf.ecore.EClass targetElementEClass,
                                       org.eclipse.emf.ecore.EObject targetObject,
                                       org.eclipse.emf.ecore.EObject initializeTargetObject)
        Constructor
        Parameters:
        targetElementURI - uri of the target element for refactoring
        targetElementEClass - eClass of the target element for refactoring
        targetObject - target object for refactoring
        initializeTargetObject - initial object for refactoring from selection
      • BslRenameElementContext

        public BslRenameElementContext​(org.eclipse.emf.common.util.URI targetElementURI,
                                       org.eclipse.emf.ecore.EClass targetElementEClass,
                                       org.eclipse.ui.IEditorPart triggeringEditor,
                                       ISelection triggeringEditorSelection,
                                       org.eclipse.emf.common.util.URI contextResourceURI,
                                       org.eclipse.emf.ecore.EObject targetObject,
                                       org.eclipse.emf.ecore.EObject initializeTargetObject)
        Constructor
        Parameters:
        targetElementURI - uri of the target element for refactoring
        targetElementEClass - eClass of the target element for refactoring
        triggeringEditor - editor where refactoring was called
        triggeringEditorSelection - refactoring initial selection
        contextResourceURI - resource uri
        targetObject - target object for refactoring
        initializeTargetObject - initial object for refactoring from selection
    • Method Detail

      • getTargetObject

        public org.eclipse.emf.ecore.EObject getTargetObject()
        Gets target object for refactoring
        Returns:
        target object for refactoring
      • getInitializeTargetObject

        public org.eclipse.emf.ecore.EObject getInitializeTargetObject()
        Gets initial object for refactoring from selection
        Returns:
        initial object for refactoring from selection
      • getModule

        public Module getModule()
        Gets actual Bsl module for target object of refactoring
        Returns:
        actual Bsl module for target object of refactoring, never null
      • isForStatementCounter

        public boolean isForStatementCounter()
        Checks that current refactoring context corresponding to the expression of the 'For' statement counter
        Returns:
        true if current refactoring context corresponding to the expression of the 'For' statement counter, false otherwise
      • setForStatementCounter

        public void setForStatementCounter​(boolean value)
        Sets that current refactoring context corresponding to the expression of the 'For' statement counter
        Parameters:
        value - true if current refactoring context corresponding to the expression of the 'For' statement counter, false otherwise
      • getForStatementUri

        public org.eclipse.emf.common.util.URI getForStatementUri()
        Gets URI corresponding to the 'For' statement if current refactoring context corresponding to the expression its counter
        Returns:
        URI corresponding to the 'For' statement if current refactoring context corresponding to the expression its counter, otherwise return null
      • getForStatementCounter

        public org.eclipse.emf.ecore.EObject getForStatementCounter()
        Gets expression corresponding to the 'For' statement counter if current refactoring context corresponding to the its
        Returns:
        expression corresponding to the 'For' statement counter if current refactoring context corresponding to the its, otherwise null will be returned
      • checkForStatementCounter

        protected boolean checkForStatementCounter​(ISelection selection,
                                                   org.eclipse.emf.ecore.EObject targetObject)
        Checks that selection object in the refactoring corresponding to the expression of ForStatement counter
        Parameters:
        selection - current selection in Bsl module, can't be null
        targetObject - actual refactoring object, can't be null
        Returns:
        true if selection object in the refactoring corresponding to the expression of ForStatement counter, false otherwise