diff --git a/README.md b/README.md index 5030c8f..d3d9cf4 100644 --- a/README.md +++ b/README.md @@ -138,17 +138,25 @@ so, sadly, that feature can't work on Community Edition. # Knew Issues -### Debug shows an external file instead of the local one. +### ~~Debug shows an external file instead of the local one.~~ -Sadly this issue has been reported on YouTrack multiple times, I think we -shall wait a fix from IntelliJ Team. +> This *should* have been fixed from 2023.1 onwards but it's using a "workaround". +> +~~Sadly this issue has been reported on YouTrack multiple times, I think we +shall wait a fix from IntelliJ Team.~~ -- https://youtrack.jetbrains.com/issue/PY-34001 -- https://youtrack.jetbrains.com/issue/PY-18491 +- ~~https://youtrack.jetbrains.com/issue/PY-34001~~ +- ~~https://youtrack.jetbrains.com/issue/PY-18491~~ + +### Run configuration console not printing. + +By running Blender normally trough the plugin, the console is a little shy to print output buffers. + +###### This issue is not present in Debug mode. ### Debug configuration crash. -If you are running in debug mode, and an exception is thrown by the code, +If you are running in debug mode, and an exception is thrown by the code, Blender will crash. # Credits diff --git a/build.gradle b/build.gradle index 3388153..cee1568 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ plugins { id 'java' - id 'org.jetbrains.intellij' version '1.10.0' + id 'org.jetbrains.intellij' version '1.13.3' } group 'org.blackstartx' -version '2022.3' +version '2023.1' -sourceCompatibility = JavaVersion.VERSION_16 +sourceCompatibility = JavaVersion.VERSION_17 repositories { mavenCentral() @@ -20,7 +20,7 @@ dependencies { // See https://github.com/JetBrains/gradle-intellij-plugin/ intellij { plugins = ["python"] - version = "PY-2022.3" + version = "PY-2023.1" type = 'PY' } patchPluginXml { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 282ca8e..d1dbd11 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Fri May 08 20:56:34 CEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/src/main/java/icons/BlendCharmIcons.java b/src/main/java/icons/BlendCharmIcons.java index 82fcefd..3e26c1f 100644 --- a/src/main/java/icons/BlendCharmIcons.java +++ b/src/main/java/icons/BlendCharmIcons.java @@ -5,7 +5,7 @@ import javax.swing.*; public interface BlendCharmIcons { - Icon BLENDER_LOGO = IconLoader.findIcon("/icons/blender_logo_gray.png", BlendCharmIcons.class); - Icon BLENDER_FOLDER_ICON = IconLoader.findIcon("/icons/addon_folder.png", BlendCharmIcons.class); - Icon BLENDER_SRC_FOLDER_ICON = IconLoader.findIcon("/icons/addon_src_folder.png", BlendCharmIcons.class); + Icon BLENDER_LOGO = IconLoader.findIcon("/icons/blender_logo_gray.svg", BlendCharmIcons.class); + Icon BLENDER_FOLDER_ICON = IconLoader.findIcon("/icons/addon_folder.svg", BlendCharmIcons.class); + Icon BLENDER_SRC_FOLDER_ICON = IconLoader.findIcon("/icons/addon_src_folder.svg", BlendCharmIcons.class); } diff --git a/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.form b/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.form index 19f60ed..2fc9686 100644 --- a/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.form +++ b/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.form @@ -50,7 +50,6 @@ - diff --git a/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.java b/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.java index c6bdd65..032c971 100644 --- a/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.java +++ b/src/main/java/ui/dialogs/add_blender_instance/AddBlenderInstance.java @@ -1,5 +1,6 @@ package ui.dialogs.add_blender_instance; +import com.intellij.icons.AllIcons; import data.BlenderExeFileChooserDescriptor; import data.BlenderInstance; import util.MySwingUtil; @@ -20,9 +21,14 @@ public class AddBlenderInstance extends JDialog { AddBlenderInstance(@NotNull Project project) { setContentPane(contentPane); + initIcons(); MySwingUtil.setLabelOnClickListener(explore, () -> onExploreClick(project)); } + private void initIcons() { + this.explore.setIcon(AllIcons.Nodes.Folder); + } + private void onExploreClick(@NotNull Project project) { FileChooserDescriptor descriptor = new BlenderExeFileChooserDescriptor(); descriptor.setTitle("Blender Runnable."); diff --git a/src/main/java/ui/tool_window/BlenderToolWindow.form b/src/main/java/ui/tool_window/BlenderToolWindow.form index b9dfeea..5db20cd 100644 --- a/src/main/java/ui/tool_window/BlenderToolWindow.form +++ b/src/main/java/ui/tool_window/BlenderToolWindow.form @@ -21,7 +21,6 @@ - @@ -44,7 +43,6 @@ - @@ -54,7 +52,6 @@ - @@ -63,7 +60,6 @@ - diff --git a/src/main/java/ui/tool_window/BlenderToolWindow.java b/src/main/java/ui/tool_window/BlenderToolWindow.java index db5f4d9..17239e4 100644 --- a/src/main/java/ui/tool_window/BlenderToolWindow.java +++ b/src/main/java/ui/tool_window/BlenderToolWindow.java @@ -3,6 +3,7 @@ import com.intellij.execution.*; import com.intellij.execution.ui.ConsoleViewContentType; import com.intellij.execution.ui.RunContentDescriptor; +import com.intellij.icons.AllIcons; import data.*; import org.json.JSONArray; import org.json.JSONObject; @@ -76,6 +77,7 @@ public class BlenderToolWindow { BlenderToolWindow(@NotNull Project project) { this.project = new MyProjectHolder(project); this.blenderSettings = BlenderSettings.getBlenderSettings(this.project); + initIcons(); init(); for (BlenderInstance savedBlenderInstance : blenderSettings.getBlenderInstances()) @@ -97,12 +99,11 @@ public class BlenderToolWindow { runningInstances.addListSelectionListener(e -> setConsoleView(getSelectedRunningProcess())); } - private RunningBlenderProcess getSelectedRunningProcess() { - return runningInstances.getSelectedIndex() == -1 ? null : runningInstancesAdapter.get(runningInstances.getSelectedIndex()); - } - - private boolean isSelectedInstanceValid() { - return blenderInstances.getModel().getSize() != 0; + private void initIcons() { + start.setIcon(AllIcons.Actions.Execute); + button_add.setIcon(AllIcons.General.Add); + debug.setIcon(AllIcons.Actions.StartDebugger); + button_remove.setIcon(AllIcons.General.Remove); } private void init() { @@ -115,6 +116,14 @@ public void after(@NotNull List events) { }); } + private RunningBlenderProcess getSelectedRunningProcess() { + return runningInstances.getSelectedIndex() == -1 ? null : runningInstancesAdapter.get(runningInstances.getSelectedIndex()); + } + + private boolean isSelectedInstanceValid() { + return blenderInstances.getModel().getSize() != 0; + } + private void onSave(VirtualFile virtualFile) { for (int i = 0; i < runningInstancesAdapter.size(); i++) intellijConsoleInfoPrintLn(runningInstancesAdapter.get(i).getConsole(), "[On Save: VFS_CHANGE]"); @@ -224,7 +233,8 @@ private void onInstanceMessage(MySocketConnection.Data message, RunningBlenderPr if (runningBlenderProcess.isDebug()) intentionalDebugRestart(runningBlenderProcess); } } - case CommunicationData.RESPONSE_PLUGIN_REFRESH -> root.getString(CommunicationData.RESPONSE_PLUGIN_REFRESH_STATUS); + case CommunicationData.RESPONSE_PLUGIN_REFRESH -> + root.getString(CommunicationData.RESPONSE_PLUGIN_REFRESH_STATUS); } } @@ -385,7 +395,7 @@ private void onDebugClick() { configuration.setSuspendAfterConnect(false); configuration.setMappingSettings(new PathMappingSettings() {{ - add(new PathMapping(project.addonContainerPath(), getSelectedBlenderInstance().addonPath)); + add(new PathMapping(project.addonContainerPath().toLowerCase(), getSelectedBlenderInstance().addonPath.toLowerCase())); }}); Executor debugExecutorInstance = DefaultDebugExecutor.getDebugExecutorInstance(); diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 47159c2..2ef09b8 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -2,7 +2,7 @@ org.blackstartx.blend-charm Blend-Charm BlackStartx - 2022.3 + 2023.1 + + + + + \ No newline at end of file diff --git a/src/main/resources/icons/addon_src_folder.png b/src/main/resources/icons/addon_src_folder.png deleted file mode 100644 index d839262..0000000 Binary files a/src/main/resources/icons/addon_src_folder.png and /dev/null differ diff --git a/src/main/resources/icons/addon_src_folder.svg b/src/main/resources/icons/addon_src_folder.svg new file mode 100644 index 0000000..f3ab515 --- /dev/null +++ b/src/main/resources/icons/addon_src_folder.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/icons/blender_logo.png b/src/main/resources/icons/blender_logo.png deleted file mode 100644 index 10e4631..0000000 Binary files a/src/main/resources/icons/blender_logo.png and /dev/null differ diff --git a/src/main/resources/icons/blender_logo.svg b/src/main/resources/icons/blender_logo.svg new file mode 100644 index 0000000..ff1897f --- /dev/null +++ b/src/main/resources/icons/blender_logo.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/icons/blender_logo_gray.png b/src/main/resources/icons/blender_logo_gray.png deleted file mode 100644 index ed549d0..0000000 Binary files a/src/main/resources/icons/blender_logo_gray.png and /dev/null differ diff --git a/src/main/resources/icons/blender_logo_gray.svg b/src/main/resources/icons/blender_logo_gray.svg new file mode 100644 index 0000000..86a1c29 --- /dev/null +++ b/src/main/resources/icons/blender_logo_gray.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/update-urls/community-edition/updatePlugins.xml b/update-urls/community-edition/updatePlugins.xml index 3c0463d..ba70d36 100644 --- a/update-urls/community-edition/updatePlugins.xml +++ b/update-urls/community-edition/updatePlugins.xml @@ -5,8 +5,8 @@ - + BlackStartx Blend-Charm diff --git a/update-urls/professional-edition/updatePlugins.xml b/update-urls/professional-edition/updatePlugins.xml index c2a2e14..0d3c602 100644 --- a/update-urls/professional-edition/updatePlugins.xml +++ b/update-urls/professional-edition/updatePlugins.xml @@ -5,8 +5,8 @@ - + BlackStartx Blend-Charm