The context bar contains controls for the current module and other context; for example, the current part. You can access the context bar using the following statement:
contextBar = getAFXApp().getAFXMainWindow().getContextBar()