aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-08-13 13:17:27 +0000
committernyamatongwe <devnull@localhost>2003-08-13 13:17:27 +0000
commit66e730976d262e895dcd5ad495ac1b0f687b1a77 (patch)
tree6a7e45dbecf3440912b37c9a3fd7a2bc5f4518ee /src
parent37d13d98b0952de4b22076787778f2232776716c (diff)
downloadscintilla-mirror-66e730976d262e895dcd5ad495ac1b0f687b1a77.tar.gz
Updates the command ID list in SciTEProps.cxx .
Diffstat (limited to 'src')
-rw-r--r--src/LexGen.py55
1 files changed, 35 insertions, 20 deletions
diff --git a/src/LexGen.py b/src/LexGen.py
index da2c11531..d4f1dbf3f 100644
--- a/src/LexGen.py
+++ b/src/LexGen.py
@@ -140,24 +140,39 @@ def FindModules(lexFile):
modules.append(l.split()[1])
return modules
-root="../../"
-lexFilePaths = glob.glob(root + "scintilla/src/Lex*.cxx")
-lexFiles = [os.path.basename(f)[:-4] for f in lexFilePaths]
-print lexFiles
-lexerModules = []
-for lexFile in lexFilePaths:
- lexerModules.extend(FindModules(lexFile))
-otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"]
-propFilePaths = glob.glob(root + "scite/src/*.properties")
-propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps]
-print propFiles
+def RegenerateAll():
+ root="../../"
-Regenerate(root + "scintilla/src/KeyWords.cxx", "//", lexerModules)
-Regenerate(root + "scintilla/win32/makefile", "#", lexFiles)
-Regenerate(root + "scintilla/win32/scintilla.mak", "#", lexFiles)
-Regenerate(root + "scintilla/win32/scintilla_vc6.mak", "#", lexFiles)
-RegenerateBinary(root + "scintilla/gtk/makefile", "#", lexFiles)
-Regenerate(root + "scintilla/gtk/scintilla.mak", "#", lexFiles)
-Regenerate(root + "scite/win32/makefile", "#", lexFiles, propFiles)
-Regenerate(root + "scite/win32/scite.mak", "#", lexFiles, propFiles)
-Generate(root + "scite/boundscheck/vcproj.gen", root + "scite/boundscheck/SciTE.vcproj", "#", lexFiles)
+ # Find all the lexer source code files
+ lexFilePaths = glob.glob(root + "scintilla/src/Lex*.cxx")
+ lexFiles = [os.path.basename(f)[:-4] for f in lexFilePaths]
+ print lexFiles
+ lexerModules = []
+ for lexFile in lexFilePaths:
+ lexerModules.extend(FindModules(lexFile))
+
+ # Find all the SciTE properties files
+ otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"]
+ propFilePaths = glob.glob(root + "scite/src/*.properties")
+ propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps]
+ print propFiles
+
+ # Find all the menu command IDs in the SciTE header
+ SciTEHeader = file(root + "scite/src/SciTE.h")
+ lines = SciTEHeader.read().split("\n")
+ SciTEHeader.close()
+ ids = [id for id in [l.split()[1] for l in lines if l.startswith("#define")] if id.startswith("IDM_")]
+ #print ids
+
+ Regenerate(root + "scintilla/src/KeyWords.cxx", "//", lexerModules)
+ Regenerate(root + "scintilla/win32/makefile", "#", lexFiles)
+ Regenerate(root + "scintilla/win32/scintilla.mak", "#", lexFiles)
+ Regenerate(root + "scintilla/win32/scintilla_vc6.mak", "#", lexFiles)
+ RegenerateBinary(root + "scintilla/gtk/makefile", "#", lexFiles)
+ Regenerate(root + "scintilla/gtk/scintilla.mak", "#", lexFiles)
+ Regenerate(root + "scite/win32/makefile", "#", lexFiles, propFiles)
+ Regenerate(root + "scite/win32/scite.mak", "#", lexFiles, propFiles)
+ Regenerate(root + "scite/src/SciTEProps.cxx", "//", ids)
+ Generate(root + "scite/boundscheck/vcproj.gen", root + "scite/boundscheck/SciTE.vcproj", "#", lexFiles)
+
+RegenerateAll()