Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 most known issues #102

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open

fix: 🐛 most known issues #102

wants to merge 90 commits into from

Conversation

anyesu
Copy link

@anyesu anyesu commented Apr 14, 2024

Initially I just wanted to fix this Chinese character problem ( #46 ) , but because I rewrote the regular expression, I fixed the following problems by the way.

🐛 Bug Fixes


✨ Features


🔧 Settings


🎨 Build


  • 🎨 Add missing Gradle configuration files.

    Required Java 11

    Run IDE with Plugin (b5c255d)

    gradlew runIde

    Build Plugin (6cffcdc)

    gradlew jar
  • ✨ Support hot swapping using the JRebel Gradle plugin . (0a9720f)

    Default enabled only for the Run IDE with Plugin task.

🚨 Integration testing


  • ✅ Correct and add the test cases.

  • ♻️ Fix assertPathDetection as detectPaths matches more files and uses File.exists to determine if it is valid. (7506c3d)

  • ♻️ Support assertPathDetection matching multiple expected values. (08f2ad6)

  • ✨ Highlight the output using ANSI escape code . (f67bd0a)

  • 💄 Use UsefulTestCase in JUnit 4 . (43ef098)

📸 Snapshots


The left is before, the right is after fixed.

- support double-width characters

  - remove the `\uE000` characters added by JediTerm

  - JetBrains/jediterm@5a05fe1#diff-0065f89b4f46c30f15e7ca66d3626b43b41f8c30c9d064743304fe8304186a06R1036-R1039

  - anthraxx#46

- support paths with spaces when the path is enclosed in double quotes

  - the file name or folder name should not start with a space or end with a space

  - anthraxx#29

- file name can contain any characters except `\/:*?"<>|` and whitespace

- support row:col format that can contain variable whitespace characters
- files outside the project or directories within the project should use the `OpenUrlHyperlinkInfo` , otherwise use the `createMultipleFilesHyperlinkInfo`

  - anthraxx#49

- resolve paths containing `.` and `..` as actual paths
- support folder paths ending with separator
- `src\api\service.ts(29,50)`
… and uses `File.exists` to determine if it is valid
- for `findBestMatchingFiles`
- absolute path or path with line/col
- `assertPathDetection` support matching multiple expected values
- anthraxx#50
- so that other plugins can serve as fallbacks to handle the rest of the scenes, rather than overriding the expected result
- fix the url contains parentheses, e.g. https://en.wikipedia.org/wiki/Parenthesis_(disambiguation)
- Separate PersistentStateComponent and Configurable because they are different. A new instance of Configurable will be created each time when the Settings Dialog is opening.
- anthraxx#60
- anthraxx#94
- fix a situation: click `Invalidate and Restart` in Rider, open a terminal before the indices are updated, the project files is not cached at this time
…ns` tool window

- support manually reload file cache
- show logs in `Event Log`
- show notification only once when debug mode is not enabled
…highlighted

- paths containing only `[./\]` are ignored by default
- compatible with leading slash added by `slashify`
- optional `authority component` in URI can be empty `//`
- extract `FileUtils.isWindowsAbsolutePath`
- `BasePlatformTestCase.setUp`
- testTypeScriptCompiler
- `resolveSymlink` and `VfsUtil.findFile` are slow and may cause the UI to freeze if there are many files
- when a hyperlink is clicked, it immediately responds to configuration changes without having to re-create the hyperlink
- rename `createMultipleFilesHyperlinkInfo` to `buildMultipleFilesHyperlinkInfo`
- no longer need to restart IDE frequently during development
- to enable JRebel for a project, we need to add the rebel.xml configuration file to it, which is automatically generated by `JRebel Gradle plugin`
  - the real classes target directory is [main-instrumented]
- enabled only for the `Run Plugin` task
- https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel
@anyesu
Copy link
Author

anyesu commented Apr 15, 2024

@anthraxx Please take a look, thank you

@anyesu
Copy link
Author

anyesu commented Apr 22, 2024

Installation


Build from Source


Note

Gradle should run with Java 11.

  • Get the Source Code

    git clone https://github.com/anyesu/intellij-awesome-console
    cd intellij-awesome-console
  • Build from the Command Line

    # Windows
    gradlew jar
    
    # Linux
    ./gradlew jar
  • You can locate the generated JAR file in the build/libs directory.

The captured input associated with a group is always the subsequence that the group most recently matched.
If a group is evaluated a second time because of quantification then its previously-captured value, if any, will be retained if the second evaluation fails.
Matching the string `"aba"` against the expression `(a(b)?)+`, for example, leaves group two set to `"b"`.
All captured input is discarded at the beginning of each match.
@anthraxx
Copy link
Owner

Hi @anyesu thank you very much for the merge request, I have high interest in reviewing everything and getting it integrated, this is much appreciated.

The changeset is very huge, so this will take some time to review appropriately before considering the merge.

One early feedback I can already give is that I very much want to avoid wrapper or binary jars in the source tree as this makes it none obvious if there is anything malicious hidden, I expect that developers need to be able to set up basic gradle environment themselves. Please remove the gradle directory with the jars as well as the gradlew wrapper. Thank you.

@anyesu
Copy link
Author

anyesu commented Apr 25, 2024

@anthraxx Thank you for your reply.

I use Gradle wrapper for the following reasons:

  • Lock the version of Gradle, because the update of Gradle is a bit radical, and different versions may cause some break changes.
  • It works right out of the box. Download the source code and open it in IntelliJ IDEA and it will be automatically recognized. No additional cumbersome configuration is required.
  • You can build it with just one command gradlew jar on the command line, suitable for users without plug-in development experience.

I very much want to avoid wrapper or binary jars in the source tree as this makes it none obvious if there is anything malicious hidden

There are real security risks in doing this, I agree with you. So I have removed the Gradle wrapper related files and only keep the Run Configuration which is helpful for running in the IntelliJ IDEA .

The changeset is very huge, so this will take some time to review appropriately before considering the merge.

At the beginning, I also wanted to fix it with as little code changes as possible, but as more and more problems were fixed, the amount of code changes inevitably became huge. In order to facilitate development, I also made some adjustments to the code style and test cases. These changes make the overall code look a bit messy, and I'm sorry about that.

@jakub-borusewicz
Copy link

What's the status of this? From description, I see it could resolve issues that I encountered (no links in lines formatted like this: <file_path>:<line_number>: some_error_message>

@tribbloid
Copy link

@anyesu maybe I can help you publishing it, either:

but your issue tracking is closed

@anyesu
Copy link
Author

anyesu commented Nov 9, 2024

Thanks but no thanks @tribbloid.

  1. There is already a release here if anyone needs it.
  2. The purpose of this PR is to apply these fixes to the original plugin, and it is awaiting review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment