Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-07-30 19:08:17 -0400
committerslewis2007-07-30 19:08:17 -0400
commita82a1e708d675e894e843c4e376c2360af650c14 (patch)
treeac7c662ae44a7f7c0b7e61766b9aefb30d29df46 /examples
parentb8d15bc90ffa94ddcd5629b9575fe9938dc46782 (diff)
downloadorg.eclipse.ecf-a82a1e708d675e894e843c4e376c2360af650c14.tar.gz
org.eclipse.ecf-a82a1e708d675e894e843c4e376c2360af650c14.tar.xz
org.eclipse.ecf-a82a1e708d675e894e843c4e376c2360af650c14.zip
Fix for roster entry drop target
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.webinar/src/org/eclipse/ecf/internal/examples/webinar/dnd/RosterEntryDropTarget.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bundles/org.eclipse.ecf.examples.webinar/src/org/eclipse/ecf/internal/examples/webinar/dnd/RosterEntryDropTarget.java b/examples/bundles/org.eclipse.ecf.examples.webinar/src/org/eclipse/ecf/internal/examples/webinar/dnd/RosterEntryDropTarget.java
index ba77ab752..1b4b069fa 100644
--- a/examples/bundles/org.eclipse.ecf.examples.webinar/src/org/eclipse/ecf/internal/examples/webinar/dnd/RosterEntryDropTarget.java
+++ b/examples/bundles/org.eclipse.ecf.examples.webinar/src/org/eclipse/ecf/internal/examples/webinar/dnd/RosterEntryDropTarget.java
@@ -5,7 +5,6 @@ import org.eclipse.ecf.presence.roster.IRosterItem;
import org.eclipse.ecf.presence.ui.dnd.IRosterViewerDropTarget;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.ui.PlatformUI;
public class RosterEntryDropTarget implements IRosterViewerDropTarget {
@@ -16,6 +15,7 @@ public class RosterEntryDropTarget implements IRosterViewerDropTarget {
TransferData transferType) {
if (rosterItem instanceof IRosterEntry) {
transferData = transferType;
+ rosterEntry = (IRosterEntry) rosterItem;
return true;
} else {
transferData = null;
@@ -25,10 +25,10 @@ public class RosterEntryDropTarget implements IRosterViewerDropTarget {
}
public boolean performDrop(Object data) {
- if (data instanceof String) {
+ if (data instanceof String && rosterEntry != null) {
// Right here, send data to channel
// sendString(rosterEntry.getUser().getID(),(String) data);
- MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(),"Roster Drop","The following text was dropped on "
+ MessageDialog.openInformation(null,"Drop on Entry","The following text was dropped on "
+ rosterEntry.getUser().getName() + ":\n\n" + data);
return true;
}

Back to the top