Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 85e1f7a7aff375c8639237a8b23b5be20634d674 (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
package org.eclipse.ecf.internal.examples.webinar.util.rosterentry;

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() {
		final IRosterEntry entry = getSelectedRosterEntry();
		if (entry != null) {
			IAction action = new Action() {
				public void run() {
					System.out.println("running action for "+entry.getName());
				}
			};
			action.setText("Super duper addon");
			action.setImageDescriptor(PlatformUI.getWorkbench()
					.getSharedImages().getImageDescriptor(
							ISharedImages.IMG_DEF_VIEW));
			return new IAction[] { action };
		}
		return null;
	}

}

Back to the top