PB IDE plugin : smart indent, remove spaces, autocompletions

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

download link fixed v3.1

remark : You can disable the new option 'remove extra empty lines' if you have a slow machine.
'Format whole source' will remove them too.

I think this option will be disabled by default in the next version.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

SofT MANiAC wrote:IDE -> "Preferences" -> Folding
it would be good to add option "Indent Folding Keywords"
Just I don't know another way to indent custom keywords

For example:

Code: Select all

; now (PureBasic Editor Extension v3.0)
MyKeyword
<some code>
EndMyKeyword

; must be
MyKeyword
  <some code>
EndMyKeyword
'Custom Keywords' indentation will be based on :
IDE -> "Preferences" -> Editor -> Colors -> Custom Keywords
I'll only indent if it's an End..Keyword block.

Changes for the next version
  • indent toolbar button
  • a new external tool entry for formatting source
Image
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[released v3.2]
- ADDED : indent custom keywords
- ADDED : autocomplete custom keywords
- ADDED : toolbar icon for formatting source
- UPDATED : installer
:arrow: you have to launch the installer because I changed the source formatter

Remark :
- you can remove the toolbar icon in your 'preferences' panel.
- you can disable the source autoformatter in your 'configure tools' panel
(uncheck the 'Pure Formatter AUTO' entry)

:arrow: Demo Video v3.2 : http://www.screencast.com/users/rineddy ... f7280bb9d8

Code: Select all

Class test
      Method action()
            Debug "POP"
      EndMethod
EndClass

StartShooting()
      Debug "POP"
StopShooting()
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Idea : a button for checking the version and updating the software will be intersting !
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

eddy wrote:[released v3.2]

Code: Select all

Class test
      Method action()
            Debug "POP"
      EndMethod
EndClass

StartShooting()
      Debug "POP"
StopShooting()
It doesn't work for me.
Also I can't install tool if is running CAV.exe (???)
POiNT.OF.PRESENCE group
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Did you define your custom keywords ?

:arrow: IDE -> "Preferences" -> Editor -> Colors -> Custom Keywords
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

eddy wrote:Did you define your custom keywords ?

:arrow: IDE -> "Preferences" -> Editor -> Colors -> Custom Keywords
Yep,

Code: Select all

[CustomKeywords]
File = 
Count = 22
W1 = (
W2 = )
W3 = Abstract
W4 = Class
W5 = ClassConstructor
W6 = ClassDestructor
W7 = DeleteObject
W8 = EndClass
W9 = EndClassConstructor
W10 = EndClassDestructor
W11 = EndMethod
W12 = Fixed
W13 = Flex
W14 = GetThisM
W15 = Method
W16 = MethodInit
W17 = MethodReturn
W18 = Methods
W19 = NewObject
W20 = Overwrite
W21 = StartConstruct
W22 = StopConstruct
and reinstall to v3.2 :(
POiNT.OF.PRESENCE group
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

What kind of problem do you have ?
- no custom keyword color ?
- no custom keyword indentation ?
- no custom end..keyword completion ?
Last edited by eddy on Wed May 14, 2008 9:18 am, edited 1 time in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

- no indentation ? *YES*

Code: Select all

Class dgd
dfsdf
EndClass
- no completion ? *YES*
POiNT.OF.PRESENCE group
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

1) Check the tool debugger option
2) Type some code lines
3) Open the tool debugger tab
4) Tell me if your tool reports your custom keyword list

Code: Select all

CustomKeywords : XXXXXXXXX
Last edited by eddy on Wed May 14, 2008 9:29 am, edited 2 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

eddy wrote:1) Check the tool debugger option
2) Type some code lines
3) Open the tool debugger tab
4) Tell me if your tool reports your custom keyword list

Code: Select all

CustomKeywords : XXXXXXXXX
Debugger window always blank in new version

Image
POiNT.OF.PRESENCE group
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Code: Select all

No autocomplete for IF
- End..Keyword completion works when you type 'IF' the first time

Code: Select all

Blank Debugger output
- I forgot this step : click "apply" or "ok" button after checking option.

Code: Select all

No custom keyword indent
- Why does your custom keyword list contain "(" ")" ? :shock:
Last edited by eddy on Wed May 14, 2008 9:39 am, edited 1 time in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

eddy wrote:I forgot this step : click "apply" or "ok" button after checking option.
already.. many times.. no result
Image
eddy wrote: Why does your custom keyword list contain "(" ")" ? :shock:
my old test :oops:
fixed, but no results:

Code: Select all

[CustomKeywords]
File = 
Count = 20
W1 = Abstract
W2 = Class
W3 = ClassConstructor
W4 = ClassDestructor
W5 = DeleteObject
W6 = EndClass
W7 = EndClassConstructor
W8 = EndClassDestructor
W9 = EndMethod
W10 = Fixed
W11 = Flex
W12 = GetThisM
W13 = Method
W14 = MethodInit
W15 = MethodReturn
W16 = Methods
W17 = NewObject
W18 = Overwrite
W19 = StartConstruct
W20 = StopConstruct
POiNT.OF.PRESENCE group
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

:? First I have to fix the debugger.
I'll see all these problems tonight.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[version v3.2b]
FIXED : saving parameters (v3.2) :oops:
UPDATED : focus et stickyWindow (again)
UPDATED : optimized startup and remove obselete stuffs
UPDATED : optimized debugger

:arrow: Tell me if there's any changes
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply