summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-02-24 03:49:53 (EST)
committerEike Stepper2007-02-24 03:49:53 (EST)
commit9450bf44cf9d77c6c8c2edd49d188f9a05ecbf63 (patch)
tree3ee83413147a7bf5f375ff086cadaa9ad379e9db
parente67743ae73da7e330e6e202b00dba8fc56a2ad83 (diff)
downloadcdo-9450bf44cf9d77c6c8c2edd49d188f9a05ecbf63.zip
cdo-9450bf44cf9d77c6c8c2edd49d188f9a05ecbf63.tar.gz
cdo-9450bf44cf9d77c6c8c2edd49d188f9a05ecbf63.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Lifecycle.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleImpl.java30
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java19
3 files changed, 20 insertions, 31 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Lifecycle.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Lifecycle.java
index 425d813..ca22795 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Lifecycle.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/Lifecycle.java
@@ -15,7 +15,7 @@ package org.eclipse.net4j.util.lifecycle;
*/
public interface Lifecycle
{
- public void activate() throws LifecycleException;
+ public void activate() throws Exception;
public Exception deactivate();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleImpl.java
index 1c5dd68..7822d50 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleImpl.java
@@ -50,7 +50,7 @@ public class LifecycleImpl implements Lifecycle, LifecycleNotifier
listeners.remove(listener);
}
- public final synchronized void activate() throws LifecycleException
+ public final synchronized void activate() throws Exception
{
if (!active)
{
@@ -59,38 +59,14 @@ public class LifecycleImpl implements Lifecycle, LifecycleNotifier
TRACER.trace("Activating " + this);//$NON-NLS-1$
}
- try
- {
- onAboutToActivate();
- }
- catch (RuntimeException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new LifecycleException(ex);
- }
-
+ onAboutToActivate();
fireLifecycleAboutToActivate();
if (DUMPER.isEnabled())
{
DUMPER.trace("DUMP" + ReflectUtil.toString(this)); //$NON-NLS-1$
}
- try
- {
- onActivate();
- }
- catch (RuntimeException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new LifecycleException(ex);
- }
-
+ onActivate();
active = true;
fireLifecycleActivated();
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
index 159c834..140dfb2 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
@@ -60,19 +60,32 @@ public final class LifecycleUtil
return true;
}
- public static void activate(Object object) throws Exception
+ public static void activate(Object object)
{
activate(object, false);
}
/**
+ * @throws Exception
+ * TODO
* @see Activator
*/
- public static void activate(Object object, boolean useAnnotation) throws LifecycleException
+ public static void activate(Object object, boolean useAnnotation)
{
if (object instanceof Lifecycle)
{
- ((Lifecycle)object).activate();
+ try
+ {
+ ((Lifecycle)object).activate();
+ }
+ catch (RuntimeException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new LifecycleException(ex);
+ }
}
else if (useAnnotation)
{