public class CutCopyPasteListener extends Object implements org.eclipse.swt.events.KeyListener, org.eclipse.jface.viewers.ISelectionChangedListener
TableViewer
and register the according EMF
Cut/Copy/Paste-Actions. They are triggered using keybindings.Constructor and Description |
---|
CutCopyPasteListener(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.edit.domain.EditingDomain editingDomain,
org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Constructs this listener.
|
Modifier and Type | Method and Description |
---|---|
void |
keyPressed(org.eclipse.swt.events.KeyEvent e) |
void |
keyReleased(org.eclipse.swt.events.KeyEvent e) |
void |
rootDomainModelChanged(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Called to notify this listener that the domain model has changed.
|
void |
selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event) |
public CutCopyPasteListener(org.eclipse.jface.viewers.TableViewer tableViewer, org.eclipse.emf.edit.domain.EditingDomain editingDomain, org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
tableViewer
- the TableViewer
editingDomain
- the EditingDomain
(contains the used clipboard)setting
- the parent EObject on which the paste will be performedpublic void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
selectionChanged
in interface org.eclipse.jface.viewers.ISelectionChangedListener
public void keyPressed(org.eclipse.swt.events.KeyEvent e)
keyPressed
in interface org.eclipse.swt.events.KeyListener
public void keyReleased(org.eclipse.swt.events.KeyEvent e)
keyReleased
in interface org.eclipse.swt.events.KeyListener
public void rootDomainModelChanged(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
setting
- the new table settingCopyright © 2018. All rights reserved.