Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…om [email protected]

git-svn-id: http://windowtester.googlecode.com/svn/trunk@13 dfedb853-a37c-be70-40fe-a5a6558f63ed
  • Loading branch information
[email protected] committed Jul 11, 2012
1 parent 70949f2 commit cc4b75d
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
*******************************************************************************/
package com.windowtester.eclipse.ui.session;

import java.util.ArrayList;
import java.util.List;

import com.windowtester.codegen.ExecutionProfile;
import com.windowtester.recorder.ISemanticEventProvider;
import com.windowtester.ui.internal.core.recorder.NullRecorder;
import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;

import com.windowtester.codegen.ExecutionProfile;
import com.windowtester.recorder.ISemanticEventProvider;
import com.windowtester.ui.internal.core.recorder.NullRecorder;

public class SessionMonitor implements ISessionMonitor {

Expand All @@ -40,9 +43,13 @@ public boolean inSession() {
return getCurrent() != nullSession();
}

public void sessionEnded(ISession session) {
for (ISessionListener listener: getListeners()) {
listener.ended(session);
public void sessionEnded(final ISession session) {
for (final ISessionListener listener: getListeners()) {
SafeRunner.run(new SafeRunnable() {
public void run() throws Exception {
listener.ended(session);
}
});
}
setSession(nullSession());
}
Expand Down

0 comments on commit cc4b75d

Please sign in to comment.