OpenROAD external editor?

117 views
Skip to first unread message

Paul White

unread,
Aug 30, 2024, 1:06:56 AM8/30/24
to openroa...@googlegroups.com
Hi all,

Has anyone tried using vscode or textpad as a script editor? Something
like this?

II_W4GL_SYSTEMEDITOR=TRUE
II_EDIT="C:\Program Files\TextPad 4\Textpad.exe" -t"%t" "%f(%l)"

We are having trouble creating an efficient script editing / development
environment which is language and object sensitive

I recall seeing a presentation from Bodo demonstrating the use of
Eclipse with OpenROAD.  I think it involved exportapp / importapp
interfaced with external source repositories.
Your tips and suggestions are greatly appreciated.

Thanks

&

Adrian Williamson

unread,
Aug 30, 2024, 4:15:27 AM8/30/24
to openroa...@googlegroups.com

Hi Paul,

 

I used to use TextPad about 15 years ago but I moved onto Notepad++

 

I do recall having some difficulty in creating a functioning command line for OR to fill out with TextPad (I even bought a licence).

 

From an old VM I have I see this:

 

II_W4GL_SYSTEMEDITOR=TRUE

II_WINDOWEDIT="C:\Program Files\TextPad 6\Textpad.exe" -t"%t" "%f(%l)"

II_WINDOWVIEW="C:\Program Files\TextPad 6\Textpad.exe" -r -t"%t" "%f(%l)"

 

For N++ there are some syntax colouring  files produced by Bodo (I think) available. (attached – I think that’s all there is)

 

 

With N++ for some reason (command line flags I suspect at the time) I had to create a batch script interface with symbolic linking to 'get' the component name:

 

II_W4GL_SYSTEMEDITOR=TRUE

II_WINDOWEDIT=f:\RCBatch\w4gledit.bat %t %f

 

W4gledit.bat:

 

@echo off

 

echo %1 %2 %3 %4 %5 %6 %7 %8 %9

 

REM Componentname Filenane

REM c:\ingresii\ingres\temp\wa12345.e67

REM w4gledit %t %f

set INGFILE=%4

set INGPATH=%~dp4

set EXT=%~x4

 

 

REM DEBUG

echo INGFILE= %INGFILE%

echo INGPATH= %INGPATH%

echo EXT= %EXT%

 

REM "Script Editor: process_marking_team"

set COMPNAME=%~3

set COMPNAME=%COMPNAME: =%

set COMPNAME=%COMPNAME:ScriptEditor:=%

 

set W4GLNAME=%INGPATH%%COMPNAME%.script

 

REM DEBUG

echo COMPNAME= %COMPNAME%

echo W4GLNAME= %W4GLNAME%

 

echo INGFILE = %INGFILE%

echo W4GLNAME = %W4GLNAME%

echo Do not Close this Window it controls your editor........

 

REM Symbolically link your file so that you don't have to close the editor

 

mklink %W4GLNAME% %INGFILE%

 

REM If there is an error it maybe because the symbolic link name exists - so remove it

if %ERRORLEVEL% == 1 goto :tidyup

 

if exist "c:\progra~2\Notepad++\notepad++.exe" (

start /WAIT c:\progra~2\Notepad++\notepad++.exe -multiInst %W4GLNAME%

) ELSE (

start /WAIT c:\progra~1\Notepad++\notepad++.exe -multiInst %W4GLNAME%

)

 

 

REM Make back up

copy %W4GLNAME% %W4GLNAME%%EXT%

REM Remove the symbolic link - mklink doen't like it if the file already exists.

:tidyup

del %W4GLNAME%

 

I have been using VS-Code for some python related work which lead me to start using it for SQL as well.

 

I feel another ‘editor’ movement coming - I previously started looking at how to construct an OpenROAD extension for vs-code.

 

Now that the nights are drawing in again I might return to that curiosity.

 

Unless someone on the payroll has already beaten me to that?

 

Cheers

 

Adrian

--

You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.

To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/a313a426-1e96-4002-b7f6-a76e2e0947eb%40gmail.com.

image001.png
OpenROAD.xml

Allan

