Hi,
I am a new user of Geany. Thank you for making and supporting this wonderfull piece of software: I love the speed, knowing that I come from Eclipse that is not so strange :).
As said: I am 'migrating' my (Joomla CMS PHP code) from Eclipse. I have already a working Geany environment with includes for the Joomla Libraries (for code completion) and a complete working phing build system integrated.
What I am looking for now is to have Geany indicate that a function / method, etc. I use is deprecated.
Deprecated methods are marked deprecated in the docblock (with the @deprecated tag). What e.g. Eclipse or PHPstorm does is display the used function with a 'striketrough'.
I know that Geany is not a complete IDE like Eclipse or PHPStorm, but I was wondering if this is currently possible?
Thanks for any help!
regards,
Ruud.
On 26 September 2017 at 17:33, Ruud van Lent ruud.van.lent@zonnet.nl wrote:
Hi,
I am a new user of Geany. Thank you for making and supporting this wonderfull piece of software: I love the speed, knowing that I come from Eclipse that is not so strange :).
As said: I am 'migrating' my (Joomla CMS PHP code) from Eclipse. I have already a working Geany environment with includes for the Joomla Libraries (for code completion) and a complete working phing build system integrated.
What I am looking for now is to have Geany indicate that a function / method, etc. I use is deprecated.
Deprecated methods are marked deprecated in the docblock (with the @deprecated tag). What e.g. Eclipse or PHPstorm does is display the used function with a 'striketrough'.
I know that Geany is not a complete IDE like Eclipse or PHPStorm, but I was wondering if this is currently possible?
There is nothing that provides highlighting for those sorts of semantics, however strikethrough is available as a Scintilla indicator, so you could make a plugin do it.
Cheers Lex
Thanks for any help!
regards,
Ruud.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On Tuesday, September 26, 2017 05:00:09 AM Lex Trotman wrote:
On 26 September 2017 at 17:33, Ruud van Lent ruud.van.lent@zonnet.nl
wrote:
Deprecated methods are marked deprecated in the docblock (with the @deprecated tag). What e.g. Eclipse or PHPstorm does is display the used function with a 'striketrough'.
I know that Geany is not a complete IDE like Eclipse or PHPStorm, but I was wondering if this is currently possible?
There is nothing that provides highlighting for those sorts of semantics, however strikethrough is available as a Scintilla indicator, so you could make a plugin do it.
Or, just to offer a (potential) alternative--I believe you could incorporate a change like this into the (Scintilla) (native) lexer for PHP and then it would become available to any editor that used the Scintilla text editing widgit (there are quite a few such editors).
I say this: * without really knowing what Joomla CMS PHP code is, but assuming the PHP lexer does the hightlighting (and, I assume there is a PHP lexer in Scintilla) * without really being sure--I've never successfully created or modified a scintilla lexer, native or otherwise, but know that a native lexer has to be written in C / C++ (and some other methods of writing a Scintilla lexer (like using Lua are not, iirc, supported by Geany)
On 26 September 2017 at 22:43, rhkramer@gmail.com wrote:
On Tuesday, September 26, 2017 05:00:09 AM Lex Trotman wrote:
On 26 September 2017 at 17:33, Ruud van Lent ruud.van.lent@zonnet.nl
wrote:
Deprecated methods are marked deprecated in the docblock (with the @deprecated tag). What e.g. Eclipse or PHPstorm does is display the used function with a 'striketrough'.
I know that Geany is not a complete IDE like Eclipse or PHPStorm, but I was wondering if this is currently possible?
There is nothing that provides highlighting for those sorts of semantics, however strikethrough is available as a Scintilla indicator, so you could make a plugin do it.
Or, just to offer a (potential) alternative--I believe you could incorporate a change like this into the (Scintilla) (native) lexer for PHP and then it would become available to any editor that used the Scintilla text editing widgit (there are quite a few such editors).
I say this:
- without really knowing what Joomla CMS PHP code is, but assuming the PHP
lexer does the hightlighting (and, I assume there is a PHP lexer in Scintilla)
- without really being sure--I've never successfully created or modified a
scintilla lexer, native or otherwise, but know that a native lexer has to be written in C / C++ (and some other methods of writing a Scintilla lexer (like using Lua are not, iirc, supported by Geany)
All correct, except that strikethrough is not a style available to Lexers, its an indicator which has to be set by the application (like for example the red squiggly lines (technical term :) under typos and compile errors). If a different style could suffice then the lexer may be able to do it.
On the other hand since the docblocks are (IIUC) specific to Joomla, not PHP, then maybe the lexer shouldn't be infected by syntax specific to just one of many PHP frameworks.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On Tuesday, September 26, 2017 08:53:02 AM Lex Trotman wrote:
All correct, except that strikethrough is not a style available to Lexers, its an indicator which has to be set by the application (like for example the red squiggly lines (technical term :) under typos and compile errors). If a different style could suffice then the lexer may be able to do it.
On the other hand since the docblocks are (IIUC) specific to Joomla, not PHP, then maybe the lexer shouldn't be infected by syntax specific to just one of many PHP frameworks.
Thanks for the correction / clarification!
That disappoints me a little--the strikethrough is one "style" that I had anticipated using with my (maybe/ someday) to be built lexer. OTOH, if I learn enough C/C++ and the Scintilla code base to build a lexer, maybe it won't be too hard to either add strikethrough as a style to a lexer, or use the indicator approach (either in the lexer or maybe a separate plugin or such.
Le 26/09/2017 à 02:00, Lex Trotman a écrit :
On 26 September 2017 at 17:33, Ruud van Lent ruud.van.lent@zonnet.nl wrote:
[…] What I am looking for now is to have Geany indicate that a function / method, etc. I use is deprecated.
Deprecated methods are marked deprecated in the docblock (with the @deprecated tag). What e.g. Eclipse or PHPstorm does is display the used function with a 'striketrough'.
I know that Geany is not a complete IDE like Eclipse or PHPStorm, but I was wondering if this is currently possible?
There is nothing that provides highlighting for those sorts of semantics, however strikethrough is available as a Scintilla indicator, so you could make a plugin do it.
What I would look into is a compiler-like tool that reports those issues, so it could be used as a build command, and Geany can highlight the incriminated lines then. Just a thought though.
Cheers, Colomban
On 29.09.2017 03:17, Colomban Wendling wrote:
What I would look into is a compiler-like tool that reports those issues, so it could be used as a build command, and Geany can highlight the incriminated lines then. Just a thought though.
This was my first thought too. A check for deprecated things should be done at least before check in as some kind of pre-commit-hook if you are really keen about. Having this hook available, it's easy to run it during coding time -- IMHO ;)
Cheers, Frank
Hi, thanks all for your answers and thinking along.
This is exactly the route that I am going to pursue. I have implemented PHP Code Sniffer for Joomla: this will 'sniff' for code style and is integrated with Geany. A warning or error in the code style is displayed correctly in Geany.
I am now going to ask the Joomla Team to extend the Code Style with Deprecated routines: that way the code is also sniffed for deprecated code. This will then not only work in Geany but in every IDE that supports PHPCS.
Again: thanks for looking into this!
regards,
Ruud.
On 02-10-17 00:08, Frank Lanitz wrote:
On 29.09.2017 03:17, Colomban Wendling wrote:
What I would look into is a compiler-like tool that reports those issues, so it could be used as a build command, and Geany can highlight the incriminated lines then. Just a thought though.
This was my first thought too. A check for deprecated things should be done at least before check in as some kind of pre-commit-hook if you are really keen about. Having this hook available, it's easy to run it during coding time -- IMHO ;)
Cheers, Frank
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users