Пример #1
0
 @Override
 public boolean close() {
   recordingSupport.setMode(RecordingMode.Stopped);
   if (isDirty()) {
     if (!openSaveDialog()) {
       return false;
     }
   }
   final boolean result = super.close();
   if (result && !parentShell.isDisposed()) {
     dbc.dispose();
     parentShell.removeShellListener(closeListener);
     parentShell.setMinimized(false);
     try {
       ShellUtilsProvider.getShellUtils().forceActive(parentShell);
     } catch (CoreException e) {
       throw new RuntimeException(e);
     }
     parentShell.setFocus();
     ITestCase model = getModel();
     if (model != null && model.exists()) {
       IFile location = (IFile) model.getResource();
       if (location != null) {
         try {
           IDE.openEditor(Q7UIPlugin.getActiveWindow().getActivePage(), location);
         } catch (PartInitException e) {
           Q7UIPlugin.log(e);
         }
       }
     }
   }
   RecordingContextManager.Instance.deactivateContext();
   return result;
 }
Пример #2
0
 @Override
 public int open() {
   final int result = super.open();
   parentShell.setMinimized(true);
   getShell().setVisible(true);
   recordingSupport.setMode(RecordingMode.Connecting);
   return result;
 }
Пример #3
0
 private void handleStopRecordShortcutPressed(KeySequence sequence) {
   TriggerSequence[] shortcuts = RecordingContextManager.Instance.getStopRecordShortcuts();
   if (shortcuts != null) {
     for (TriggerSequence s : shortcuts) {
       if (sequence.equals(s)) {
         recordingSupport.setMode(RecordingMode.Stopped);
       }
     }
   }
 }