summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 14:51:21 (EDT)
committerEike Stepper2007-10-11 14:51:21 (EDT)
commitd4447288d6f23ec586978bd1c2c40786998d5c94 (patch)
treed7edde3e0e947c7b021a02b92fc9c223f159f515
parent82e196ada43372fec0a9c9aa429a73964a5dede5 (diff)
downloadcdo-d4447288d6f23ec586978bd1c2c40786998d5c94.zip
cdo-d4447288d6f23ec586978bd1c2c40786998d5c94.tar.gz
cdo-d4447288d6f23ec586978bd1c2c40786998d5c94.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java35
1 files changed, 31 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
index f47102d..999650f 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
@@ -224,12 +224,39 @@ public class CollaborationsPane extends Composite implements IListener
collaboration.removeListener(this);
}
- protected void facilityInstalled(IFacility facility, boolean fromRemote)
+ protected void facilityInstalled(final IFacility facility, boolean fromRemote)
{
- addFacilityPane(facility);
- if (!fromRemote)
+ final IBuddyCollaboration collaboration = (IBuddyCollaboration)facility.getCollaboration();
+ if (fromRemote)
{
- IBuddyCollaboration collaboration = (IBuddyCollaboration)facility.getCollaboration();
+ try
+ {
+ getDisplay().syncExec(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ addFacilityPane(facility);
+ IFacility activeFacility = activeFacilities.get(collaboration);
+ if (activeFacility == null)
+ {
+ setActiveFacility(collaboration, facility);
+ }
+ }
+ catch (RuntimeException ignore)
+ {
+ }
+ }
+ });
+ }
+ catch (RuntimeException ignore)
+ {
+ }
+ }
+ else
+ {
+ addFacilityPane(facility);
setActiveCollaboration(collaboration);
setActiveFacility(collaboration, facility);
}