migrated to artifacts
[fedora-idea.git] / platform / lang-impl / src / com / intellij / ide / PsiActionSupportFactoryImpl.java
blobcefe64fd3bc74d648e2abd85d2fc540dbce8baa8
1 package com.intellij.ide;
3 import com.intellij.openapi.project.Project;
4 import com.intellij.psi.PsiElement;
5 import com.intellij.ide.util.DeleteHandler;
6 import org.jetbrains.annotations.NotNull;
8 import javax.swing.*;
10 /**
11 * @author yole
13 public class PsiActionSupportFactoryImpl extends PsiActionSupportFactory {
14 public CopyPasteSupport createPsiBasedCopyPasteSupport(final Project project, final JComponent keyReceiver,
15 final PsiElementSelector dataSelector) {
16 return new CopyPasteDelegator(project, keyReceiver) {
17 @NotNull
18 protected PsiElement[] getSelectedElements() {
19 PsiElement[] elements = dataSelector.getSelectedElements();
20 return elements == null ? PsiElement.EMPTY_ARRAY : elements;
25 public DeleteProvider createPsiBasedDeleteProvider() {
26 return new DeleteHandler.DefaultDeleteProvider();