private void getTranslation(AnActionEvent event) {
Editor mEditor = event.getData(PlatformDataKeys.EDITOR);
Project project = event.getData(PlatformDataKeys.PROJECT);
String basePath = project.getBasePath();
if (null == mEditor) {
return;
}
SelectionModel model = mEditor.getSelectionModel();
String selectedText = model.getSelectedText();
if (TextUtils.isEmpty(selectedText)) {
selectedText = getCurrentWords(mEditor);
if (TextUtils.isEmpty(selectedText)) {
return;
}
}
String queryText = strip(addBlanks(selectedText));
new Thread(new RequestRunnable(mEditor, queryText,basePath)).start();
}
ReciteWords.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:ReciteWords
作者:
评论列表
文章目录