Consultor Eletrônico



Kbase P117168: OE Architect: How to change the OpenEdge Editor Templates to use lower case keywords?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/12/2008
Status: Verified

GOAL:

OE Architect: How to change the OpenEdge Editor Templates to use lower case keywords?

FACT(s) (Environment):

Windows
OpenEdge 10.1x

FIX:

This is a step by step procedure that may be used to change the OpenEdge Architect Editor Templates to use lower case letters:
1. Select: Window -> Preferences->OpenEdge->Editor->Templates
2. Press: CTRL-A to select them all.
3. Select: Export button to export the default Upper Case Keyword template to the file: "UpperCase.xml".
4. Select: Remove Button to clear all the templates.
5. Run the following ChangeTemplatesToLowerCase.p procedure below from the Procedure Editor to generate the Lower Case Keyword template file: "LowerCase.xml".
/* ChangeTemplatesToLowerCase.p */
DEFINE VARIABLE cInputFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE cInputDirectory AS CHARACTER NO-UNDO.
DEFINE VARIABLE cOutputFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE cOutputDirectory AS CHARACTER NO-UNDO.
DEFINE VARIABLE cLine AS CHARACTER NO-UNDO.
DEFINE VARIABLE iCounter AS INTEGER NO-UNDO.
/* Change the following file and directory assignments as appropriate */
ASSIGN
cInputFile = "UpperCase.xml"
cInputDirectory = "C:\OpenEdge\WRK101A"
cOutputFile = "LowerCase.xml"
cOutputDirectory = "C:\OpenEdge\WRK".
INPUT FROM VALUE (cInputDirectory + "\" + cInputFile).
OUTPUT TO VALUE (cOutputDirectory + "\" + cOutputFile).
/* Copy the first three lines as is*/
DO iCounter = 1 TO 3:
IMPORT UNFORMATTED cLine.
PUT UNFORMATTED cLine SKIP.
END.
/* Copy the rest of the lines in groups of 14 changing only the 5th line */
/* PLEASE NOTE that names and tags need to remain in upper letters. */
REPEAT:
DO iCounter = 1 TO 14:
IMPORT UNFORMATTED cLine.
IF iCounter = 5 THEN
cLine = LC(cLine).
PUT UNFORMATTED cLine SKIP.
END.
END.
INPUT CLOSE.
OUTPUT CLOSE.
6. Select Import button to import the file: "LowerCase.xml".