diff --git a/.gitignore b/.gitignore index 8c8dd6d..7a68293 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ hs_err_pid* #Intellij settings *.iml +.idea/ +out/ diff --git a/META-INF/plugin.xml b/resources/META-INF/plugin.xml similarity index 92% rename from META-INF/plugin.xml rename to resources/META-INF/plugin.xml index efb3087..7b04011 100644 --- a/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -1,9 +1,9 @@ - + JythonHelper JythonHelper - 1.2 + 1.3 Kane - + com.intellij.modules.python Goal:Generate Python skeleton for Java classes in Jython projects. @@ -12,6 +12,7 @@ Code at github: https://github.com/kaneg/JythonHelper + 1.3: Support latest IDEA/PyCharm. 1.2: No longer needs to manually set Target Directory. All skeletons can be generated into SDK's binary folder. com.intellij.modules.python diff --git a/src/gz/jythonhelper/JythonHelperAction.java b/src/gz/jythonhelper/JythonHelperAction.java index 94528a9..08f85b9 100644 --- a/src/gz/jythonhelper/JythonHelperAction.java +++ b/src/gz/jythonhelper/JythonHelperAction.java @@ -3,7 +3,6 @@ import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.application.PathManager; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.project.Project; @@ -11,7 +10,7 @@ import com.intellij.openapi.ui.Messages; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; -import com.jetbrains.python.sdk.PythonSdkType; +import com.jetbrains.python.sdk.PythonSdkUtil; import org.jetbrains.annotations.NotNull; /** @@ -43,12 +42,12 @@ public void actionPerformed(@NotNull AnActionEvent event) { private String getTargetDirectory(VirtualFile vf, Project project) { Module module = ModuleUtil.findModuleForFile(vf, project); - Sdk sdk = PythonSdkType.findPythonSdk(module); + Sdk sdk = PythonSdkUtil.findPythonSdk(module); if (sdk == null) { Messages.showErrorDialog(project, "No SDK FOUND", "No SDK FOUND"); return null; } - return PythonSdkType.getSkeletonsPath(PathManager.getSystemPath(), sdk.getHomePath()); + return PythonSdkUtil.getSkeletonsPath(sdk); } private void generatePy(String outputDir, String[] libs, String... files) {