The highlight feature of NppExec is powerful.But frankly speaking, the mask config is not smart enough. See the example below:
1) ant(java make tool) output line for J2SE is:
[javac] D:\Documents\workplace\snippets\src\MainWin.java:2: some message...
2) ant output line for J2ME is:
[wtkbuild] D:\Documents\workplace\dida\src\DidaMIDlet.java:16: some message...
Since the number of leading space characters is different in the examples, I should config two similar mask configures:
1) * %ABSFILE%:%LINE%
2) * %ABSFILE%:%LINE%
Why not make the first mask match the second one? If I've similar syntax except for different spaces in some outputs, I should list them all?
Even worse,the list sequence cannot be changed. In this case if there're different mask configs with different space chars, I should adjust the whole existing list.
XS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, after some time I've understood that the error is in your highlight mask. The plugin works correctly.
The right mask is the following:
*] %ABSFILE%:%LINE%:*
You see, your mask "* %ABSFILE%:%LINE% " does not provide enough information. The keyword "%ABSFILE%" is something similar to "%s" in scanf(), so, in common case, it does not know where the substring starts and where it ends. Thus, if you specify "*] %ABSFILE%:%LINE%:*", it will be clear that the "%ABSFILE%" starts right after "] " in the string.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We can not perform additional verification for the start and end of "%ABSFILE%", because, in common case, "%ABSFILE%" may have different form:
1) c:\folder\file.ext
2) c:/folder/file.ext
3) \\path\file.ext
4) //path/file.ext
5) ..\path\file.ext
6) ../path/file.ext
And maybe we can invent other forms of %ABSFILE% :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Output (replace '@' with ' ' below):
@@@@[javac] D:\Documents\
decision logic:
Step 1) Search each space char from beginning of a line
Step 2) Get the char next to the space char, and see if it's a legal leading char for %ABSFILE%
Step 3) Since '[' can not be a leading char for %ABSFILE%, continue Step 1)
With this decision procedure, my highlight mask works. If it doesn't make sense for other scenarioes, just forget it. Anyhow, '*] %ABSFILE' is obviously working fine.
XS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[Since the space char ' ' is ignored by the forum system, i replace it with '@' and re-post the message here]
The highlight feature of NppExec is powerful.But frankly speaking, the mask config is not smart enough. See the example below ['@' stands for space char ' ']:
1) ant(java make tool) output line for J2SE is:
@[javac] D:\Documents\workplace\snippets\src\MainWin.java:2: some message...
2) ant output line for J2ME is:
@@@@[wtkbuild] D:\Documents\workplace\dida\src\DidaMIDlet.java:16: some message...
Since the number of leading space characters is different in the examples, I should config two similar mask configures:
1)@* %ABSFILE%:%LINE%
2)@@@@* %ABSFILE%:%LINE%
Why not make the first mask match the second one? If I've similar syntax except for different spaces in some outputs, I should list them all?
Even worse,the list sequence cannot be changed. In this case if there're different mask configs with different space chars, I should adjust the whole existing list.
XS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The highlight feature of NppExec is powerful.But frankly speaking, the mask config is not smart enough. See the example below:
1) ant(java make tool) output line for J2SE is:
[javac] D:\Documents\workplace\snippets\src\MainWin.java:2: some message...
2) ant output line for J2ME is:
[wtkbuild] D:\Documents\workplace\dida\src\DidaMIDlet.java:16: some message...
Since the number of leading space characters is different in the examples, I should config two similar mask configures:
1) * %ABSFILE%:%LINE%
2) * %ABSFILE%:%LINE%
Why not make the first mask match the second one? If I've similar syntax except for different spaces in some outputs, I should list them all?
Even worse,the list sequence cannot be changed. In this case if there're different mask configs with different space chars, I should adjust the whole existing list.
XS
Well, after some time I've understood that the error is in your highlight mask. The plugin works correctly.
The right mask is the following:
*] %ABSFILE%:%LINE%:*
You see, your mask "* %ABSFILE%:%LINE% " does not provide enough information. The keyword "%ABSFILE%" is something similar to "%s" in scanf(), so, in common case, it does not know where the substring starts and where it ends. Thus, if you specify "*] %ABSFILE%:%LINE%:*", it will be clear that the "%ABSFILE%" starts right after "] " in the string.
We can not perform additional verification for the start and end of "%ABSFILE%", because, in common case, "%ABSFILE%" may have different form:
1) c:\folder\file.ext
2) c:/folder/file.ext
3) \\path\file.ext
4) //path/file.ext
5) ..\path\file.ext
6) ../path/file.ext
And maybe we can invent other forms of %ABSFILE% :-)
Even though I cannot understand the working logic for the mask right now, your suggestion WORKS perfect.
Thank you!
Mask:
* %ABSFILE%:%LINE%
Output (replace '@' with ' ' below):
@@@@[javac] D:\Documents\
decision logic:
Step 1) Search each space char from beginning of a line
Step 2) Get the char next to the space char, and see if it's a legal leading char for %ABSFILE%
Step 3) Since '[' can not be a leading char for %ABSFILE%, continue Step 1)
With this decision procedure, my highlight mask works. If it doesn't make sense for other scenarioes, just forget it. Anyhow, '*] %ABSFILE' is obviously working fine.
XS
[Since the space char ' ' is ignored by the forum system, i replace it with '@' and re-post the message here]
The highlight feature of NppExec is powerful.But frankly speaking, the mask config is not smart enough. See the example below ['@' stands for space char ' ']:
1) ant(java make tool) output line for J2SE is:
@[javac] D:\Documents\workplace\snippets\src\MainWin.java:2: some message...
2) ant output line for J2ME is:
@@@@[wtkbuild] D:\Documents\workplace\dida\src\DidaMIDlet.java:16: some message...
Since the number of leading space characters is different in the examples, I should config two similar mask configures:
1)@* %ABSFILE%:%LINE%
2)@@@@* %ABSFILE%:%LINE%
Why not make the first mask match the second one? If I've similar syntax except for different spaces in some outputs, I should list them all?
Even worse,the list sequence cannot be changed. In this case if there're different mask configs with different space chars, I should adjust the whole existing list.
XS
It looks like an error... I'll debug the sources to see what's wrong.