sbParagraph
vsCode for SB & MvDB Apps
README
This extension aims to be straightforward.
efv-infodata.sbparagraph defines contributes.languages 'sbparagraph'; meta language of Process PD.P under SB+/SBXA
Extension Content
Language configuration
- Define
sbparagraph
as language code (directory ***PROCESS.VSC* or file .sbp, .pdp)
Snippets
a collection of snippets for the 'completion' function
- sbParagraph := all elements of SB (Common variables, Paragraph Statement, SB Expression).
- sbSubroutines := all documented SB Subroutines by SB itself (General subroutines).
- TUBP := all TUBP subroutines
intellisenseItems
an extensible collection of definitions for the documentation of SB elements & co for the onHover and onSignatureHelp functions.
- sbParagraph := all Statements of SB Pd.P and SB Expression
- sbSubroutines := all SB Subroutines as documented by SB himself
- TUBP : all used TUBP subroutines
- custom defn
Table of Contents
Introduction
When using VSCode to edit our sources, the question arises about how to configure the environment to work either locally (on the UV server, in RDP mode for example) or remotely, and how to integrate the code paragraphs (PD.P) of our applications.
For basic sources, the use of rocketsoftware.rocket-mvbasic explains how to configure your vscode, the useful extensions, and the appropriate settings.
For sbparagraph sources, the use of the extension efv-infodata.sbparagraph explains how to configure the server, the account, the XXPROCESS file, the useful extensions, and the appropriate settings for saving and compiling a process paragraph.
All external Resources (bash Scripts, basic, process are provided in the extension /Resources -> %userprofile%\.vscode\extensions\efv-infodata.sbparagraph-x.y.z\Resources
Documentation Updates
U2/D3 Server Configuration
Workstation Configuration
Remote Mode Usage
If working in remote mode, the details below explain how to use OpenSSH to establish a secure and automated connection to the server.
Local Mode Usage
If working in Local mode, whether RDP or not, access to the UV/account/xxBASIC directories is done directly on the account directory, e.g., %uvdb%\accountName\
. It is at this level that the settings (.vscode, .rmv, ...) will be created, and be aware, they will be common to all developers on the machine.
- Workspace configurations are shared.
- The configurations in %userprofile% remain private (if the user connects with a personal profile...)
General Configurations
The details below explain the global settings to apply to your VSCode installation.
Installing VSCode
- code.visualstudio.com/Download
- In Windows, add the path where the CODE.EXE executable is located to your user environment variable 'PATH', typically
%userprofile%\AppData\Local\Programs\Microsoft VS Code
Global Configuration for VSCode
User Global Configuration
To customize your environment, you can define items globally in the %appdata%\Code\User\
directory.
Workspace Management
---------- Top ----------
Uv / Udt Server settings
U2 Server Settings
This setting concerns the synchronization of source codes for basic and paragraph in a file-directory to be (synchronized and) edited locally in VSCode.
- Place a trigger on the file XXPROCESS that copies the source code into XXPROCESS.VSC, which is a type 19 file located in the account directory.
- When XXPROCESS is updated, the trigger
/Resources/UV/IN.VSC.PDP.TRG
will
- extract the source code and place it in the file/dir XXPROCESS.VSC,
- calculate a checksum that will allow for the control of the synchronization of the elements if necessary.
- This principle is applicable to any file: FXX.HTML, etc.
- The 'BASIC' sources are directly accessible to the OS.
- In the SFTP extension, configure
${sftp.remotePath} == /account.path
cf. -> (UV.ACCOUNT account <11>)
- The update of the basic and xxprocess.VSC occurs in real-time due to SFTP synchronization.
- The compilation of the basics is done at the programmer's request by executing a Task.
- The update of processes in UV is done at the programmer's request by executing a Task.
linux scripts
/Resources/D3/d3 GC process
/Resources/D3/uv -> d3 -> GC process
Uv Account files Setup
Implementation of exchange directories and triggers
- create.file XXPROCESS.VSC as type 19,
- create.file XXPROCESS.VSC.STAMP as type database,
- create trigger on XXPROCESS,
- fill XXPROCESS.VSC.
Copier ce VOC/Paragraph dans votre VOC xxapp VSC.SET.TRG et exécutez le via VSC.SET.TRG XXPROCESS
PA
CATALOG INBASIC.UV IN.VSC.GC
CREATE.FILE <<I2,filename>>.VSC 17,4,18 1,1,19
CREATE.FILE <<I2,filename>>.VSC.STAMP 17,4,18 101,4,18
DROP TRIGGER <<I2,filename>> IN_VSC_PDP_TRG;
CREATE TRIGGER IN_VSC_PDP_TRG AFTER INSERT OR UPDATE OR DELETE ON <<I2,filename>> FOR EACH ROW CALLING '*IN.VSC.PDP.TRG';
LIST.SICA <<I2,filename>>
SELECT <<I2,filename>> WITH F1 "P"
COPYI FROM <<I2,filename>> TO <<I2,filename>> OVERWRITING
[!NOTE] Si vous avez l'erreur Unable to locate trigger program "*IN.VSC.PDP.TRG", vous pouvez lancer la commande suivante et réessayer.
CATALOGI INBASIC.UV *IN.VSC.PDP.TRG IN.VSC.PDP.TRG FORCE
It seems that the Markdown chunk you intended to provide for translation is missing. Please provide the text you would like me to translate, and I'll be happy to assist you!
---------- Top ----------
d3 Server settings
D3dev Server Settings
For the d3dev server located on dbServer: linux, configuration is required at multiple levels since none of the d3 files are visible from the OS and a d3 account does not correspond to a directory.
The source codes of basic and paragraph must be synchronized from d3 to the OS in a file-directory to then be (synchronized and) edited locally in VSCode.
The sources of xxapp will be synchronized via callx(trigger) in a root directory on the OS with the following path:
- default config: INPPP VSC.PATH ->
/dos/commun/vscode/d3dev/
- local config: MD QS.VSC
<1> QS <3> unix:/dos/commun/vscode/d3dev/
- thus, each xxapp will have its sources in
/dos/commun/vscode/d3dev/account/filename
- and therefore under SFTP:
${config:sftp.remotePath}
points to /dos/commun/vscode/d3dev/account
example: AC: sysid of Accountix app, G: sysid of stockix app
- d3dev>dos/commun/vscode/d3dev
- AC.PROG
- ACPROCESS
- ACBASIC
- ACINCLUDE
- ACPROGS
- STOCKIX+
- GPROCESS
- GBASIC
- GINCLUDE
- GPROGS
sync d3 > os
To populate /dos/commun/vscode/d3dev/account/filename
, we will leverage a callx on:
- the file XXPROCESS
- the source files BASIC (XXBASIC, XXPROGS, XXINCLUDE, ... )
- you can add other files to present to vscode
The root path of vscode is set to MD QS.VSC (<1> QS <3> unix:/dos/commun/vscode/d3dev)
otherwise, it can be found in INPPP VSC.PATH <1> /dos/commun/vscode/d3dev
d3 Setup
Note: You can manually configure the XXfiles in XXDEFN VSC.FILES; otherwise, the system will attempt XBASIC, XXBASIC.D3, XXBASIC.UV, XXBASIC.UD, XXBASIC.UDT, XXINCLUDE, XXPROCESS, XXPROGS
Note: > A tool is provided to initialize the callx /Resources/D3/IN.VSC.INIT.CALLX
RUN IN-TOOLS,INBASIC.D3, IN.VSC.INIT.CALLX SYSID XX
On can start and restart the program without any issues.
Note: for XXPROGS, synchronization only applies to basics that are not paragraph compilations.
os > d3
The synchronization of local sources to Linux /dos/commun/vscode/d3dev/account/filename
is performed in real-time via SFTP when you save your work (Ctrl-s).
Synchronization to d3 is initiated by the developer through the execution of the vscode task task D3
---------- Top ----------
Linux (open)SSH Server Settings
To set the permissions to 'group' level, you need to adjust /etc/ssh/sshd_config to add the option "-u 0002" to the line subsystem sftp-server
(this changes the session umask to 0002, equivalent to chmod 775).
Subsystem sftp /usr/libexec/openssh/sftp-server -u 0002
From then on, when you create a directory or file via sftp, it will have permissions rw-rw-r--, meaning rw for the owner and rw for the group.----------
---------- Top ----------
Open SSH on Windows
Windows (Open)SSH Server Settings
Note: Execute it with elevated permissions >
Check Installation
To verify if a package is installed
get-process sshd
##
##Handles NPM(K) PM(K) WS(K) CPU(s) Id SI Proces
##------- ------ ----- ----- ------ -- -- ------
## 113 10 1840 7620 19320 0 sshd
Install Windows > 2016
using PowerShell:
Add-WindowsCapability -Online -Name OpenSSH.Server*
## Or using DISM:
dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0
Install Windows <= 2016
## Execute it with elevated permissions
## enable tls1.2 for downloads
[Net.ServicePointManager]::SecurityProtocol [Net.SecurityProtocolType]::Tls12
## creating openssh folder and download the zip
mkdir c:\openssh-install
cd c:\openssh-install
## update to the latest version if you want the most recent release
Invoke-WebRequest -Uri "https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win64.zip" -OutFile .\openssh.zip
## will not work in $psversion 4 winServer 2012; extract it manually
Expand-Archive .\openssh.zip -DestinationPath .\openssh\
cd .\openssh\OpenSSH-Win64\
## required to enable the service
setx PATH "$env:path;c:\openssh-install\openssh\OpenSSH-Win64\" -m
## required to install the service
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
#### How to Configure OpenSSH.Server on Windows
```powershell
## fix firewall
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
## define service automatic
Set-Service -Name sshd -StartupType 'Automatic'
##edit \sshd_config
## ... uncomment PubkeyAuthentication yes
## ... check Subsystem sftp sftp-server.exe
##... comment #Match Group administrators
## #AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
notepad C:\ProgramData\SSH\sshd_config
## start theservice
Start-Service sshd
[!NOTE] If your domain\users are connected to AzureAD, you will not be able to use them; openSSH is not compatible with this type of user. You will need to create LOCAL users.
- Create a LOCALUserGroup: sshUsers
New-LocalGroup -Name "sshUsers"
Add-LocalGroupMember -Group "universe" -Member "sshUsers" # pour que les membres de sshUsers aient accès aux fichiers uv
$user 'user1'
New-LocalUser -Name "$user" -Description "$($user) for ssh usage" -NoPassword
Add-LocalGroupMember -Group "sshUsers" -Member "$user"
New-Item -Path "c:\users\$user\.ssh" -Type Directory # pour y stocker le fichier authorized_keys
New-Item -Path "c:\users\$user\.ssh" -Name "authorized_keys" -ItemType "File" -Value "" # pour initialiser le fichier
## placer la pub key dans le fichier
---------- Top ----------
OpenSSH on the Client Machine
Install OpenSSH
If necessary...
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
## La sortie suivante doit être retournée si aucun n’est déjà installé :
##Name : OpenSSH.Client~~~~0.0.1.0
##State : NotPresent
##Ensuite, installez les composants serveur ou client selon vos besoins : Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
## start ssh-agent service
Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service
-
if the ssh-agent service is not running error connecting to agent no such file or directory
Init Open SSH
Create the key pair id_rsa
Create the key pair id_rsa
((id_rsa is the default name, you can change it during execution)) by entering the following command in PowerShell and following the different steps
ssh-keygen -t rsa
you now have two files available in your directory %userprofile%\.ssh
, each containing a single line of encrypted text that makes up the key value; you can open the file id_rsa.pub to copy the value.
- id_rsa which contains the private key, to be kept private
- id_rsa.pub which contains the public key
Publish the public key on dbServer
Publish the public key on dbServer, the value of the ssh public key will be stored in ~/xxxuser/.ssh/authorized_keys
- Insert the public key into the dbServer.domain server via the command prompt as an administrator
## ensure .ssh dir exist
ssh username@dbServer mkdir /home/DOMAIN/{username}/.ssh
## Use scp to copy the public key file generated previously on your client to the authorized_keys file on your server
scp %userprofile%/.ssh/id_rsa.pub {username}@dbServer:/home/DOMAIN/{username}/.ssh/authorized_keys
ssh username@dbServer chmod 700 /home/DOMAIN/{username}/.ssh
ssh username@dbServer chmod 600 /home/DOMAIN/{username}/.ssh/authorized_keys
- or manually by copying the content of the file %userprofile%/.ssh/id_rsa.pub to dbServer:/home/DOMAIN/{username}/.ssh/authorized_keys
[!NOTE] If when you do "SFTP Sync remote -> local" or "SFTP - Download Project", you encounter the following error All configured authentication methods failed.
Check the /var/log/secure file on the Linux server for any messages explaining the issue.
Example:
Apr 18 11:46:21 dbSserver sshd[267069]: Authentication refused: bad ownership or modes for file /home/DOMAIN/.ssh/authorized_keys
Apr 18 11:46:21 dbSserver sshd[267069]: Received disconnect from 192.168.X.X port 55522:11: [preauth]
Apr 18 11:46:21 dbSserver sshd[267069]: Disconnected from authenticating user domain 192.168.X.X port 55522 [preauth]
In this case, check:
- 1. Check the owner of the file and the .ssh folder
ls -ld /home/DOMAIN/{username}/.ssh
ls -l /home/DOMAIN/{username}/.ssh/authorized_keys
The two must belong to the user {username}
If not:
chown {username} /home/DOMAIN/.ssh
chown {username} /home/DOMAIN/.ssh/authorized_keys
- 2. Correct permissions if necessary
- .ssh folder: 700
- authorized_keys file: 600
chmod 700 /home/DOMAIN/{username}/.ssh
chmod 600 /home/DOMAIN/{username}/.ssh/authorized_keys
Note: Publish the private key on the Windows server
- Provide your key to the Windows admin who will add it
- either to your user ~user/.ssh/authorized_keys
- or create a LOCALUser; store the public key there and inform you of the user to use (serverName\localusername)
Load the private key into memory
Load the private key into memory.
The key can now be used without needing to unlock it each time.
ssh-add %userprofile%\.ssh\id_rsa
Define %userprofile%.ssh\config
The OpenSSH system allows you to declare configurations for multiple remote servers, which helps centralize them.
You need to edit the file %userprofile%.ssh\config
Insert the references for the dbServer (and others) into your local file %userprofile%.ssh\config
Host dbServer
HostName dbServer.domain
User {userid}
IdentityFile %userprofile%\.ssh\id_rsa # optionnal if the key is loaded in ssh-add/ssh-agent,
---------- Top ----------
vscode Global Settings
The file settings.json
located in %appdata%\code\user\
allows you to define global user settings.
FileAssociations
{"files.associations":
{
"**/*BASIC*/*": "rocket-mvbasic",
"**/*INCLUDE/*": "rocket-mvbasic",
"**/*PROGS/*": "rocket-mvbasic",
"**/BP/*": "rocket-mvbasic",
"**/*PROCESS.VSC/*": "sbparagraph",
"**/*PROCESS/*": "sbparagraph",
}
}
Terminal SSH Interne
Vous pouvez ajouter un Terminal Interne qui va exploiter SSH et la clé gérée en ssh-agent. La configuration fait références à des settings mis plus loin
"terminal.integrated.profiles.windows": {
"ssh dbServer": {
"args": [
"${config:sbparagraph.credential.os.UserId}@${config:sbparagraph.credential.account.server}" // user@server
],
"path": "C:\\Windows\\System32\\OpenSSH\\ssh.exe"
}
},
---------- Top ----------
RocketSoftware.Rocket-MVBasic
This extension is essential for editing mv BASIC code; you will need it.
- Install the extension rocket-mvbasic
code --install-extension RocketSoftware.rocket-mvbasic
Note: On systems without internet access, you will need to copy the file RocketSoftware.rocket-mvbasic-X.Y.0.vsix from the address https://marketplace.visualstudio.com/items?itemName=RocketSoftware.rocket-mvbasic > 'Download Extension' and then
code --install-extension RocketSoftware.rocket-mvbasic-X.Y.0.vsix
- Install OpenJDK Java 11 OpenJDK >11.0.2 ... look for >21.0.0
- Configure in vsc global settings.json
"rocketMvBasic.languageServer.jdkEnvironment": "C:\\Program Files\\Java\\jdk-xx.y.z\\bin",
```----------
[---------- Top ----------](#readme.md)
<a id="extSftpSettings.md"></a>
## SFTP Settings
### liximomo.RemoteFS
Note: If you are working in Remote mode, this extension will allow you to declare your servers and your access to them with the Natizyskunk.sftp extension, preventing the need to repeat these configurations for each Account.
- Install the [SFTP](https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp) extension
- Add your server login configuration to the main settings so that it remains the same for all vscode environments
- > SFTP merges the settings from .ssh\config with these >
```json %AppData\Code\User\settings.json
"remotefs.remote": {
"dbServer": {
"host": "dbServer", // the 'Host' from .ssh\config
"rootPath": "/home/userid", // the generic login path, put your /home
"scheme": "sftp",
"agent": "\\\\.\\pipe\\openssh-ssh-agent", // if you are using Open-SSH win32
//"agent": "pageant", //** if you are using PUTTY's agent: set "pageant" as the value.
}
},
Natizyskunk.sftp
Note: If you are working in Remote mode, this extension will manage the synchronization of source directories from the server to the local working point on your workstation. It works in conjunction with liximomo RemoteFS for defining access.
- Install the Natizyskunk.sftp extension
code --install-extension Natizyskunk.sftp
----------
---------- Top ----------
efv-infodata.SBParagraph
Introduction
This extension simply defines the sbparagraph
language for files in the **/*PROCESS{.VSC}/*
directory, providing:
- syntax highlighting,
- standard commands and expression elements of an SBParagraph, via snippets,
- compilation of sbparagraph through VSCode.Tasks and vscode variable settings.
- the 'Format document' command (a documentFormatter)
- the onHover function to display documentation for the hovered element (sbCommon, sbParagraphStatement, SBSubroutine, TUBPSubroutine) via provided intellisenseItems.json
- the onSignatureHelp function to show documentation for the argument currently being entered in functions AND processes (EXEC process, P(process,))
- the ability to define custom.intellisenseItems.json in a directory; these intellisenseItems.json are displayed when the mouse hovers over the name
- package.json
- language-configuration.json
- syntaxes sbparagraph.tmLanguage.json
- snippets sbParagraph syntax/exp/func
- tasks.json to run the GC on the XXPROCESS.VSC (via save-as ~/.vscode/tasks.json)
- configuration
- credential (user Level)
- account (workspace Level)
- configuration (workspace Level)
- margin : boolean : should the paragraph code be formatted with a margin equivalent to a tabSize yes/no
- defaultIntellisensePath (global user definition)
- customIntellisensePath (workspace definition)
- problemPatterns sbpProblemPatternGpVscGcRmtPDP
- problemMatchers sbpGpVscGcRmtProblemMatcher
Installation
This extension is managed via git on Bitbucket, and deployment is done from the marketplace efv-infodata.sbparagraph
code --install-extension efv-infodata.sbparagraph
- Note: on systems closed to the internet, you will need to copy the sbparagraph-last.vsix file locally and then run
code --install-extension efv-infodata.sbparagraph.vsix
SBParagraph Credentials
To set up the login credentials for server access, you can define your credentials in your 'private' file %userprofile%\AppData\Roaming\Code\User\settings.json either through > Settings > menu or by editing the settings.json file.
Settings > filter: sbparagraph.credential
{
"sbparagraph.credential.User.Name": "your name",
"sbparagraph.credential.User.Email": "you@infodata.lu",
"sbparagraph.credential.Os.UserId": "userlogin",
"sbparagraph.credential.SB.UserId": "sbuserid",
"sbparagraph.credential.SB.UserPasswd": "sbpasswd"
}
[!NOTE] a sbpasswd is required!----------
---------- Top ----------
This extension will bring various Contribution Points to VSCode and different extensions.
- in the form of snippets:
- global -> comments
- rocket-mvbasic -> uniBasic
- rocket-mvbasic -> sbSubroutine
- rocket-mvbasic -> inSubroutine
- rocket-mvbasic -> wiSubroutine
- sbParagraph -> inProcess
This extension is managed via git on Bitbucket, and deployment is done from the marketplace efv-infodata.intools
code --install-extension efv-infodata.intools
[!NOTE] On systems without internet access, you will need to copy the sbparagraph-last.vsix file locally and then run code --install-extension efv-infodata.intools.vsix
----------
---------- Top ----------
user Snippets
Example of 'custom' snippets for the rocket-mvbasic
language, file to be saved in the user settings as:
{
"userid-hh": { // fixe userid
"prefix": "hh",
"description": "commentaire d'entete de code source pour insérer data/user/comment/reference",
"body": [
"* ${CURRENT_YEAR}/${CURRENT_MONTH}/${CURRENT_DATE} [${1:indice}] userid : ${2:commentaire} : Ticket ${3:ticket} https://ticket.integrix.lu/?sav=$3" //*fix userid
]
}
}
---------- Top ----------
keyboard shortcuts
KeyBindings allow you to associate actions in vscode with keys/key combinations in vscode.
Such as:
- {f2} Save and compile Process
- {f8} Save and compile BASIC
- {ctrl-f8} Select the current line and execute at remote TCL
[
{
"$comment": "run the task 'GC Process'",
"args": "GC Process",
"command": "workbench.action.tasks.runTask",
"key": "f2",
"when": "editorTextFocus && editorLangId sbparagraph"
},
{
"$comment": "run the task OE BASIC",
"args": "OE BASIC",
"command": "workbench.action.tasks.runTask",
"key": "f8",
"when": "editorTextFocus && editorLangId rocket-mvbasic"
},
{
"$comment":"select the current line and execute the task doAtTcl",
"args": {
"commands": [
{
"command": "cursorHome"
},
{
"command": "cursorEndSelect"
},
{
"command": "workbench.action.tasks.runTask",
"args": "doAtTcl"
}
]
},
"command": "runCommands",
"key": "ctrl+f8",
"when": "editorTextFocus"
}
]
```----------
[---------- Top ----------](#readme.md)
<a id="wksInitialisation.md"></a>
## Workspace Configuration
### Concept
This section defines the parameters of __A__ working environment, an account, ...
As a reminder, VSCode can operate in 3 modes:
- __File__ mode: a single file (Open file)
- __Single-Root__ or Folder mode: a directory (Open Folder)
- __Multi-Root__ mode: multiple directories (Open Workspace, add folder, add folder) ... all defined in a __xxx.code-workspace__ file.
- A file that can contain 'settings'; currently (v1.4.0 03-2022) rocket-mvbasic does not support multi-root mode.\
> v1.5.0 1/4/2022 rocket-mvbasic supporte le multiworkspace mais attention que chaque 'folder' ajouté au workspace se vera créé un répertoire .rmv avec les paramètres individuels, rocket-mvbasic ne met pas ces programetres de workspace dans le fichier code-workspace dans lequel vscode place la liste des folders et les settings du workspace.\
! In conclusion, it's not advisable to work this way!
[!Note]
The documentation refers to `${workspace}`. With the rocket-mvbasic extension, we work in __Single-Folder__ mode, so the $(workspace) is __a directory__ located on your work machine.
As a result, it is recommended to work as follows:
- Create a 'central' starting directory: `.\Localdev`
- Create as many directories as there are XX applications (aka .SYSID) managed with VSCode. (SBLocal IN+DM, WILocal, XXLocal)
- a $(workspace) is therefore a directory under the central _'.\LocalDev\'_
- we will thus have the following structure:
- _LocalDev_
- __XX-Local__
- __.vscode__
- __settings.json__ -> vscode configuration for this workspace
- __sftp.json__ -> Natizyskunk.sftp configuration for this workspace
- __tasks.json__ -> vsCode.Tasks configuration for this workspace
- __.rmv__ -> rocket-mvbasic configuration for this workspace
- __config__
- __db.mvbasic.json__ -> configuration for unirpc access to the XX app server and file names
- __format.mvbasic.json__ -> configuration for formatting basic codes
- __groupView.mvbasic.json__ -> configuration for creating a secondary grouping in the vsCode explorer
- __cache__ -> internal use
- __documentation__
- __universe__
- __custom.json__ -> function documentation declaration for XXapp / function signatures (though this may not be very efficient).
- __XXBASIC__ -> source directory
- __XXBASIC.UV__ -> same
- __XXPROGS__ -> same
- __XXINCLUDE__ -> same
- __XXPROCESS{.VSC}__ -> same
- ...
- __XY-Local__ -> another xxapp
- .vscode
- .rmv
- XYBASIC
- XYBASIC.UV
- XYPROGS
- XYPROCESS.VSC
- it is advisable to have synchronization of system elements such as:
- _localDev_\SBPLUS
- DMSKELCODE
- TUBP
- _localDev_\UV
- include
- _localDev_\xxx, all applications with global tool characteristics
----
### Workspace Initialization
- Creation of the local directory (Folder) -> $(workspace)
- Launching VSCode in this directory or go to vsCode > File > Open Folder
- > as of 2022-03, rocket-mvbasic does not support multi-workspace (the concept of Workspace where the member directories are not contiguous).
```powershell initVSC.ps1
$localDev 'c:\LocalDev'
New-Item -Path $localDev -Type Directory -ErrorAction SilentlyContinue
set-location $localdev
$xx (read-host -Prompt 'value of XX')
New-Item -Path "$($xx)-local" -Type Directory -ErrorAction SilentlyContinue
set-location "$localdev\$xx-local"
New-Item -Path ".vscode" -Type Directory -ErrorAction SilentlyContinue
New-Item -Path ".rmv" -Type Directory -ErrorAction SilentlyContinue
New-Item -Path ".rmv\config" -Type Directory -ErrorAction SilentlyContinue
vsCode settings
$(workspace)\.vscode\settings.json
est un fichier qui contient les settings vscode spécifique à ce workspace/account
---------- Top ----------
Synchronization
Initial Sync
Run the vsCode command {f1} SFTP: Download Project which will prompt you to confirm the destination directory and download the directories and files locally.
On-Demand Sync
Run the vsCode command {f1} SFTP: Sync Remote -> Local which checks for any missing local files.
Usage
Any creation/modification & saving of a file will upload it to the server.----------
---------- Top ----------
SBParagraph on Workspace
The extension allows you to define settings that will be used in the task.json
Environment
- "sbparagraph.account.path": "/path",
- under UV it's the path of the account /data/uvdb55/account,
- under d3 it's the /dos/commun/vscode/d3dev/account
{
"sbparagraph.account.server": "dbServer.domain",
"sbparagraph.account.os": "Linux", // Windows
"sbparagraph.account.oe": "D3", // UV
"sbparagraph.account.name": "account",
"sbparagraph.account.path": "/path", // check path - under UV it's the path of the account /data/uvdb55/account, under d3 it's the /dos/commun/vscode/d3dev/account
"sbparagraph.account.sysid": "XX"
}
intellisenseItems
settings.sbparagraph.configuration.defaultIntellisensePath
sera déclaré dans le vscode/setting du user (%appdata%\Roaming\Code\User)
settings.sbparagraph.configuration.customIntellisensePath
sera déclaré dans le vscode/setting du workspace (.vscode/settings.json)
Ce settings, permet de définir une liste (array) de path ou l'extension va trouver des fichiers .intellisenseItems.json
Ces fichiers répondent au schema Resources\intellisenseItems-schema.json, reprenant :
"keyword": {
"documentation": "string |string[]",
"kind": "sbcommon", //"basicSubr","basicProg","basicFunction","sbProcess","dataDefn","equate","variable","statement","other"
"label": "idem keyword",
"signature": "arg,arg,arg,arg",
"syntax": "string string[]",
"parametres":[
{
"label": "arg",
"documentation":"string|string[]"
}
]
}
- keyword = the word as it appears in the programs (@VALUE, DISP, SB.EXECUTE, TU.CHECK.DIRECTORY, ...)
- documentation = |Explanation of the element; can be in markdown format and must be a string with \r\n or an array of strings
- kind = data type "basicSubr","basicProg","basicFunction","sbProcess","dataDefn","equate","variable","statement","other" presented in the documentation header
- label = same as keyword
- signature = the list of arguments for a subroutine or process; will be used to assist in entering the arguments of a CALL or EXEC
- syntax = example of code as it should be used; can be in markdown format and must be a string with \r\n or an array of strings
- parameters = the details of the list of parameters {label, documentation}!! note, the 'label=arg' must match those in 'signature=arg,arg,arg'
see examples in Resources
Local Implementation
For the setting settings.sbparagraph.configuration.defaultIntellisensePath, a set of *.intellisenseItems.json files has been prepared.
To place them on your machine, I suggest creating a local access point 'Globals' (for example c:\localdev\globals) and configuring vscode with sftp as follows:
And configure (%appdata%\Code\Usersettings.json::sbparagraph.configuration.defaultIntellisensePath) to this directory "c:\localdev\globals".
From time to time, depending on the refreshes performed on the server; you will launch vscode in this directory and synchronize the data via the command SFTP: Sync Remote -> Local
SFTP Configuration
{
"remote": "dbServer",
"remotePath": "/dos/commun/vscode/rmv_defn/documentation/universe",
"uploadOnSave": true,
"downloadOnOpen": true,
"ignore": [
"**/*.md",
"**/*.zip",
"**/*.py"
]
}
##### Build intellisenseItems.json depuis une xxAPP
Il existe 3 programmes IN-tools pour construire les valeurs intellisenseItems d'une XXAPP.
Par défaut, le résultat est dans `dbServer::/dos/commun/vscode/rmv_defn/documentation/universe`
- `/Resources/UV/IN.VSC.SNIP4SUBR` : `IN.VSC.SNIP4SUBR SYSID xx FILES file[,file[,]] {BASEPATH '/dos/commun/vscode/rmv_defn/documentation/universe'} [LIST savedlist[,savedlist[,]]]`
- FILES est la liste des fichiers à traiter (XXBASIC, XXBASIC.UV, ...)
- LIST est un code de savelist dans XXINCLUDE pour limiter les traitements ; si plusieurs FILES sont demandés, les LIST id peuvent être fournis dans le même ordre
- `/Resources/UV/IN.VSC.SNIP4PROC` : `IN.VSC.SNIP4PROC SYSID xx {BASEPATH '/dos/commun/vscode/rmv_defn/documentation/universe'} [LIST savedlist] [ITEMID itemid]`
- LIST est un code de savelist dans XXINCLUDE pour limiter les traitements
- `/Resources/UV/IN.VSC.SNIP4EQUS` : `IN.VSC.SNIP4EQUS SYSID xx {BASEPATH '/dos/commun/vscode/rmv_defn/documentation/universe'}`
----
### Déclaration in-code
Afin de donner des instructions de génération / compilation, vous pouvez déclarer dans votre code des keyword=valeur
#### PD.DESCRIPTION
- dans un commentaire PD.DESCRIPTION=valeur charge la valeur dans l'attribut <2> du Process
#### PD.DICTFILENAME
- si le keyword `PD.DICTFILENAME` est trouvé, la valeur située après le signe `=` est utilisé pour charger l'attribut <5> du PD.P ; le Dict File Name
- si le fichier nommé ne peut pas être ouvert, le système ne charge pas ce nom
- dans un commentaire `PD.DICTFILENAME=**filename**` ;* seul un commentaire est supporté après le filename ; le 'point-virgule' est
exemple :
```plain
* blabla
* PD.DICTFILENAME FCT.CHT ;* le process tourne sur un environnement FCT.CHT
* MY CODE
---------- Top ----------
Rocket-MVBasic on workspace
To initialize rocket-mvbasic in the $(workspace), launch {F1}: Activate Rocket MV BASIC -> @command:vscode-rocket.mv.basic.command.activate.
This will create the configuration environment:
.vscode\settings.json
{
"[rocket-mvbasic]": {
"editor.codeLens": false
},
"files.associations": {
"**/.rmv/config/**": "jsonc"
}
}
.rmv\config\db.mvbasic.json
{
"version": "1.0",
"db": { // permet à l'extension de prendre un login uni-oject java sur le serveur
"account": "accountName", // fix AccountName in UVACCOUNT
"host": "dbServer.domain", // fix uv server
"userName": "user_id", // fix user id -* au 202206 on ne peut pas mettre cela en transitif vers des usersettings
"password": "user_passwd", // fix user passwd ** au 202206 on ne peut pas mettre cela en transitif vers des usersettings
"dataSource": "UNIVERSE", // universe ou unidata ** au 202206 pas encore D3
"port": 31438 // port unirpc
},
"catalog": {
"isSearchAllDirs": false,
"programDirs": [
{
"fileName": "XXBASIC.UV"
}, // fix XX
{
"fileName": "XXINCLUDE"
}, // fix XX
// le fichier XXPROCESS.VSC n'est pas listé car rocket-mvbasic ne peut pas y trouver de code
// cette partie fait référence à des fichiers situés
// dans un autre 'account' qui a été 'localisé'
// cela permet de sauter sur le code source via F12
{
"account": "SBPLUS", "fileName": "INBASIC"
},
{
"account": "SBPLUS", "fileName": "INBASIC.UV"
},
{
"account": "SBPLUS", "fileName": "INBASIC.UD"
},
{
"account": "SBPLUS", "fileName": "INBASIC.D3"
},
{
"account": "SBPLUS", "fileName": "INPROGS"
},
{
"account": "WI", "fileName": "WIBASIC"
},
{
"account": "WI", "fileName": "WIINCLUDE"
},
{
"account": "WI", "fileName": "WIPROGS"
}
]
},
"includeMapping": [
{
"account": "WI",
"fileName": "WIINCLUDE",
"includeFile": "WIINCLUDE"
},
{
"account": "UV",
"fileName": "include",
"includeFile": "UNIVERSE.INCLUDE"
}
],
"accounts": [
{
"name": "SBPLUS",
"path": "mypath\\LocalDev\\sb-local" //fix mypath
},
{
"name": "WI",
"path": "mypath\\LocalDev\\wi-local" //fix mypath
},
{
"name": "UV",
"path": "c:\\u2\\uv"
}
]
}
[!NOTE] If you are working in Local ServeurUV mode via RDP, the username will be common to all users. Currently, rocket-mvbasic does not allow (2022-03 v1.4.0) setting an access profile that would be declared in the user-level settings and thus vary by user.
If you do not want to reveal a user's password, it is advisable to create a dedicated user for editing in vscode.
Rocket-mvbasic offers a default setting.
.rmv\config\groupView.mvbasic.json
The groupView allows you to create an 'explorer' that will group files based on predefined lists or on a separator and a number of segments in the program name.
Rocket-mvbasic provides a default configuration using '.' as a delimiter for groups of two segments (G0.2).
This applied example shows us:
- a basic setting based on G0.2 to create a grouping code.
- a setting efv's dev that lists some files.
- a setting Triggers that selects certain files.
Example:
{
"version": "1.0",
"groupView": {
"ignore": [],
"default": {
"delimiter": ".",
"level": "2"
},
"groups": [
{
"sourceDir": "INBASIC.UV",
"groupName": "efv's dev",
"include": [
"IN.VSC.*",
"UV.*"
]
},
{
"sourceDir": "INBASIC.UV",
"groupName": "Triggers",
"include": [
"*TRG*",
"*TRIG*"
]
}
]
}
}
---------- Top ----------
SFTP extension on workspace
Applicable if working in remote mode, this setting will link the server...
Settings
To initialize the extension, save the file $(workspace).vscode\sftp.json
- set the path on the server
- set the list of directories and files to synchronize same as gitignore configuration
- remote :"dbServer" refers to the configuration named under remoteFs in global settings.json -> remoteFS
- remote : "dbServer", // refers to a definition in %userprofile%\app\rooming\code\user\settings.json>remotefs.remote
- remotePath : "/path", // check path - under UV it's the path of the account /data/uvdb55/account, under d3 it's /dos/commun/vscode/d3dev/account
- uploadOnSave : true,
- downloadOnOpen : true, // synchronizing from the server
- ignore : the ignored list // by default, everything is ignored ** and then we specify what is not ignored, (yes, there is no "include" property.)
{
"remote": "dbServer",
"remotePath": "/path",
"uploadOnSave": true,
"downloadOnOpen": true,
"ignore": [
"/**",
"!/XXBASIC", //check XX
"!/XXINCLUDE",
"!/XXPROGS",
"!/XXPROCESS.VSC",
"!/XXPROCESS",
"!/XXBASIC/*",
"!/XXINCLUDE/*",
"!/XXPROGS/*",
"!/XXPROCESS.VSC/*",
"!/XXPROCESS/*",
]
}
---------- Top ----------
Synchronization
Initial Sync
Run the vsCode command {f1} SFTP: Download Project which will prompt you to confirm the destination directory and download the directories and files locally.
On-Demand Sync
Run the vsCode command {f1} SFTP: Sync Remote -> Local which checks for any missing local files.
Usage
Any creation/modification & saving of a file will upload it to the server.----------
---------- Top ----------
Tasks on workspace
The configuration of vscode/Tasks is editable by the user.
The configuration below provides two vscode/Tasks:
UV BASIC which allows you to compile a basic program without being connected via rocket.mvbasic.
GC PROCESS which enables synchronization of a XXPROCESS.VSC to XXPROCESS and transpiles it to SBExp \ > If the transpilation fails, the error message is reported and the save is canceled. \ > If the transpilation succeeds, the GC compilation is initiated.
Save the file under ..vscode\tasks.json
Edit the file to set the path to the account and fix the XXX
Note: You will find the default Tasks.json files for our platforms UVRemote, UVLocal, D3SSH in %userprofile%/.vscode/extensions/efv-infodata.sbparagraph-x.y.z/Tasks
The tasks.json file is structured as follows:
{
"version": "2.0.0",
"tasks": [ task ]
}
An object task consists of:
{
"label": " fixme ",
"type": "process" ! "shell",
"command": " . ",
"args": [ ],
"presentation": {},
"group": {}
"problemMatcher": {} | [], // **optionnel**
}
---------- Top ----------
Tasks to Manage with D3
ProblemMatcher GC Process
The sbparagraph extension provides a contributes.problemMatchers sbpGpVscGcRmtProblemMatcher that you can reference in the GC Process task returns.
{
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher"
}
Presentation
Task settings to manage the 'output' panel.
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
}
tasks Sync D3
Note: If you wish to modify the group, the owner, the chmod of the file, or execute any other command before mounting to d3, do so in the script d3_vsc_gc.sh by passing it other arguments and completing the script.
sync & compile BASIC
{
"label": "OE BASIC", // linked to keyboard shortcut {f8}
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
"-t",
"/FIXME/scripts-live/d3_vsc_gc.sh",
"-a ${config:sbparagraph.account.name}", // workspace setting
"-s ${config:sbparagraph.account.sysid}", // workspace setting
"-u ${config:sbparagraph.credential.SB.UserId}", // user setting
"-p ${config:sbparagraph.credential.SB.UserPasswd}", // user setting
"-f ${relativeFileDirname}",
"-k ${fileBasename}"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"problemMatcher": [],
"group": {
"kind": "build"
}
},
sync & compile sb PROCESS
{
"label": "GC Process", // // link to keyboard shortcut {f8}
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
"-t",
"/FIXME/scripts-live/d3_vsc_gc.sh",
"-a ${config:sbparagraph.account.name}", // workspace setting
"-s ${config:sbparagraph.account.sysid}", // workspace setting
"-u ${config:sbparagraph.credential.SB.UserId}", // user setting
"-p ${config:sbparagraph.credential.SB.UserPasswd}", // user setting
"-f ${relativeFileDirname}",
"-k ${fileBasename}"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
},
"problemMatcher":"$sbpGpVscGcRmtProblemMatcher",
"group": {
"kind": "build"
}
}
sync UV to D3 and compile
Development of a task to synchronize a UVDev source to D3Dev using the script /Resources/D3/uv_to_d3_vsc_gc.sh
executed from a vscode task
settings.json
Configuration in .vscode/settings.json of the project
"sbparagraph.account.name": "SB553", // account name on UV
"sbparagraph.account.nameD3": "IN-TOOLS", // account name on D3
"sbparagraph.account.oe": "UV",
"sbparagraph.account.os": "Linux",
"sbparagraph.account.path": "/data/uvdbsb55/SB553", // path on UV
"sbparagraph.account.server": "dbServer.domain",
"sbparagraph.account.sysid": "IN" // SYSID
Sync from UV to D3
{
"label": "Sync D3",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
"-t",
"/FIXME/scripts-live/uv_to_d3_vsc_gc.sh",
"-i ${config:sbparagraph.account.path}", // sbparagraph.account.path used b uv
"-a ${config:sbparagraph.account.nameD3}", // sbparagraph.account.nameD3 used by D3
"-s ${config:sbparagraph.account.sysid}",
"-u ${config:sbparagraph.credential.SB.UserId}",
"-p ${config:sbparagraph.credential.SB.UserPasswd}",
"-f ${relativeFileDirname}",
"-k ${fileBasename}"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"problemMatcher": [],
"group": {
"kind": "build"
}
}
run uvBasic + syncD3
Task to combine the compilation under uv and synchronization to D3 into one action
{
"label": "OEBASIC SyncD3",
"dependsOrder": "sequence",
"dependsOn": [
"OE BASIC", // first, run the GC on UV
"Sync D3" // second, run the Sync from uv to D3
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
},
"problemMatcher": [
"$sbpGpVscGcRmtProblemMatcher"
]
}
run GCProcess + SyncD3
Task to combine the compilation under uv and the synchronization to D3 into one action
{
"label": "GCProcess SyncD3",
"dependsOrder": "sequence",
"dependsOn": [
"GC Process", // first, run the GC on UV
"Sync D3" // second, run the Sync from uv to D3
],
"problemMatcher": [
"$sbpGpVscGcRmtProblemMatcher"
]
}
Remote D3 CATALOG source
FIXME
Remote D3 RUN source
FIXME
---------- Top ----------
Tasks to manage with UV in Local mode
Implies that you are connected to the server (localhost or RDP session)
ProblemMatcher GC Process
The sbparagraph extension provides a contributes.problemMatchers sbpGpVscGcRmtProblemMatcher that you can reference in the returns of GC Process tasks.
{
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher"
}
Presentation
Task settings to manage the 'output' panel.
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
},
Tasks
Local UV BASIC
"label": "OE BASIC ",
"type": "process",
"command": "uv", // fix path of uv.exe if not in %path%
"args": [
{
"value": "'BASIC ${relativeFileDirname} ${fileBasename}' ", // check ACCOUNT PATH ET XXX
"quoting": "weak"
}
],
Local UV CATALOG
"label": "CATALOG BASIC",
"type": "process",
"command": "uv", // fix path of uv.exe if not in %path%
"args": [
{
"value": "'CATALOG ${relativeFileDirname} ${fileBasename} COMPLETE' ", // check ACCOUNT PATH ET XXX
"quoting": "weak"
}
],
Local UV RUN
"label": "RUN BASIC",
"type": "process",
"command": "uv", // fix path of uv.exe if not in %path%
"args": [
{
"value": "'RUN ${relativeFileDirname} ${fileBasename}' ", // check ACCOUNT PATH ET XXX
"quoting": "weak"
}
],
Local UV PROCESS
"label": "GC Process",
"type": "process",
"command": "uv", // fix path of uv.exe if not in %path%
"args": [
{
"value": "'IN.VSC.GC SYSID ${config:sbparagraph.account.sysid} PROCESS ${fileBasename} SBUSER {config:sbparagraph.credential.SB.UserId},${config:sbparagraph.credential.SB.UserPasswd}'", // check ACCOUNT PATH ET XXX
"quoting": "weak"
}
],
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher"
---------- Top ----------
Tasks to manage with UV in remote mode
Implying that:
- you are at your workstation
- you are synchronizing files with UV via SFTP
- you are executing tasks via SSH
Tasks
[!NOTE] in the value
prop, you can add Linux commands between cd
and uv
; for example, a chgrp
or a chmod
or any other command, for instance
cd ${config:sbparagraph.account.path};
chgrp mygroup ${relativeFileDirname}/${fileBasename};
uv 'BASIC ${relativeFileDirname} ${fileBasename}'
Remote UV BASIC
Direct Compilation Version
{
"label": "OE BASIC",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path}; uv 'BASIC ${relativeFileDirname} ${fileBasename}' ",
"quoting": "weak"
}
],
"group": {
"kind": "build"
},
"problemMatcher": []
}
Version in compilation via GC that will maintain the IN.GLB.LOG
{
"label": "OE BASIC",
"dependsOrder": "sequence",
"dependsOn": [
"GC Process"
],
"problemMatcher": [
"$sbpGpVscGcRmtProblemMatcher"
]
},
Remote UV CATALOG
{
"label": "CATALOG BASIC ",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path} ; uv 'CATALOG ${relativeFileDirname} ${fileBasename} COMPLETE' ",
"quoting": "weak"
}
],
"problemMatcher": []
}
Remote UV RUN source
{
"label": "RUN BASIC ",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path}; uv 'RUN ${relativeFileDirname} ${fileBasename}' ",
"quoting": "weak"
}
],
"group": {
"kind": "build"
},
"problemMatcher": []
}
Remote UV PROCESS
{
"label": "GC Process",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path} ; uv 'IN.VSC.GC SYSID ${config:sbparagraph.account.sysid} PROCESS ${fileBasename} FILE ${relativeFileDirname} SBUSER ${config:sbparagraph.credential.SB.UserId},${config:sbparagraph.credential.SB.UserPasswd}'",
"quoting": "weak"
}
],
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher",
"group": {
"kind": "build"
}
}
Remote doAtTcl
{
"label": "doAtTcl",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path} ; echo ${selectedText} | uv ",
"quoting": "weak"
}
],
"group": {
"kind": "test"
}
}
copy & GEN/BASIC multiple
To regenerate multiple sources from a single call, follow these steps:
- prepare a local directory
lists
- create a file
list
with your chosen name and add the lines in the format
nom_de_fichierSource\nom_de_source
nom_de_fichierSource\nom_de_source
...
..
.
- you can place a (*) in front of a line to ignore it
- you can mix basic and process
- from the editor in this
list
file, launch the task: Copy to SAVEDLISTS and GC or BASIC which will:
- launch the task Copy to SAVEDLISTS to copy the
list
file to the &SAVEDLISTS& on the server
- launch the task GC or BASIC from SAVEDLISTS which will run IN.VSC.GC that will loop through all the lines contained in the
list
file
Example of use
- You create a list of sources that utilize the same INCLUDE; and in case of modification of this INCLUDE; you can trigger the regeneration of all dependent sources
- You conduct a search; you click to 'open in a file (.code-search); you save it as .codesearch or .list and you launch the task Copy to SAVEDLISTS and GC or BASIC; (the system will filter only the names of fileSource\source)
- this allows you to retrieve your searches by renaming the file extension from .list or .codesearch to .code-search; you can rerun the search and automatically enrich your .list
On the server, the program /Resources/UV/IN.VSC.GC
will manage either a source code in a source file or a list read from SAVEDLISTS.
In this case, lines with a star at the beginning are not processed.
Lines that are not in the FILE\CODESOURCE format are not processed.
Copy to SAVEDLISTS
{
"label": "Copy to SAVEDLISTS",
"type": "process",
"command": "scp",
"args": [
".\\${relativeFile}",
"${config:sbparagraph.account.server}:${config:sbparagraph.account.path}/&SAVEDLISTS&/${fileBasename}"
],
"problemMatcher": []
},
GC or BASIC from SAVEDLISTS
{
"label": "GC or BASIC from SAVEDLISTS",
"type": "process",
"command": "ssh",
"args": [
"${config:sbparagraph.account.server}",
{
"value": "cd ${config:sbparagraph.account.path}; uv 'IN.VSC.GC SYSID ${config:sbparagraph.account.sysid} PROCESS ${fileBasename} FILE &SAVEDLISTS& SBUSER ${config:sbparagraph.credential.SB.UserId},${config:sbparagraph.credential.SB.UserPasswd}'",
"quoting": "weak"
}
],
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher",
"group": {
"kind": "build"
}
},
Copy to SAVEDLISTS and GC or BASIC
Execute the "Copy to SAVEDLISTS" tasks in cascade "GC or BASIC SAVEDLISTS"
{
"label": "Copy to SAVEDLISTS and GC or BASIC",
"dependsOrder": "sequence",
"dependsOn": [
"Copy to SAVEDLISTS",
"GC or BASIC SAVEDLISTS"
],
"problemMatcher": [
"$sbpGpVscGcRmtProblemMatcher"
]
}
ProblemMatcher GC Process
The sbparagraph extension provides a contributes.problemMatchers sbpGpVscGcRmtProblemMatcher
that you can use as a reference in the returns of GC Process tasks.
{
"problemMatcher": "$sbpGpVscGcRmtProblemMatcher"
}
Tasks Presentation
Task parameters to manage the 'output' panel.
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"revealProblems": "onProblem"
}
---------- Top ----------
Checking synchronization between UV and D3
A bash script to find 'different' codes between your d3 sources (exported for vscode) and uv
In the script, an example of IN-TOOLS/INPROCESS vs. SB553/INPROCESS.VSC
##/bin/bash
## compare d3dev intools inprocess with uvdev sb553 inprocess.vsc
## pour avoir la liste
diff -abBwZq /dos/commun/vscode/d3dev/IN-TOOLS/INPROCESS /data/uvdbsb55/SB553/INPROCESS.VSC | sort
## replace 'Files ' par 'diff -abBwZ'
## replace ' and ' par ' '
## replace ' differ' par ''
## pour voir les lignes différentes
diff -abBwZ /dos/commun/vscode/d3dev/IN-TOOLS/INPROCESS/GP.WIA.REV.PUBLISH /data/uvdbsb55/SB553/INPROCESS.VSC/GP.WIA.REV.PUBLISH
## pour voir les codes cote à cote , il y un 'pipe' au milieu pour les lignes qui diffèrent
diff -abBwZy /dos/commun/vscode/d3dev/IN-TOOLS/INPROCESS/GP.WIA.REV.PUBLISH /data/uvdbsb55/SB553/INPROCESS.VSC/GP.WIA.REV.PUBLISH
---------- Top ----------