Class FixSession

java.lang.Object
com.e1c.g5.v8.dt.internal.check.qfix.FixSession
All Implemented Interfaces:
IFixSession

public class FixSession extends Object implements IFixSession
The EDT implementation of the IFixSession service
  • Constructor Details

    • FixSession

      public FixSession(Marker marker, CheckUid checkUid, IDtProject dtProject, IBmModelManager bmModelManager)
      Creates the instance of the fix session
      Parameters:
      marker - the problem marker, cannot be null
      checkUid - the check UID, cannot be null
      dtProject - the DT project, cannot be null
      bmModelManager - the BM model manager, cannot be null
  • Method Details

    • addContext

      public void addContext(IFixContext context)
      Adds quick fix context
      Parameters:
      context - the fix context to be added, cannot be null
    • addVariant

      public void addVariant(IFixContext context, FixVariantDescriptor descriptor, IFixVariant<?> fixVariant)
      Adds quick fix variant
      Parameters:
      context - the fix context, cannot be null
      descriptor - the fix descriptor, cannot be null
      fixVariant - the fix variant to be added, cannot be null
    • getCheckUid

      public CheckUid getCheckUid()
      Provides the check UID
      Returns:
      the checkUid, never null
    • getContext

      public IFixContext getContext(Class<? extends IFixContext> contextType)
      Provides the quick fix context by context type
      Parameters:
      contextType - the context type, canno be null
      Returns:
      the fix context, never null
    • getDtProject

      public IDtProject getDtProject()
      Description copied from interface: IFixSession
      Provides the DT project
      Specified by:
      getDtProject in interface IFixSession
      Returns:
      DT project, nevr null
    • getMarker

      public Marker getMarker()
      Provides the problem marker
      Returns:
      the marker, never null
    • getModelObject

      public IBmObject getModelObject(long targetObjectId)
      Description copied from interface: IFixSession
      Provides the model object by object ID
      Specified by:
      getModelObject in interface IFixSession
      Parameters:
      targetObjectId - object id
      Returns:
      IBmObject, can be null
    • getModule

      public Module getModule(org.eclipse.emf.common.util.URI targetModuleUri)
      Description copied from interface: IFixSession
      Provides the module by its URI
      Specified by:
      getModule in interface IFixSession
      Parameters:
      targetModuleUri - module URI, cannot be null
      Returns:
      module, can be null
    • getSessionState

      public FixSession.SessionState getSessionState()
      Provides the quick fix session state
      Returns:
      the sessionState, never null
    • selectVariant

      public void selectVariant(FixVariantDescriptor descriptor)
      Selects the particular quick fix variant by fix variant descriptor
      Parameters:
      descriptor - the fix variant descriptor, cannot be null
    • setSessionState

      public void setSessionState(FixSession.SessionState sessionState)
      Sets the current quick fix session state
      Parameters:
      sessionState - the sessionState to set, cannot be null
    • getSelectedFixVariant

      public IFixVariant<?> getSelectedFixVariant()
      Provides the selected quick fix variant
      Returns:
      selectedFixVariant, may return null
    • getSelectedFixContext

      public IFixContext getSelectedFixContext()
      Provides the selected fix context
      Returns:
      selectedFixContext, may return null
    • getBmModelManager

      public IBmModelManager getBmModelManager()
      Description copied from interface: IFixSession
      Provides the IBmModelManager
      Specified by:
      getBmModelManager in interface IFixSession
      Returns:
      the IBmModelManager, never null