From f85901c70274735b9fd61a9fd69b4fb7fc74d2ca Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Wed, 8 Nov 2023 00:04:32 +0530 Subject: [PATCH] fix(editor/treesitter): invalid capture names for log levels in highlights.scm for log language This fixes the crash caused because the capture names in the highlights.scm for log language were changed in commit efaeb04 but were not updated in the color scheme's log language definition. --- changelogs/v2.1.0-beta.md | 2 +- changelogs/v2.1.2-beta.md | 2 +- changelogs/v2.4.0-beta.md | 2 +- changelogs/v2.6.0-beta.md | 5 --- .../editor/treesitter/log/highlights.scm | 40 +++++++++---------- resources/src/main/res/raw/attrs_xml.txt | 8 ++-- .../xalan/internal/xsltc/compiler/xpath.cup | 12 +++--- 7 files changed, 33 insertions(+), 38 deletions(-) diff --git a/changelogs/v2.1.0-beta.md b/changelogs/v2.1.0-beta.md index a7859d1d2..5a01b1758 100644 --- a/changelogs/v2.1.0-beta.md +++ b/changelogs/v2.1.0-beta.md @@ -41,7 +41,7 @@ AndroidIDE v2.0.0-beta is here with new features, improvements, bug fixes and a - `Import orderer`: Organizes the imports. Thanks to @MrIkso (#180). - XML Code formatter. Thanks to @MrIkso (#182). - New Gradle command line options: `--build-cache` and `--offline`. Thanks to @MrIkso (#180). -- Highlight IDE logs based on the log line level. +- Highlight IDE logs based on the log line priority. - Option to share Build Output, App log and IDE logs as text file. - Syntax highlighting for Kotlin and C/C++ language. Thanks to @MrIkso (#196). - Highlight hex color code in string literals. Thanks to @MrIkso (#209). diff --git a/changelogs/v2.1.2-beta.md b/changelogs/v2.1.2-beta.md index 067425c19..52513a81a 100644 --- a/changelogs/v2.1.2-beta.md +++ b/changelogs/v2.1.2-beta.md @@ -56,7 +56,7 @@ Following issues have been fixed in this release : - Hide tab layout when no files are opened (#330). - Do not show full error message when layout inflation fails (#274). - Use Storage Access Framework (SAF) for picking directories. -- 'Preview layout' item now has more level than other options menu icons (#243). +- 'Preview layout' item now has more priority than other options menu icons (#243). - Do not show editor actions window when in search mode. - Use relative padding in TreeView to support RTL layouts. - Updated crash report. By @AndreyKozhev (#460). diff --git a/changelogs/v2.4.0-beta.md b/changelogs/v2.4.0-beta.md index 625af84cd..51d169609 100644 --- a/changelogs/v2.4.0-beta.md +++ b/changelogs/v2.4.0-beta.md @@ -35,5 +35,5 @@ _No notes_ ## Improvements - Improved colors in editor windows. -- Signture help window is now given more level over the diagnostics window. This means, if the signature help window is visible to the user, the diagnostics window will not be shown. +- Signture help window is now given more priority over the diagnostics window. This means, if the signature help window is visible to the user, the diagnostics window will not be shown. - The IDE now releases some unnecessary resources when a file is deleted or renamed. \ No newline at end of file diff --git a/changelogs/v2.6.0-beta.md b/changelogs/v2.6.0-beta.md index 4963fd003..e3978d6bb 100644 --- a/changelogs/v2.6.0-beta.md +++ b/changelogs/v2.6.0-beta.md @@ -22,11 +22,6 @@ Thanks to all the people who have contributed to this release (including our [Cr - `Long select` (editor text action): Allows selecting long text efficiently without using the selection handle. - `Launch app`: Launches the already installed application. - New preferences: - - Preference to choose AndroidIDE's theme (requires restart if changed) : - - Blue wave - new default theme - - Sunny glow - the previous (yellowish) theme - - Material You - - Preference to choose language for AndroidIDE. Per-app language support has been added for Android 13+ devices. - Preference to enable/disable sticky scroll in the editor (disabled by default). - Preference to automatically launch application after build & install (disabled by default). - Preference to enable/disable line number pinning in editor (enabled by default). diff --git a/editor/src/main/assets/editor/treesitter/log/highlights.scm b/editor/src/main/assets/editor/treesitter/log/highlights.scm index 5b4f87507..3fbda2ebf 100644 --- a/editor/src/main/assets/editor/treesitter/log/highlights.scm +++ b/editor/src/main/assets/editor/treesitter/log/highlights.scm @@ -5,10 +5,10 @@ (time) @err.time (pid) @err.pid (tid) @err.tid - (level) @err.level + (priority) @err.priority (tag) @err.tag (message) @err.msg - (#match? @err.level "E") + (#match? @err.priority "E") ) (log_line @@ -16,10 +16,10 @@ (time) @warn.time (pid) @warn.pid (tid) @warn.tid - (level) @warn.level + (priority) @warn.priority (tag) @warn.tag (message) @warn.msg - (#match? @warn.level "W") + (#match? @warn.priority "W") ) (log_line @@ -27,10 +27,10 @@ (time) @info.time (pid) @info.pid (tid) @info.tid - (level) @info.level + (priority) @info.priority (tag) @info.tag (message) @info.msg - (#match? @info.level "I") + (#match? @info.priority "I") ) (log_line @@ -38,10 +38,10 @@ (time) @debug.time (pid) @debug.pid (tid) @debug.tid - (level) @debug.level + (priority) @debug.priority (tag) @debug.tag (message) @debug.msg - (#match? @debug.level "D") + (#match? @debug.priority "D") ) (log_line @@ -49,43 +49,43 @@ (time) @verbose.time (pid) @verbose.pid (tid) @verbose.tid - (level) @verbose.level + (priority) @verbose.priority (tag) @verbose.tag (message) @verbose.msg - (#match? @verbose.level "V") + (#match? @verbose.priority "V") ) (ide_log_line (ide_tag) @err.tag - (level) @err.level + (priority) @err.priority (message) @err.msg - (#match? @err.level "E") + (#match? @err.priority "E") ) (ide_log_line (ide_tag) @warn.tag - (level) @warn.level + (priority) @warn.priority (message) @warn.msg - (#match? @warn.level "W") + (#match? @warn.priority "W") ) (ide_log_line (ide_tag) @info.tag - (level) @info.level + (priority) @info.priority (message) @info.msg - (#match? @info.level "I") + (#match? @info.priority "I") ) (ide_log_line (ide_tag) @debug.tag - (level) @debug.level + (priority) @debug.priority (message) @debug.msg - (#match? @debug.level "D") + (#match? @debug.priority "D") ) (ide_log_line (ide_tag) @verbose.tag - (level) @verbose.level + (priority) @verbose.priority (message) @verbose.msg - (#match? @verbose.level "V") + (#match? @verbose.priority "V") ) \ No newline at end of file diff --git a/resources/src/main/res/raw/attrs_xml.txt b/resources/src/main/res/raw/attrs_xml.txt index c6dab28b0..0dda0e6c7 100755 --- a/resources/src/main/res/raw/attrs_xml.txt +++ b/resources/src/main/res/raw/attrs_xml.txt @@ -5445,8 +5445,8 @@

Only a single non-rectangular clip can be applied on a View at any time. Circular clips from a {@link android.view.ViewAnimationUtils#createCircularReveal(View, int, int, float, - float)} circular reveal animation take level over Outline clipping, and child - Outline clipping takes level over Outline clipping done by a parent. + float)} circular reveal animation take priority over Outline clipping, and child + Outline clipping takes priority over Outline clipping done by a parent.

Note that this flag will only be respected if the View's Outline returns true from {@link android.graphics.Outline#canClip()}. --> - diff --git a/subprojects/jaxp/src/main/java/jaxp/sun/org/apache/xalan/internal/xsltc/compiler/xpath.cup b/subprojects/jaxp/src/main/java/jaxp/sun/org/apache/xalan/internal/xsltc/compiler/xpath.cup index ef4182597..0bfc82456 100644 --- a/subprojects/jaxp/src/main/java/jaxp/sun/org/apache/xalan/internal/xsltc/compiler/xpath.cup +++ b/subprojects/jaxp/src/main/java/jaxp/sun/org/apache/xalan/internal/xsltc/compiler/xpath.cup @@ -112,7 +112,7 @@ parser code {: * patterns are expanded as "*[namespace-uri() = 'uri']" and * "@*[namespace-uri() = 'uri']", respectively. This expansion considerably * simplifies the grouping of patterns in the Mode class. For this - * expansion to be correct, the level of the pattern/template must be + * expansion to be correct, the priority of the pattern/template must be * set to -0.25 (when no other predicates are present). */ public StepPattern createStepPattern(int axis, Object test, Vector predicates) { @@ -131,7 +131,7 @@ parser code {: } else { QName name = (QName)test; - boolean setLevel = false; + boolean setPriority = false; if (axis == Axis.NAMESPACE) { nodeType = (name.toString().equals("*")) ? -1 @@ -150,7 +150,7 @@ parser code {: } // Priority is set by hand if no other predicates exist - setLevel = (predicates.size() == 0); + setPriority = (predicates.size() == 0); predicates.add( new Predicate( @@ -174,9 +174,9 @@ parser code {: final StepPattern result = new StepPattern(axis, nodeType, predicates); - // Set level for case prefix:* and prefix:@* (no predicates) - if (setLevel) { - result.setLevel(-0.25); + // Set priority for case prefix:* and prefix:@* (no predicates) + if (setPriority) { + result.setPriority(-0.25); } return result;