changeset 717:408b4e761f98

Added support for the indenters VB Beautifier and Ps/Sql tidy. Thus VB script and Pl/Sql are supported languages. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@988 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Fri, 21 Aug 2009 09:44:29 +0000
parents b9123ff53106
children a5fe081a3840
files indenters/example.sql indenters/example.vb indenters/uigui_psti.ini indenters/uigui_vbsbeaut.ini indenters/vbsbeaut.bat
diffstat 5 files changed, 335 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indenters/example.sql	Fri Aug 21 09:44:29 2009 +0000
@@ -0,0 +1,37 @@
+CREATE PACKAGE BODY b IS
+
+PROCEDURE proc1 IS
+BEGIN
+IF 7 <> 5 THEN
+FOR rec IN (SELECT * FROM dual
+                  WHERE g = 5) LOOP
+NULL;
+END LOOP;
+    END IF;
+END;
+  
+PROCEDURE recurse IS
+   b number:=5;
+   d456 number:=456;
+BEGIN
+    recurse;
+    proc1;
+    a := (a +        1
+          +4
+          + 5
+          + 8);
+    c := f + 4 + 34;
+    total := earth +sky;
+    
+    --this is comment
+    
+    uk:=h;
+    g:=l;
+           exception
+           when no_data then
+           hello;
+  END;
+  
+  BEGIN
+    NULL;
+END;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indenters/example.vb	Fri Aug 21 09:44:29 2009 +0000
@@ -0,0 +1,50 @@
+Dim docRoot As New ChilkatXml
+
+Dim success As Long
+
+docRoot.Tag = "myDoc"
+
+'  To zip compress the content, set this flag to 1
+Dim zipContent As Long
+zipContent = 0
+'  To 128-bit AES encrypt the content, set this flag to 1
+Dim encryptContent As Long
+encryptContent = 0
+Dim encryptPassword As String
+encryptPassword = ""
+
+Dim pdfNode As ChilkatXml
+
+Set pdfNode = docRoot.NewChild("pdf","")
+
+'  Embed a PDF into XML
+success = pdfNode.SetBinaryContentFromFile("sample.pdf",zipContent,encryptContent,encryptPassword)
+If (success <> 1) Then
+    MsgBox pdfNode.LastErrorText
+
+    Exit Sub
+End If
+
+MsgBox pdfNode.LastErrorText
+
+'  Display the entire XML document:
+Text1.Text = Text1.Text & docRoot.GetXml() & vbCrLf
+
+'  Get the Base64-encoded content and display it:
+Text1.Text = Text1.Text & pdfNode.Content & vbCrLf
+
+'  Extract the binary content from XML:
+Dim unzipContent As Long
+unzipContent = 0
+Dim decryptContent As Long
+decryptContent = 0
+Dim decryptPassword As String
+decryptPassword = ""
+success = pdfNode.SaveBinaryContent("out.pdf",unzipContent,decryptContent,decryptPassword)
+If (success <> 1) Then
+    MsgBox pdfNode.LastErrorText
+
+    Exit Sub
+End If
+
+MsgBox "Success!"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indenters/uigui_psti.ini	Fri Aug 21 09:44:29 2009 +0000
@@ -0,0 +1,196 @@
+[header]
+categories=General options|Spaces|Indentation|Alignments
+cfgFileParameterEnding=cr
+configFilename=psti.cfg
+fileTypes=*.sql
+indenterFileName=psti.exe
+indenterName=Pl/Sql tidy (Pl/Sql)
+inputFileName=indentinput
+inputFileParameter="-i "
+manual=http://psti.equinoxbase.com/manual.html
+outputFileName=indentoutput
+outputFileParameter="-o "
+stringparaminquotes=false
+parameterOrder=iop
+showHelpParameter=-h
+stringparaminquotes=false
+useCfgFileParameter="-ls "
+version=1.2
+
+[Disable all switches]
+Category=0
+Description="<html>Sets all switches to off.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-0|
+ValueDefault=0
+
+[Uppercase Keywords]
+Category=0
+Description="<html>Uppercase Keywords.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-uk+|-uk-
+ValueDefault=0
+
+[Capitalized Keywords]
+Category=0
+Description="<html>Capitalized Keywords.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-ck+|-ck-
+ValueDefault=0
+
+[Lowercase Keywords]
+Category=0
+Description="<html>Lowercase Keywords.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-lk+|-lk-
+ValueDefault=0
+
+[Uppercase Identifiers]
+Category=0
+Description="<html>Uppercase Identifiers.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-ui+|-ui-
+ValueDefault=0
+
+[Lowercase Identifiers]
+Category=0
+Description="<html>Lowercase Identifiers.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-li+|-li-
+ValueDefault=0
+
+[Capitalized Identifiers]
+Category=0
+Description="<html>Capitalized Identifiers.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-ci+|-ci-
+ValueDefault=0
+
+[Compactify]
+Category=1
+Description="<html>Compactify, remove redundant spaces/keep.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-c+|-c-
+ValueDefault=0
+
+[Remove Operation Spaces]
+Category=1
+Description="<html>Remove spaces around operations (+,- etcdo nothing/).</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-co+|-co-
+ValueDefault=0
+
+[Add Operation Spaces]
+Category=1
+Description="<html>Add space around operations/do nothing.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-sao+|-sao-
+ValueDefault=0
+
+[Remove Space Open Bracket]
+Category=1
+Description="<html>Remove spaces after opening brackets/keep.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-rsaob+|-rsaob-
+ValueDefault=0
+
+[Don't Remove Bracket Space]
+Category=1
+Description="<html>Don't remove spaces around brackets/do nothing.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-ncb+|-ncb-
+ValueDefault=0
+
+[Indent Size]
+Category=2
+Description="<html>Indent size in spaces or in tabs (generally).</html>"
+Enabled=true
+EditorType=numeric
+CallName="-is "
+MinVal=0
+MaxVal=1024
+ValueDefault=4
+
+[Indent Lines]
+Category=2
+Description="<html>Whether to indent strings lines.</html>"
+Enabled=true
+EditorType=boolean
+TrueFalse=-in+|-in-
+ValueDefault=1
+
+[Keep relative indentation]
+Category=2
+Description="<html>Keep the relative identation of an allowed sql/do nothing.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-rs+|-rs-
+ValueDefault=0
+
+[Indent after exception]
+Category=2
+Description="<html>Extra indentation after exception when yes/no.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-iaew+|-iaew-
+ValueDefault=0
+
+[Indent after case]
+Category=2
+Description="<html>Extra indentation after case when yes/no.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-iacw+|-iacw-
+ValueDefault=0
+
+[Indent after cursor]
+Category=2
+Description="<html>Extra indentation after cursor yes/no.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-iac+|-iac-
+ValueDefault=0
+
+[Indent comments]
+Category=2
+Description="<html>Indent standalone comments.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-isc+|-isc-
+ValueDefault=0
+
+[Indent comments special]
+Category=2
+Description="<html>Indent standalone comments in some special cases too.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-isc2+|-isc2-
+ValueDefault=0
+
+[Indent inside comments]
+Category=2
+Description="<html>Indent inside comments/do nothing.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-iic+|-iic-
+ValueDefault=0
+
+[Column alignment]
+Category=3
+Description="<html>Column like lists inside brackets.</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=-clb+|-clb-
+ValueDefault=0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indenters/uigui_vbsbeaut.ini	Fri Aug 21 09:44:29 2009 +0000
@@ -0,0 +1,45 @@
+[header]
+categories=General
+cfgFileParameterEnding=cr
+configFilename=
+fileTypes=*.vb
+indenterFileName=vbsbeaut.bat
+indenterName=VBSBeautifier (VB)
+inputFileName=indentinput
+inputFileParameter=" "
+manual=http://www.daansystems.com/vbsbeaut/
+outputFileName=indentinput
+outputFileParameter=none
+parameterOrder=pio
+showHelpParameter=
+stringparaminquotes=false
+useCfgFileParameter=
+version=1.10
+
+
+[Spaces]
+Category=0
+Description="<html>Replace tabs by this number of spaces</html>"
+Enabled=false
+EditorType=numeric
+CallName="-s"
+MinVal=0
+MaxVal=1024
+ValueDefault=4
+
+[Keywords]
+Category=0
+Description="<html>Change keywords</html>"
+Enabled=false
+EditorType=multiple
+Choices="|-u|-l|-n"
+ChoicesReadable="Properize keywords|Make keywords uppercase|Make keywords lowercase|Don't change keywords"
+ValueDefault=0
+
+[Split Dim]
+Category=0
+Description="<html>Split Dim statements</html>"
+Enabled=false
+EditorType=boolean
+TrueFalse=|-d
+ValueDefault=0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indenters/vbsbeaut.bat	Fri Aug 21 09:44:29 2009 +0000
@@ -0,0 +1,7 @@
+@echo off
+set callpath=%0
+set exeBasePath=%callpath:~0,-13%
+::echo %exeBasePath%
+copy %exeBasePath%vbsbeaut_keywords.txt" .\keywords.txt > nul
+copy %exeBasePath%vbsbeaut_keywords_indent.txt" .\keywords_indent.txt > nul
+%exeBasePath%vbsbeaut.exe" %1 %2 %3 %4 %5 %6 %7
\ No newline at end of file