unread,
Aug 30, 2024, 4:20:45 AM8/30/24
to openroad-users
We, I, used Bodo's N++ files very successfully.

Allan

--
Sent with mail.com Mail app

Adrian Williamson

unread,
Aug 30, 2024, 4:38:19 AM8/30/24
to openroa...@googlegroups.com

Hi,

 

The Scintilla based editor which is used by default can be extended as well.

 

Only played with this enough to get TABS to manifest as 4 spaces and not the ridiculous 8 it defaults to.

 

https://github.com/ActianCorp/OpenROAD_plugins_samples

 

It has not really been released as such (or ‘revenue generation’ would be charging us for it by now) as far as I know.

 

I had to raise a ticket to get more info on it.

 

Cheers

 

Adrian

image001.png
OpenROAD Script Editor and Other New Features Complete.pptx

Bodo Bergmann

unread,
Aug 30, 2024, 5:07:07 AM8/30/24
to openroa...@googlegroups.com

Apart from OpenROAD.xml that Adrian attached, there is another file involved - the UDL (User Defined Language) file: OpenROAD_UDL.xml

The UDL file has to be imported into the "User Defined Language" dialog in Notepad++.

The OpennROAD keywords have also been grouped into 6 different groups (leaving “Keywords7” and “Keywords8” for customizing):
1. 4GL/SQL language statements (except the “Folding” statements, Comment and Operators)
2. Events
3. System defined constants, variables and macrovariables
4. Datatypes and system classes
5. Attributes/Methods of system classes
6. Functions

The customization of fonts and colours is quite simple – just edit the fontStyle, fontName, fgColor and fgColor attributes of the “WordsStyle” elements within the XML file,
If you want to add new keywords it is simple, too – change the according keywords entry in the file.
You could use an XML Editor, or just Notepad++ to change the XML file.
Of course you can change the styling also afterwards in Notepad++ (in the "User Defined Language" dialog).

For adding your own component/attribute/method names as keywords (e.g. to the 7th and 8th group of the Keywords List) I recomment to extract them from XML export files of your applications.
In order to extract component names from an XML export file (created with II_W4GL_EXPORT_INDENTED=TRUE) you do not even have to use XML parser.
E.g. using simple OS commands – below is an example using Unix commands (I actually used Cygwin on Windows):
grep "<COMPONENT name=" *.exp | cut -f2 -d'"'
In order to get the names of all user class attributes/methods you can use this one:
grep "<displayname>" *.exp  | gawk -F">" '{print $2}' | gawk -F"<" '{print $1}' | sort -u

HTH.
Best regards,
Bodo.

Bodo Bergmann

Engineering Architect | OpenROAD Engineering

Actian, a division of HCLSoftware

actian.com    hcl-software.com

 GESELLSCHAFTSANGABEN: Actian Germany GmbH | Registry Off: Halenreie 42, 22359 Hamburg | Geschäftsführung: Stephen Padgett, Marc Monahan | HandelsregisterAmtsgericht Hamburg | HRB 135991 | USt-IdNr: DE252449897 


OpenROAD_UDL.XML

Paul White

unread,
Aug 30, 2024, 8:19:59 AM8/30/24
to openroa...@googlegroups.com
Thanks Adrian and Bodo.

Play time this weekend.

Paul
&

Allan

unread,
Aug 30, 2024, 12:17:22 PM8/30/24
to openroad-users
It's been some years since I retired. How would everyone place the growth or decline of OpenROAD over the past, say, 10 years?

I still remember ABF

Allan

--
Sent with mail.com Mail app
--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.

a...@rationalcommerce.com

unread,
Aug 30, 2024, 1:21:15 PM8/30/24
to 'Allan' via OpenROAD Users Mailing List
World is a changing place with all this nocode tech about.

I have not heard about about a new OpenROAD customer in years.

I mostly get queries now about what alternates there are in the market.

It feels like revenue generation are pushing the customer base through the mangle until they deplatform.

Don't ask me about app server pricing, it gets my blood boiling.

Adrian



