public final class DefaultMenuProvider extends Object implements MenuProvider
Constructor and Description |
---|
DefaultMenuProvider()
Default constructor.
|
DefaultMenuProvider(ChildrenDescriptorCollector childrenDescriptorCollector,
Collection<MasterDetailAction> rightClickActions,
CreateElementCallback createElementCallback,
DeleteActionBuilder deleteActionBuilder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Menu |
getMenu(org.eclipse.jface.viewers.TreeViewer treeViewer,
org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Returns the menu which will be added to the tree.
|
void |
setCreateElementCallback(CreateElementCallback createElementCallback) |
void |
setDeleteAction(DeleteActionBuilder deleteActionBuilder) |
void |
setRightClickAction(Collection<MasterDetailAction> rightClickActions) |
public DefaultMenuProvider()
public DefaultMenuProvider(ChildrenDescriptorCollector childrenDescriptorCollector, Collection<MasterDetailAction> rightClickActions, CreateElementCallback createElementCallback, DeleteActionBuilder deleteActionBuilder)
childrenDescriptorCollector
- the child description collector to userightClickActions
- the right click actions to usecreateElementCallback
- the create element callbackdeleteActionBuilder
- the delete action which will be added to the context menupublic org.eclipse.swt.widgets.Menu getMenu(org.eclipse.jface.viewers.TreeViewer treeViewer, org.eclipse.emf.edit.domain.EditingDomain editingDomain)
MenuProvider
getMenu
in interface MenuProvider
treeViewer
- the treeviewereditingDomain
- the editing domainpublic void setDeleteAction(DeleteActionBuilder deleteActionBuilder)
deleteActionBuilder
- the DeleteActionBuilder
public void setCreateElementCallback(CreateElementCallback createElementCallback)
createElementCallback
- the CreateElementCallback
public void setRightClickAction(Collection<MasterDetailAction> rightClickActions)
rightClickActions
- the actions
Copyright © 2016. All rights reserved.