Skip to content

Commit 0b442ed

Browse files
authored
Merge pull request #292 from intersystems-community/kramdown-vulnerability
1st new doc
2 parents 13dfa1e + b3553e8 commit 0b442ed

24 files changed

+352
-268
lines changed

docs/Code-formatting.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/Configuration.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
layout: default
3+
title: Configuration
4+
permalink: /configuration/
5+
nav_order: 5
6+
---
7+
# Configuration
8+
9+
The settings that define an InterSystems IRIS server and the connection to the server are crucial to the functioning of VS Code in developing in ObjectScript.
10+
11+
## Configuring a Server
12+
13+
First, configure one or more servers. Open the settings editor by selecting **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **User** or **Workspace** settings level by selecting it at the top of the settings window. For example, the following screen shot shows Workspace selected:
14+
15+
![Workspace selected.](../assets/images/ClickWorkspace.png "workspace selected")
16+
17+
Find Extensions in the list in the left pane of the editor window, click to open, then select InterSystems Server Manager from the list to find the correct place in the settings UI. The following screen shot shows InterSystems Server Manager selected:
18+
19+
![Select server manager.](../assets/images/ServerManagerSelect.png "select server manager")
20+
21+
And this screen shot shows Server Manager area of the edit pane:
22+
23+
![Server manager settings.](../assets/images/ServerManagerSettings.png "server manager settings")
24+
25+
You need to edit the server configuration in the settings.json file, so your only option is to click *Edit in settings.json*.
26+
27+
To configure a server, enter code something like this:
28+
29+
```js
30+
"intersystems.servers": {
31+
"test": {
32+
"webServer": {
33+
"scheme": "http",
34+
"host": "localhost",
35+
"port": 52774,
36+
},
37+
"username": "_SYSTEM",
38+
},
39+
},
40+
```
41+
42+
The components of this server definition are:
43+
44+
- **test** - an arbitrary name to identify this server
45+
- **webServer** - The collection of properties that define the web server.
46+
- **scheme** - The protocol used for connections.
47+
- **host** - the host for this server
48+
- **port** - the WebServer port number for this server
49+
- **username** - the username to use in logging in to this server.
50+
- **password** - password for the specified username. Entering the password in this file is acceptable only in limited situations with very low need for security.
51+
52+
If you do not add a password to the server definition, anyone using the server needs to supply the password. Or, you can store the password securely in the system Keychain. The InterSystems Server Manager adds the following commands for managing stored passwords to the Command Palette:
53+
54+
- **InterSystems Server Manager: Clear Password from Keychain** - remove password for selected server
55+
- **InterSystems Server Manager: Store Password in Keychain** - select a server and enter a password
56+
- **InterSystems Server Manager: Test Server Selection**
57+
- **InterSystems Server Manager: Test Server Selection (flush cached credentials)**
58+
- **InterSystems Server Manager: Test Server Selection with Details**
59+
60+
## Configuring a Server Connection
61+
62+
Select InterSystems ObjectScript from the settings editor extensions list. You need to edit the server configuration in the settings.json file, so your click *Edit in settings.json* under the heading **Objectscript: conn**.
63+
64+
You should enter code something like this:
65+
66+
```js
67+
"objectscript.conn": {
68+
"ns": "USER",
69+
"server": "tst",
70+
"active": true,
71+
},
72+
```
73+
The components of this server definition are:
74+
75+
- **ns** - namespace to use on the server
76+
- **server** - server name as specified in the server configuration
77+
- **active** - specifies whether the connection is active.
78+
79+
## Configuring Export from Server
80+
81+
Select InterSystems ObjectScript from the settings editor extensions list. Find the section labeled **Objectscript: conn**. You can edit many of the export settings in the settings editor. For others you need to edit the settings.json file.
82+
83+
You export configuration looks something like this:
84+
85+
```js
86+
"objectscript.export": {
87+
"folder": "",
88+
"addCategory": true,
89+
"atelier": true,
90+
"generated": false,
91+
"filter": "",
92+
"category": "*",
93+
"noStorage": false,
94+
"dontExportIfNoChanges": false,
95+
"maxConcurrentConnections": 0
96+
},
97+
```
98+
The components of this export definition are:
99+
100+
- **folder** - Folder for source code.
101+
- **addCategory** - Add a category folder to the export path.
102+
- **atelier** - Export source code as Atelier does, with packages placed in subfolders.
103+
- **generated** - Export generated source code files.
104+
- **filter** -
105+
- **category** - Specifies a category of source code to export: CLS = classes; RTN = routines; CSP = csp files; OTH = other. The default is *, export everything.
106+
- ****noStorage** - Strip the storage XML on export. This is useful for multiple systems.
107+
- **dontExportIfNoChanges** - Don't update the local file if the content is identical to what is on the server.
108+
- **maxConcurrentConnections** - The maximum number of export connections. (0 = Unlimited)

docs/Connect-to-InterSystems-IRIS.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/Debugging.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/Export-settings.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/Installation.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,33 @@
22
layout: default
33
title: Installation
44
permalink: /installation/
5-
nav_order: 1
5+
nav_order: 2
66
---
7-
# Installation
7+
# Installation
88

9-
Before using VSCode-ObjectScript, you need to install VSCode, which you can get [here](https://code.visualstudio.com/).
9+
## Install VS Code
1010

11-
Once VSCode is installed, you should open it, go to Extensions View by by selecting menu items View > Extensions and search for "ObjectScript", as shown in the attached screenshot, and install it.
11+
Your first step is to install VS Code:
1212

13-
![installation](https://raw.githubusercontent.com/daimor/vscode-objectscript/master/images/installation.gif)
13+
1. Go to the [Visual Studio Code download page](https://code.visualstudio.com/).
14+
2. Download an appropriate build for your platform.
15+
3. Open the downloaded file and follow the installation instructions.
1416

15-
The next step is to [Connect to InterSystems IRIS](Connect-to-InterSystems-IRIS).
17+
## Install the InterSystems ObjectScript Extensions
18+
19+
Next, you need to install the following extensions:
20+
21+
- InterSystems ObjectScript
22+
- InterSystems Server Manager
23+
24+
Run VS Code. From within the application, click the extensions button in the Activity Bar on the left edge of the VS Code window:
25+
26+
![Extensions button.](../assets/images/extensions.png "extensions button")
27+
28+
Type `intersystems` in the search field to find these extensions in the Marketplace, as illustrated in the following screen shot:
29+
30+
![Search in Marketplace.](../assets/images/marketplace.png "search in marketplace")
31+
32+
For each of the listed extensions, click the extension, then click **install**. Note that the InterSystems ObjectScript extension adds an ObjectScript button to the Activity Bar:
33+
34+
![ObjectScript button.](../assets/images/objectscript.png "objectscript button")

docs/RunDebug.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: default
3+
title: Running and Debugging
4+
permalink: /rundebug/
5+
nav_order: 6
6+
---
7+
# Running and Debugging
8+
9+
In order to run or debug an ObjectScript class or routine, you must create a launch configuration. Click the run button in the Activity Bar:
10+
11+
If no launch configurations are available, you are prompted to create one:
12+
13+
![Create launch configuration.](../assets/images/CreateLaunchConfig.png "create launch configuration")
14+
15+
Clicking the link creates and opens a `launch.json` file containing the following default information:
16+
17+
```js
18+
{
19+
"version": "0.2.0",
20+
"configurations": [
21+
{
22+
"type": "objectscript",
23+
"request": "launch",
24+
"name": "XDebug"
25+
}
26+
]
27+
}
28+
```
29+
30+
These attributes are mandatory for any launch configuration:
31+
32+
- **type** - Identifies the type of debugger to use. In this case, `objectscript`, supplied by the InterSystems ObjectScript extension.
33+
- **request** - Identifies the type of action for this launch configuration. Possible values are `launch` and `attach`.
34+
- **name** - An arbitrary name to identify the configuration. This name appears in the Start Debugging drop down list.
35+
36+
In addition, for an **objectscript** configuration, you need to supply the attribute **program**, which specifies the executable or file to run when launching the debugger, as shown in the following example:
37+
38+
```js
39+
"launch": {
40+
"version": "0.2.0",
41+
"configurations": [
42+
43+
{
44+
"type": "objectscript",
45+
"request": "launch",
46+
"name": "ObjectScript Debug HelloWorld",
47+
"program": "##class(Test.MyClass).HelloWorld()",
48+
},
49+
{
50+
"type": "objectscript",
51+
"request": "launch",
52+
"name": "ObjectScript Debug GoodbyWorld",
53+
"program": "##class(Test.MyOtherClass).GoodbyWorld()",
54+
},
55+
]
56+
}
57+
```
58+

0 commit comments

Comments
 (0)