Exemplo n.º 1
0
 @Inject
 @Optional
 private void whenModelIsDisposed(
     @UIEventTopic(RobotModelEvents.SUITE_MODEL_DISPOSED) final RobotElementChange change) {
   if (change.getElement() instanceof RobotSuiteFile
       && change.getKind() == Kind.CHANGED
       && viewer != null) {
     final RobotSuiteFile suiteFile = (RobotSuiteFile) change.getElement();
     viewer.refresh(suiteFile.getSuiteFile().getFile());
   }
 }
Exemplo n.º 2
0
 @Inject
 @Optional
 private void whenFileChangesExternally(
     @UIEventTopic(RobotModelEvents.EXTERNAL_MODEL_CHANGE) final RobotElementChange change) {
   if (change.getElement() instanceof RobotSuiteFile
       && change.getKind() == Kind.CHANGED
       && viewer != null) {
     final RobotSuiteFile suiteFile = (RobotSuiteFile) change.getElement();
     viewer.refresh(suiteFile.getSuiteFile().getFile());
   }
 }