Search in sources :

Example 1 with TextTransferable

use of com.intellij.util.ui.TextTransferable in project intellij-community by JetBrains.

the class CopyRevisionNumberFromAnnotateAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    if (myLineNumber < 0)
        return;
    final VcsRevisionNumber revisionNumber = myAnnotation.getLineRevisionNumber(myLineNumber);
    if (revisionNumber != null) {
        final String revision = revisionNumber.asString();
        CopyPasteManager.getInstance().setContents(new TextTransferable(revision));
    }
}
Also used : TextTransferable(com.intellij.util.ui.TextTransferable) VcsRevisionNumber(com.intellij.openapi.vcs.history.VcsRevisionNumber)

Aggregations

VcsRevisionNumber (com.intellij.openapi.vcs.history.VcsRevisionNumber)1 TextTransferable (com.intellij.util.ui.TextTransferable)1