@Override
public void actionPerformed(AnActionEvent anActionEvent) {
Project project = anActionEvent.getProject();
if (project != null) {
String currentApkPath = PropertiesManager.getData(project, PropertyKeys.APK_PATH);
VirtualFile fileToSelectOnCreate =
TextUtils.isEmpty(currentApkPath)
? project.getBaseDir()
: LocalFileSystem.getInstance().findFileByPath(currentApkPath);
VirtualFile apkFile = new FileChooserDialogManager.Builder(project, fileToSelectOnCreate)
.setFileTypes(FileTypes.FILE)
.setTitle(Strings.TITLE_ASK_APK_FILE)
.setDescription(Strings.MESSAGE_ASK_APK_FILE)
.withFileFilter("apk")
.create()
.getSelectedFile();
if (apkFile != null) {
PropertiesManager.putData(project, PropertyKeys.APK_PATH, apkFile.getPath());
}
}
}
SetApkPathAction.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:Dependency-Injection-Graph
作者:
评论列表
文章目录