Example usage for com.intellij.openapi.actionSystem PlatformDataKeys EXPORTER_TO_TEXT_FILE

List of usage examples for com.intellij.openapi.actionSystem PlatformDataKeys EXPORTER_TO_TEXT_FILE

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem PlatformDataKeys EXPORTER_TO_TEXT_FILE.

Prototype

DataKey EXPORTER_TO_TEXT_FILE

To view the source code for com.intellij.openapi.actionSystem PlatformDataKeys EXPORTER_TO_TEXT_FILE.

Click Source Link

Usage

From source file:com.intellij.ide.actions.ExportToTextFileAction.java

License:Apache License

protected ExporterToTextFile getExporter(DataContext dataContext) {
    return PlatformDataKeys.EXPORTER_TO_TEXT_FILE.getData(dataContext);
}

From source file:com.intellij.ide.errorTreeView.NewErrorTreeViewPanel.java

License:Apache License

@Override
public Object getData(String dataId) {
    if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) {
        return this;
    }/*  w w w.ja v a 2s . c  o  m*/
    if (PlatformDataKeys.NAVIGATABLE.is(dataId)) {
        final NavigatableMessageElement selectedMessageElement = getSelectedMessageElement();
        return selectedMessageElement != null ? selectedMessageElement.getNavigatable() : null;
    } else if (PlatformDataKeys.HELP_ID.is(dataId)) {
        return myHelpId;
    } else if (PlatformDataKeys.TREE_EXPANDER.is(dataId)) {
        return myTreeExpander;
    } else if (PlatformDataKeys.EXPORTER_TO_TEXT_FILE.is(dataId)) {
        return myExporterToTextFile;
    } else if (CURRENT_EXCEPTION_DATA_KEY.is(dataId)) {
        NavigatableMessageElement selectedMessageElement = getSelectedMessageElement();
        return selectedMessageElement != null ? selectedMessageElement.getData() : null;
    }
    return null;
}

From source file:gradleplug.messages.MessagesPanel.java

License:Apache License

public Object getData(String dataId) {
    if (PlatformDataKeys.COPY_PROVIDER.getName().equals(dataId)) {
        return this;
    } else if (PlatformDataKeys.EXPORTER_TO_TEXT_FILE.getName().equals(dataId)) {
        return exporterToTextFile;
    }//from w w  w. java  2  s  .com
    return null;
}