------ Original message------
From: 'Allan' via OpenROAD Users Mailing List
Date: Fri, 30 Aug 2024 17:17
To: openroad-users;
Cc:
Subject:Re: Re: [openroad-users] OpenROAD external editor?

It's been some years since I retired. How would everyone place the growth or decline of OpenROAD over the past, say, 10 years?

I still remember ABF

Allan

--
Sent with mail.com Mail app
On 30/08/2024, 13:20 Paul White > wrote:

Paul White

unread,
Aug 30, 2024, 7:09:38 PM8/30/24
to openroa...@googlegroups.com
Hi Allan,
It's good to hear from you.
How are you keeping?
I am pretty busy with Ingres OpenROAD and various web technologies.

IMO OpenROAD capabilities have improved over the years. A couple of years ago I used the URLconnection class to workflow between remote non-Ingres applications entirely without a local database. This year we are working on a similar architecture to connect ERP Ingres corporate systems to a mobile app hosted elsewhere. 

Programmers and DBAs come and go regularly. I think OR programmers who stay for the long term are comfortable (lazy like me) not having to learn a new language every few years. 

IMO the documentation is improving. Workbench unfortunately has taken a step backwards, classic Interface is preferred by many. 

Migrating 32 to 64 bit is still a work in progress as dealing with 3rd party technologies generates instability and unexplained crashes. Debugging and setting up a test case is always a challenge.

Actian support team are excellent. Community support is great with lots of useful material and examples available.  I’m not seeing much movement on my Enhancement Ideas, but occasionally a released patch bug number will come through with my name on it to keep me smiling.

Paul
&

_Andy_

unread,
Aug 31, 2024, 2:44:08 AM8/31/24
to openroa...@googlegroups.com
 Hi Paul

Back in OR4.1 days we used an editor called EditPlus (not free) but allowed us to create our own syntax highlight, auto-completion, and integrated some batch scripts using keyboard shortcuts.
My favourite shortcut was - highlight a word (like a table name) and then Ctrl+1 to generate and open a temp file with:
- a help table run on that highlighted table name, and
- a default values listing for each column in that table - like:  curobject.<column_name> = <default_value_for_that_datatype>;  , and
- the insert/update/delete statements for that table.
Made things a little easier during coding. Added many scripts for other things like generating CSV RW files, Search through DocApp files, etc

Our exe to open EditPlus - took a timestamped before and after copy of the field being edited - as well as a timed BAK file maintained by EditPlus.
Back then we used an AutoIt script to call editplus and we could generate into an EXE file (which always triggered our antivirus software). At some point was going to re-write into C#.
We did this to so we could re-nice the window - rather than have a Dos Command window being displayed.

Ingres environment variables looked a little like this:
ingunset II_VIEW
ingunset II_EDIT
ingunset ING_EDIT
ingsetenv II_W4GL_SYSTEMEDITOR  TRUE
ingsetenv II_W4GL_COMPILEEDITOR FALSE

ingsetenv II_WINDOWEDIT "%xxdir%\bin\or_edit.exe %%f %%l %%e %%t"
ingsetenv II_WINDOWVIEW "%xxdir%\bin\or_edit.exe %%f %%l %%e %%t -r"

I lost my OR job whilst moving into OR 6.2 - during covid and my next job was back to ABF and SC development......

We can use VS Code in my workplace, but not EditPlus.
So, I am trying hard to create similar syntax highlighting, code completion, function lookup, etc with VS Code for ABF and SC, but I have struggled with creating a decent extension.
I have something basic created but not worthy of sharing.
If someone has something like that - please please please share.

Not sure if the above is helpful, but I just found EditPlus to be so quick and easy to configure.

Kind regards, Andy  

Allan

unread,
Aug 31, 2024, 7:44:22 AM8/31/24
to openroad-users
Adrian,

My one contract inquiry with OpenROAD, maybe 4 years ago, involved a company moving from OpenROAD to a web-based platform. Confirms what you say.

I decided I couldn't condone this and at , then, 74 years of age couldn't be bothered either. I backed out of the contract. The agent did say they had 3 people with OR experience already working.

Ingres never seemed to promote and actively sell the database or the development tools.

Allan

--
Sent with mail.com Mail app
--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages