mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
enable cut & paste actions in modal context (copy is enabled already)
This commit is contained in:
@@ -21,6 +21,10 @@ import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
public class CutAction extends AnAction implements DumbAware {
|
||||
public CutAction() {
|
||||
setEnabledInModalContext(true);
|
||||
}
|
||||
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
DataContext dataContext = e.getDataContext();
|
||||
CutProvider provider = PlatformDataKeys.CUT_PROVIDER.getData(dataContext);
|
||||
|
||||
@@ -20,6 +20,9 @@ import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
|
||||
public class PasteAction extends AnAction implements DumbAware {
|
||||
public PasteAction() {
|
||||
setEnabledInModalContext(true);
|
||||
}
|
||||
|
||||
public void update(AnActionEvent event) {
|
||||
Presentation presentation = event.getPresentation();
|
||||
|
||||
Reference in New Issue
Block a user