mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make copy available not only on not usage nodes (IDEA-62472)
This commit is contained in:
@@ -1113,14 +1113,14 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra
|
||||
@Override
|
||||
public void performCopy(DataContext dataContext) {
|
||||
final Node selectedNode = getSelectedNode();
|
||||
assert selectedNode instanceof UsageNode;
|
||||
final String plainText = ((UsageNode)selectedNode).getUsage().getPresentation().getPlainText();
|
||||
assert selectedNode != null;
|
||||
final String plainText = selectedNode.getText(UsageViewImpl.this);
|
||||
CopyPasteManager.getInstance().setContents(new StringSelection(plainText.trim()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCopyEnabled(DataContext dataContext) {
|
||||
return getSelectedNode() instanceof UsageNode;
|
||||
return getSelectedNode() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user