[Gambas-devel] PrettyPrinter for use in IDE
ron
ronstk at ...124...
Wed Sep 22 04:33:59 CEST 2004
On Tuesday 21 September 2004 19:56, Charlie wrote:
> ron schrieb:
> >but then the DIM is not indent anymore in the proc's.
> >
> OK I see,have to fix it.
thank you on behalf the rest of the word. :)
>
> >
> >2)
> >Delete empty lines is nice but keep at least 1 line on top of the procedure.
> >In the editor you can see it easy by the small line but not on paper.
> >
> Yeah, Benoît talked also about, but I thought the blue line is good. (
> working on white Background)
> And I'v never printed gambas-sourcecode
>
Blue line? I do not have a color printer at all :(
> OK
>
> >
> >3)
> >After 'Indent All' the are blank lines add to the end of the file.
> >Maybe strip all blank lines at the end, but leave 1 line.
> >As room for the paste code during cut/past operations.
> >
> >
> Yes i know, I had the problem in the C-variant.
> They are not added, I just shift the lines up ( 2 counters , 1 for the
> line to read , 1 for the line to write to)
> But I think that will be the lst job I do , just before finish it.
>
blink
> >
> >4)
> >May be try to separate the options for the global section end the procedure blocks.
> >
> I think that should be an Option, no. (Sorry do you have a name for this?)
>
A frame with label 'Global Settings'
and a smaller frame with label 'Procedure Settings'
in the lower part of the 'Global Adjust'
this represent also the hierarchy of the 2 settings.
> >
> >5)
> >I belive 'Adjust All' and 'Adjust Proc' are better, it's a taste.
> >label 'Indenting Options' may be better 'Adjusting options.
Uhhh yes 'Global Settings' and 'Procedure Settings
> >The Adjust instead Indent is because not everything is indented
> >but more reformat in position in/out-denting :)
> >
> You talk about PrettyPrinter Settings. The Buttons etc ?
>
Yes the 2 buttons with 'Indent xxx' to 'Adjust xxx'
> >
> >6)
> >One tip for 'Deleting empty lines', I like to keep after a 'END??' a blank line.
> >Rule: if instr(line,"end") and instr(nextline,"end")=false then add/keep blank line.
> >The third IF statement block.
> >This solves also the the separation between procedures.
> >
> >
> You mean , in case if there is not, add one ?
Exactly Your my man :)
This way you get a nice IF/WHILE/DO statement block and see the different parts easy.
as shown in the example below
>
> >Example for the point 6.
> >
> >PRIVATE SUB DoIt(sFile AS String)
> >DIM sLine AS String
> >DIM bWriteLine AS Boolean
> >
> > IF today = 12 THEN today = 13
> >
> > IF chkEmpty.value AND Trim(sLine) <> "" THEN ' comment
> > sLine = RTrim$(sLine)
> > bWriteLine = TRUE
> > ENDIF
> >
> >' SUB / Function END
> > IF Upper$(Trim(sLine)) = Upper$("END") THEN
> > IF chkLineSep THEN
> > sLine = sLine & CONST_LINE
> > bWriteLine = TRUE
> > ELSE
> > 'let it be, let it be Song from the beatles
> > ENDIF
> > END IF
> >
> >' Select Case
> > SELECT CASE i
> > CASE 1
> > MsgBox "1"
> > ' can you solve here to a blank line. ?
> > CASE 2
> > IF x = 3 THEN Message.Info("2")
> > Message.Info("3")
> > Message.Info("4")
> >
> > DEFAULT
> > Message.Info("Arg...")
> >
> > END SELECT
> >
> > WITH i
> > i = i
> > END WITH
> >
> >END
> >
> >
> >
> Amicalement
> Charlie
>
More information about the Devel
mailing list