diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.lifecycle')
2 files changed, 8 insertions, 9 deletions
diff --git a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java index 68f36e4b520..46baaaa32b1 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java @@ -25,12 +25,13 @@ import org.eclipse.osee.framework.jdk.core.type.HashCollection; public class LifecycleServiceImpl implements ILifecycleService { private final HashCollection<AbstractLifecycleVisitor.Type<?>, LifecycleHandler> handlersByType = - new HashCollection<AbstractLifecycleVisitor.Type<?>, LifecycleHandler>(); + new HashCollection<AbstractLifecycleVisitor.Type<?>, LifecycleHandler>(); private final HashCollection<String, LifecycleHandler> handlersById = new HashCollection<String, LifecycleHandler>(); public LifecycleServiceImpl() { } + @Override public Collection<AbstractLifecycleVisitor.Type<?>> getHandlerTypes() { return handlersByType.keySet(); } @@ -40,6 +41,7 @@ public class LifecycleServiceImpl implements ILifecycleService { return (ArrayList<H>) handlersByType.getValues(type); } + @Override public <H extends LifecycleHandler> IStatus dispatch(IProgressMonitor monitor, AbstractLifecycleVisitor<H> visitor, String sourceId) { AbstractLifecycleVisitor.Type<H> type = visitor.getAssociatedType(); IStatus status = null; @@ -55,11 +57,13 @@ public class LifecycleServiceImpl implements ILifecycleService { return status; } + @Override public int getHandlerCount(AbstractLifecycleVisitor.Type<?> type) { ArrayList<?> handlers = get(type); return handlers == null ? 0 : handlers.size(); } + @Override public <H extends LifecycleHandler> void addHandler(AbstractLifecycleVisitor.Type<H> type, final H handler) throws OseeCoreException { Conditions.checkNotNull(type, "handler type"); Conditions.checkNotNull(handler, "handler"); @@ -68,6 +72,7 @@ public class LifecycleServiceImpl implements ILifecycleService { handlersById.put("", handler); } + @Override public <H extends LifecycleHandler> void removeHandler(AbstractLifecycleVisitor.Type<H> type, final H handler) throws OseeCoreException { Conditions.checkNotNull(type, "handler type"); Conditions.checkNotNull(handler, "handler"); diff --git a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/internal/Activator.java b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/internal/Activator.java index 7dcd4b583be..dc387c4fb57 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/internal/Activator.java +++ b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/internal/Activator.java @@ -27,18 +27,12 @@ public class Activator implements BundleActivator { public Activator() { } - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ + @Override public void start(BundleContext context) throws Exception { service = context.registerService(ILifecycleService.class.getName(), new LifecycleServiceImpl(), null); } - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ + @Override public void stop(BundleContext context) throws Exception { service.unregister(); } |