Open anyesu opened 4 months ago
@anthraxx Please take a look, thank you
[!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.
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.
@anthraxx Thank you for your reply.
I use Gradle wrapper for the following reasons:
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.
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: Bug Fixes
:checkered_flag: Fix fully qualified class names on Windows. (d5d6497)
:apple: Reset
srcRoots
when the indices are updated. (8a43f00)In macOS, when opening the Gradle project for the first time, the initial value of
srcRoots
is empty.:bug: Fix double-width characters (such as Chinese character) in Terminal. (7d6c28f)
remove the
\uE000
characters added by JediTerm.:bug: Recognize external files with absolute path. (43f8567)
:bug: Fix the absolute path recognized by
getResultItemsFile
will be overwritten bygetResultItemsUrl
. (7d6c28f):bug: The drive
[a-zA-Z]:[\\/]+
should not be truncated when matching file name. (08f2ad6 , adfe19f , e2f4abc):bug: Fix wrong cursor col position. (4e0d1f6)
Do same as intellij-community's built-in GotoLineNumberDialog .
:bug: Fix when changing the size of Terminal on Windows, the input may contain the
\0
. (075568a):bug: The
scheme
forURL
is required. (69404d3)~~~~
should not be recognized as aURL
.For Unix absolute paths , the
detectPaths
should be used instead ofdetectURLs
.:bug: The
URL
should not contain quotes. (d1c0cea):bug: Other issues have been fixed.
:sparkles: Features
:boom: Adjust the order of
AwesomeLinkFilterProvider
to be first. (ec19221)So that other filters can serve as fallbacks to handle the rest of the scenes, rather than overriding the expected result.
:bug: Fix the URL contains parentheses:
:zap: Flush file cache when VFS changes. (9aa1971 , 8a43f00)
How do I get notified when VFS changes?
:zap: Allow Filter to run in dumb mode (when indices are in background update). (644bbad)
The Filter can take effect immediately when the project is opened without waiting for the index to be updated.
DumbAware
Reload file cache when exit dumb mode (indices are updated). (3829c7d)
:zap: Optimize hyperlink logic. (43f8567 , 605791a , 98019d8 , 2840b9c)
Open all files and internal folders in the IDE.
Open files that match the index by file name in the IDE.
Resolve absolute paths starting with a slash into relative paths based on the project root as a fallback.
Open external folders in explorer.
Open URL in browser.
Files or folders that do not exist or cannot be matched to the index will not be highlighted.
closes
[x] close #49
[x] close #66
[x] close #74
[x] close #78
[x] close #93
:zap: The file name or folder name should:
Can contain any characters except
\/:*?"<>|
and whitespace. (7d6c28f)Support files without extensions and files starting with a dot (
.gitignore
)Not start with a space or end with a space. (7d6c28f)
Not start with drive
[a-zA-Z]:
. (adfe19f)Not end with a dot, except
.
and..
. (cb4ba8b , 42022b8)Exclude ASCII control characters. (e6b945b)
:zap: Support paths with spaces when the path is enclosed in double quotes. (7d6c28f)
:sparkles: Support
row:col
format that can contain variable whitespace characters. (7d6c28f):sparkles: Support checking illegal row and column. (45a137c)
:sparkles: Support the files surrounded by
(), [], ''
. (69e9948 , d5d6497 , be81611 , e0374d7 , 9270127):sparkles: Resolve paths containing
.
and..
as actual paths bygetCanonicalPath
. (43f8567):sparkles: Support comma or semicolon separated paths. (08f2ad6 , 0085f6c)
Support path end with
row:col
.:sparkles: Support for resolving symbolic links. (ef7336c , 721ca98 , cf8d80a)
Compatible with IDEA Resolve Symlinks plugin. (ef7336c)
Delay resolving symbolic links until the hyperlink is clicked. (721ca98)
Detect a junction/reparse point . (cf8d80a)
:sparkles: Resolve
~
to user's home directory. (3f55264)Support both Unix and Windows ( PowerShell support
~
).:sparkles: Support C# stacktrace in Rider . (638016f)
:sparkles: Support Gradle build stacktrace. (9270127)
:sparkles: Better support for
file:
protocol. (0f6fe80 , 0696ea7 , c0340dd)Compatible with leading slash added by
slashify
.Optional
authority component
in URI can be empty//
.:sparkles: Support
jar:
protocol. (cd3de13)Syntax:
jar:<url>!/{entry}
Invalid Jar URL. (4814808)
:sparkles: Support matching Windows drive root. (7ff9e97)
:children_crossing: Ignore handling Java/Kotlin stackTrace as ExceptionFilter does well. (58d994a)
Separate
methodName
andfileName
in Java stackTrace .:children_crossing: Ignore
File.exists
with UNC path . (1b4bc46):wrench: Settings
:bug: Fix settings cannot be saved. (0890012)
Separate PersistentStateComponent and Configurable because they are different. A new instance of
Configurable
will be created each time when theSettings Dialog
is opening.:sparkles: Add
Reload file cache
action to Event Log or Notifications tool window . (4e2433b)Support manually reload file cache.
Show logs in
Event Log
.:sparkles: Add
DEBUG_MODE
config. (d70ef6c)Show notification only once when
debug mode
is not enabled.:sparkles: Add
ignore pattern
config to exclude paths that do not need to be highlighted. (d353d6b , 53f2205 , 69eeb44)Paths containing only
[./\]
are ignored by default. (205adad)Default ignore
node_modules
asIC-2021.2.1
will index the whole directory and there are too many files. (7b5a445)closes
[x] close #72
:recycle: Default values should be maintained separately in
AwesomeConsoleDefaults
. (75d572a):bug: Fix the problem of IDE and external programs opening some non-text files at the same time. (b363994)
:sparkles: Add
searchFiles
config to more easily disableFilter
without restarting the IDE. (81eb6cf):sparkles: Add
searchClasses
config to toggle searching classes in the indices. (782d0f5):sparkles: Add
filePattern
config to allow user-defined file patterns (Regex). (773b116):sparkles: Add
useIgnoreStyle
config. (a9319b9 , ef9b135)Use an empty hyperlink to prevent incorrect hyperlinks generated by other plugins.
This feature is not supported in the Terminal because JediTerm does not use the highlightAttributes parameter.
ref: #64
:sparkles: Add
useResultLimit
config to limit the count ofmatchingFiles
for performance. (2fedafe):bug: Fix the
Choose Target File
popup is not show in the correct project when opening multiple projects and using Terminal. (c9ffc18)Fix "Choose Target File" popup
config checkbox. (23312e3 , 08567db):art: Build
:art: Add missing Gradle configuration files.
Run IDE with Plugin (b5c255d)
Build Plugin (6cffcdc)
:sparkles: Support hot swapping using the JRebel Gradle plugin . (0a9720f)
Default enabled only for the
Run IDE with Plugin
task.:rotating_light: Integration testing
:white_check_mark: Correct and add the test cases.
:recycle: Fix
assertPathDetection
asdetectPaths
matches more files and usesFile.exists
to determine if it is valid. (7506c3d):recycle: Support
assertPathDetection
matching multiple expected values. (08f2ad6):sparkles: Highlight the output using
ANSI escape code
. (f67bd0a):lipstick: Use UsefulTestCase in JUnit 4 . (43ef098)
:camera_flash: Snapshots
The left is before, the right is after fixed.