fix: Fallback metadata for windows debug
This commit is contained in:
parent
dd942750d4
commit
905df582e4
5 changed files with 45 additions and 1 deletions
|
@ -19,6 +19,9 @@ Changelog structure reference:
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Debugger
|
||||||
|
- Added fallback metadata for windows debugger downloading
|
||||||
|
|
||||||
- Zig
|
- Zig
|
||||||
- Color settings has more accurate color preview text.
|
- Color settings has more accurate color preview text.
|
||||||
- Better builtin indentation
|
- Better builtin indentation
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import de.undercouch.gradle.tasks.download.Download
|
||||||
import groovy.xml.XmlParser
|
import groovy.xml.XmlParser
|
||||||
import org.jetbrains.changelog.Changelog
|
import org.jetbrains.changelog.Changelog
|
||||||
import org.jetbrains.changelog.markdownToHTML
|
import org.jetbrains.changelog.markdownToHTML
|
||||||
|
@ -16,6 +17,7 @@ plugins {
|
||||||
id("org.jetbrains.intellij.platform") version("2.0.0-beta8")
|
id("org.jetbrains.intellij.platform") version("2.0.0-beta8")
|
||||||
id("org.jetbrains.changelog") version("2.2.1")
|
id("org.jetbrains.changelog") version("2.2.1")
|
||||||
id("org.jetbrains.grammarkit") version("2022.3.2.2")
|
id("org.jetbrains.grammarkit") version("2022.3.2.2")
|
||||||
|
id("de.undercouch.download") version("5.6.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
val publishVersions = listOf("232", "233", "241", "242")
|
val publishVersions = listOf("232", "233", "241", "242")
|
||||||
|
@ -231,6 +233,19 @@ project(":debugger") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val genOutputDir = layout.buildDirectory.dir("generated-resources")
|
||||||
|
sourceSets["main"].resources.srcDir(genOutputDir)
|
||||||
|
tasks {
|
||||||
|
register<Download>("downloadProps") {
|
||||||
|
src("https://falsepattern.com/zigbrains/msvc.properties")
|
||||||
|
dest(genOutputDir.map { it.file("msvc.properties") })
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
dependsOn("downloadProps")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project(":zon") {
|
project(":zon") {
|
||||||
|
|
|
@ -14,6 +14,8 @@ notification.title.debugger=Debugger
|
||||||
notification.content.debugger.successfully.downloaded=Debugger successfully downloaded
|
notification.content.debugger.successfully.downloaded=Debugger successfully downloaded
|
||||||
notification.content.debugger.downloading.failed=Debugger downloading failed
|
notification.content.debugger.downloading.failed=Debugger downloading failed
|
||||||
notification.content.debugger.metadata.downloading.failed=Debugger metadata downloading failed
|
notification.content.debugger.metadata.downloading.failed=Debugger metadata downloading failed
|
||||||
|
notification.content.debugger.metadata.fallback.fetch.failed=Debugger fallback metadata fetch failed
|
||||||
|
notification.content.debugger.metadata.fallback.parse.failed=Debugger fallback metadata parse failed
|
||||||
settings.debugger.toolchain.download.debugger.automatically.checkbox=Download and update the debugger automatically
|
settings.debugger.toolchain.download.debugger.automatically.checkbox=Download and update the debugger automatically
|
||||||
settings.debugger.title=Zig
|
settings.debugger.title=Zig
|
||||||
settings.debugger.toolchain.debugger.label=Debugger:
|
settings.debugger.toolchain.debugger.label=Debugger:
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
@ -371,11 +372,34 @@ public final class ZigDebuggerToolchainService {
|
||||||
//TODO logging
|
//TODO logging
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Notifications.Bus.notify(new Notification(
|
Notifications.Bus.notify(new Notification(
|
||||||
"Zig Debugger",
|
"ZigBrains.Debugger.Error",
|
||||||
ZigBundle.message("notification.title.debugger"),
|
ZigBundle.message("notification.title.debugger"),
|
||||||
ZigBundle.message("notification.content.debugger.metadata.downloading.failed"),
|
ZigBundle.message("notification.content.debugger.metadata.downloading.failed"),
|
||||||
NotificationType.ERROR
|
NotificationType.ERROR
|
||||||
));
|
));
|
||||||
|
//Try to load fallback file
|
||||||
|
try {
|
||||||
|
@Cleanup val resource = ZigDebuggerToolchainService.class.getResourceAsStream("msvc.properties");
|
||||||
|
if (resource == null) {
|
||||||
|
Notifications.Bus.notify(new Notification(
|
||||||
|
"ZigBrains.Debugger.Error",
|
||||||
|
ZigBundle.message("notification.title.debugger"),
|
||||||
|
ZigBundle.message("notification.content.debugger.metadata.fallback.fetch.failed"),
|
||||||
|
NotificationType.ERROR
|
||||||
|
));
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
val reader = new InputStreamReader(resource);
|
||||||
|
prop.load(reader);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
Notifications.Bus.notify(new Notification(
|
||||||
|
"ZigBrains.Debugger.Error",
|
||||||
|
ZigBundle.message("notification.title.debugger"),
|
||||||
|
ZigBundle.message("notification.content.debugger.metadata.fallback.parse.failed"),
|
||||||
|
NotificationType.ERROR
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Loading…
Add table
Reference in a new issue