Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-06-27 18:35:57 +0000
committerEike Stepper2009-06-27 18:35:57 +0000
commitb59b470e6e45f6798ee6228c4824362117ac0970 (patch)
tree5e1c5f231e5eadaf811609e4fba4347ac7d9584a /plugins/org.eclipse.net4j.buddies.common
parentc91d567778f89131339f176678b2dfaad4af0f09 (diff)
downloadcdo-b59b470e6e45f6798ee6228c4824362117ac0970.tar.gz
cdo-b59b470e6e45f6798ee6228c4824362117ac0970.tar.xz
cdo-b59b470e6e45f6798ee6228c4824362117ac0970.zip
[281749] Consolidate API of IEvent sub interfaces
https://bugs.eclipse.org/bugs/show_bug.cgi?id=281749
Diffstat (limited to 'plugins/org.eclipse.net4j.buddies.common')
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IBuddyStateEvent.java7
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IFacilityInstalledEvent.java7
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java7
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java15
4 files changed, 22 insertions, 14 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IBuddyStateEvent.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IBuddyStateEvent.java
index 5f04b2c648..d7c8dde4f1 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IBuddyStateEvent.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IBuddyStateEvent.java
@@ -4,7 +4,7 @@
* 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:
* Eike Stepper - initial API and implementation
*/
@@ -17,7 +17,10 @@ import org.eclipse.net4j.util.event.IEvent;
*/
public interface IBuddyStateEvent extends IEvent
{
- public IBuddy getBuddy();
+ /**
+ * @since 3.0
+ */
+ public IBuddy getSource();
public IBuddy.State getOldState();
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IFacilityInstalledEvent.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IFacilityInstalledEvent.java
index b8add81b5e..ca1ac0803e 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IFacilityInstalledEvent.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/IFacilityInstalledEvent.java
@@ -4,7 +4,7 @@
* 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:
* Eike Stepper - initial API and implementation
*/
@@ -17,7 +17,10 @@ import org.eclipse.net4j.util.event.IEvent;
*/
public interface IFacilityInstalledEvent extends IEvent
{
- public ICollaboration getCollaboration();
+ /**
+ * @since 3.0
+ */
+ public ICollaboration getSource();
public IFacility getFacility();
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
index 8ec04b0815..9e57211420 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Buddy.java
@@ -4,7 +4,7 @@
* 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:
* Eike Stepper - initial API and implementation
*/
@@ -195,9 +195,10 @@ public abstract class Buddy extends MembershipContainer implements IBuddy
this.newState = newState;
}
- public IBuddy getBuddy()
+ @Override
+ public IBuddy getSource()
{
- return Buddy.this;
+ return (IBuddy)super.getSource();
}
public State getOldState()
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
index 16cba64e5e..4f1d6fef51 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
@@ -4,7 +4,7 @@
* 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:
* Eike Stepper - initial API and implementation
*/
@@ -149,7 +149,7 @@ public class Collaboration extends MembershipContainer implements ICollaboration
if (!facilities.containsKey(type))
{
facilities.put(type, facility);
- fireEvent(new FacilityInstalledEvent(facility, remote));
+ fireEvent(new FacilityInstalledEvent(this, facility, remote));
facility.addListener(this);
return true;
}
@@ -250,7 +250,7 @@ public class Collaboration extends MembershipContainer implements ICollaboration
/**
* @author Eike Stepper
*/
- private final class FacilityInstalledEvent extends Event implements IFacilityInstalledEvent
+ private static final class FacilityInstalledEvent extends Event implements IFacilityInstalledEvent
{
private static final long serialVersionUID = 1L;
@@ -258,16 +258,17 @@ public class Collaboration extends MembershipContainer implements ICollaboration
private boolean remote;
- public FacilityInstalledEvent(IFacility facility, boolean remote)
+ public FacilityInstalledEvent(ICollaboration source, IFacility facility, boolean remote)
{
- super(Collaboration.this);
+ super(source);
this.facility = facility;
this.remote = remote;
}
- public ICollaboration getCollaboration()
+ @Override
+ public ICollaboration getSource()
{
- return Collaboration.this;
+ return (ICollaboration)super.getSource();
}
public IFacility getFacility()

Back to the top