Page 1 of 2

PB IDE plugin:autocomplete string & comment, code beautifier

Posted: Tue Aug 19, 2014 7:25 am
by eddy
:arrow: download link: StringPlugin.zip

Tool features:
  • supported version: PB IDE 5.30+ x86 or x64
  • autocomplete comment
  • autocomplete split strings
  • autocomplete multiline strings
  • autoscrolling margins
  • auto format code
  • shortcut to insert newline constant (#LF$,#CR$,#CRLF$)
  • ticker caret
  • current line always visible
  • word highlighting cosmetic settings
  • indent on paste
  • trim trailing spaces
  • new environment variables for compiler options
How to configure tool:
1- unzip the downloaded file
2- open IDE menu: Tools > Configure Tools...
3- click on "New" button
4- enter the below settings then click on "OK" button
  • If you use an x64 PB IDE:
    • CommandLine: [plugin path]\PBPlugins.exe
    • Name: PB Plugins
    • Event to trigger: Editor Startup
    Or if you use an x86 PB IDE:
    • CommandLine: [plugin path]\x86\PBPlugins.exe
    • Name: PB Plugins
    • Event to trigger: Editor Startup
How to exit:
  • click on systray red icon "[S]"
Image

Re: PB IDE plugin: string auto split

Posted: Wed Aug 20, 2014 2:48 am
by Olby
Looks really useful, I could use one myself. Thanks.

Re: PB IDE plugin: string auto split

Posted: Wed Aug 20, 2014 3:05 am
by PB
Doesn't seem to work here. If I hit Return in the middle of a string,
it just puts the rest of the string on the next line, with no + on the
line prior. It doesn't do what your example code shows.

Also, it doesn't quit when the IDE quits, so each time I launch
PureBasic I get a bunch of red [S] icons in the System Tray. :(

Re: PB IDE plugin: string auto split

Posted: Wed Aug 20, 2014 6:48 am
by eddy
PB wrote:Doesn't seem to work here. If I hit Return in the middle of a string,
it just puts the rest of the string on the next line, with no + on the
line prior. It doesn't do what your example code shows.
It didn't detect the string scintilla style. Which PB version do you use ?
PB wrote: Also, it doesn't quit when the IDE quits, so each time I launch
PureBasic I get a bunch of red [S] icons in the System Tray.
Oops! I'll fix that. :shock:

Re: PB IDE plugin: string auto split

Posted: Wed Aug 20, 2014 6:51 am
by PB
> Which PB version do you use ?

See my sig. ;)

Re: PB IDE plugin: string auto split

Posted: Sun Aug 31, 2014 7:28 pm
by eddy
[Updated]
- fixup: launch only one instance at IDE start
- fixup: autoclose tool when the IDE quits
- added: autocomplete comment
- added: autocomplete multiline string
- added: autoscrolling margins
- added: word highlighting customizations

I hope your bugs are fixed with this version.

Image

Image
Image

TODO:
- save/restore settings
- code beautifier
- Auto indent on paste

Re: PB IDE plugin: autocomplete strings & comments

Posted: Thu Sep 04, 2014 3:34 am
by eddy
[Updated]
- save/restore preferences
- indent on paste
- new environment variables (they can be used to define custom constants in compiler options)

Image

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Thu Sep 04, 2014 7:22 am
by oreopa
Hi eddy. Thanks for this tool, I used to love your old one, before most of it got added to the IDE natively...

There are big problems here tho with this here... literally nothing works. Sorry to report that :D To add insult to injury, the tool doesnt auto-quit when I quit PB, and if I try to close it manually via the tray icon it throws the generic "PBPlugins.exe has stopped working" windows error.

Im using Win 7 Home Premium x64 + PB 5.30 x86.

Copy of log, if its any help:

Code: Select all

130544.Plugin.ProcessId = 9860
130544.Plugin.Tool = 656428
130544.Plugin.UpdateDate = 65868388
130544.Settings.CodeBeautifier.AutoindentPaste.Value = 1
130544.Settings.CodeBeautifier.FixSpacings.Value = 1
130544.Settings.CodeBeautifier.TrimSpaces.Value = 1
130544.Settings.CommentHelpers.AutocompCommentBars.Value = 1
130544.Settings.CommentHelpers.AutocompCommentBlock.Value = 1
130544.Settings.CommentHelpers.MinCommentBarLength.Value = 10
130544.Settings.CompilingHelpers.CustomEnvVars.Value = 1
130544.Settings.StringHelpers.AutocompMultilineStrings.Value = 1
130544.Settings.StringHelpers.AutocompSplitStrings.Value = 1
130544.Settings.VisualHelpers.AutoScrollMarginSize.Value = 5
130544.Settings.VisualHelpers.AutoScrollMargins.Value = 1
130544.Settings.VisualHelpers.CurrentLineAlwaysVisible.Value = 1
130544.Settings.VisualHelpers.CustomHighlighting.Value = 1
130544.Settings.VisualHelpers.HighlightBorderOpacity.Value = 200
130544.Settings.VisualHelpers.HighlightOpacity.Value = 100
130544.Settings.VisualHelpers.HighlightStyle.Value = 0
130544.Settings.VisualHelpers.TickerCaret.Value = 1
PB_Focus = 656428
PB_GadgetStack_4194304 = 35938040
PB_WindowID = 3
pb_menu_callback = -63667
pb_officemenu_callback = -62919
pb_statusbar_callback = 5689404
pb_statusbar_id = 1
pb_toolbar_callback = 5530990
pb_toolbar_id = 0
Lemme know if you need more infos. Thanx.

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Thu Sep 04, 2014 6:25 pm
by eddy
oreopa wrote:Hi eddy. Thanks for this tool, I used to love your old one, before most of it got added to the IDE natively...

There are big problems here tho with this here... literally nothing works. Sorry to report that :D To add insult to injury, the tool doesnt auto-quit when I quit PB, and if I try to close it manually via the tray icon it throws the generic "PBPlugins.exe has stopped working" windows error.

Im using Win 7 Home Premium x64 + PB 5.30 x86.

Copy of log, if its any help:
Lemme know if you need more infos. Thanx.
I reproduced your bug with x86 version of IDE
I'll compile an x86 version

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Thu Sep 04, 2014 9:23 pm
by eddy
[Updated]
- Added: x86 plugin version for x86 PB IDE
- I added an x86 paragraph in "How to configure" section. (see above)

TODO:
- word highlighting adaptive colors
- Trim spaces
- Fix spacings

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Fri Sep 05, 2014 12:17 am
by oreopa
Can happily inform you that the new x86 version works perfectly. Quits gracefully on PB exit and everything appears to work. Thanks for the quick fixing. Useful tool, appreciate it!

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Fri Sep 05, 2014 2:43 pm
by deesko
I'm sorry to report, but Avast claims the "x86\PBPlugins.exe" plugin has the "Win32:Evo-gen [Susp]", while the x64 seems fine. Were both programs created with PureBasic?

Nervertheless, thank you for your contribution.

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Sat Sep 06, 2014 6:32 am
by Bisonte
deesko wrote:I'm sorry to report, but Avast claims the "x86\PBPlugins.exe" plugin has the "Win32:Evo-gen [Susp]", while the x64 seems fine. Were both programs created with PureBasic?
Yesterday I wrote a little program that find the "firefox.exe" and terminate it, and Avira claims it to Win32/Hijacker.Gen... I think it's using WinAPI like mine little program to find PureBasic.exe. So the only virus in system is the "virus-scanner" ;)

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Sat Sep 06, 2014 7:37 am
by Little John
Bisonte wrote:[...] Avira [...]
So the only virus in system is the "virus-scanner" ;)
Avira is particularly good in "finding" anything.
Some time ago, it had actually detected itself as trojan. :mrgreen:

Re: PB IDE plugin:autocomplete string & comment, code beauti

Posted: Sun Sep 14, 2014 12:43 pm
by eddy
[Updated]
- optimized: autocomplete multiline string
- added : beautify code (only on paste for the moment)
- added : trim trailing spaces
Image

Image