diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java new file mode 100644 index 000000000..c9a261922 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2010, 2013 Tasktop Technologies and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tasktop Technologies - initial API and implementation + * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer + *******************************************************************************/ + +package org.eclipse.tcf.te.ui.notifications.internal; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.IConfigurationElement; + +/** + * @author Steffen Pingel + */ +public class NotificationCategory extends NotificationElement { + + private final List<NotificationEvent> events; + + public NotificationCategory(IConfigurationElement element) { + super(element); + this.events = new ArrayList<NotificationEvent>(); + } + + public void addEvent(NotificationEvent event) { + event.setCategory(this); + events.add(event); + } + + public List<NotificationEvent> getEvents() { + return events; + } + + public void removeEvent(NotificationEvent event) { + event.setCategory(null); + events.remove(event); + } + +} |