blob: 8e9a76bf03075dbf725f44710d151ea2f7ccab94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package org.eclipse.ecf.internal.examples.webinar;
import org.eclipse.ecf.presence.roster.IRosterEntry;
import org.eclipse.ecf.presence.ui.roster.AbstractRosterEntryContributionItem;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
public class RosterEntryContributionItem1 extends AbstractRosterEntryContributionItem {
/* (non-Javadoc)
* @see org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem#makeActions()
*/
protected IAction[] makeActions() {
IAction action = null;
IRosterEntry entry = getSelectedRosterEntry();
if (entry != null) {
action = new Action() {
public void run() {
IRosterEntry rosterEntry = getSelectedRosterEntry();
System.out.println("running action for roster entry "+rosterEntry.getName());
}
};
action.setText("Send info to "+getSelectedRosterEntry().getName());
action.setImageDescriptor(PlatformUI.getWorkbench()
.getSharedImages().getImageDescriptor(
ISharedImages.IMG_DEF_VIEW));
return new IAction[] { action };
}
return null;
}
}
|