01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: /*
09: * Created on 18.03.2005
10: */
11: package de.uka.ilkd.key.gui.notification;
12:
13: import java.util.Iterator;
14:
15: import de.uka.ilkd.key.gui.notification.events.NotificationEvent;
16:
17: /**
18: * This task notifies the user about an unexpected error.
19: * @author bubel
20: */
21: public class GeneralFailureNotification extends NotificationTask {
22:
23: /**
24: * returns if this task should be executed in auto mode
25: * @return if true execute task even if in automode
26: */
27: protected boolean automodeEnabledTask() {
28: return true;
29: }
30:
31: /**
32: * @see NotificationTask#executeImpl(NotificationEvent, NotificationManager)
33: */
34: protected void executeImpl(NotificationEvent event,
35: NotificationManager manager) {
36: final Iterator actions = getActions();
37: while (actions.hasNext()) {
38: ((NotificationAction) actions.next()).execute(event);
39: }
40: }
41:
42: /**
43: * @return the event id of a general failure event
44: * @see NotificationEventID
45: */
46: public int getEventID() {
47: return NotificationEventID.GENERAL_FAILURE;
48: }
49:
50: }
|