Skip to content

Commit

Permalink
Document new action
Browse files Browse the repository at this point in the history
Signed-off-by: Sanjula <[email protected]>
  • Loading branch information
SanjulaGanepola committed Dec 13, 2024
1 parent 457e53c commit 65cd14a
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 7 deletions.
Binary file modified docs/assets/ProjectExplorer_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/ProjectExplorer_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/ProjectExplorer_15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/ProjectExplorer_41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/ProjectExplorer_42.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 22 additions & 2 deletions docs/pages/ibm-i-projects/iproj-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,31 @@ PASE command line used to build this entire project.
> - `{path}` resolves to the full IFS path corresponding to the source in the editor.
> - `{host}` resolves to the IBM i hostname.
> - `{usrprf}` the user profile that the command will be executed under.
> - `{branch}` resolves to the name of the current git branch if this project is managed by git.
> - `{branch}` resolves to the name of the current git branch if this project is managed by Git.
### buildObjectCommand

PASE command line used to build a specific object in this project.

> The following substitution variables are supported:
> - `{object}` resolves to the base object name.
> - `{filename}` resolves to the base file name being edited.
> - `{path}` resolves to the full IFS path corresponding to the source in the editor.
> - `{host}` resolves to the IBM i hostname.
> - `{usrprf}` the user profile that the command will be executed under.
> - `{branch}` resolves to the name of the current git branch if this project is managed by Git.
### compileCommand

PASE command line used to compile a specific source file in this project. The same substitution parameters used in the `buildCommand` are supported.
PASE command line used to compile a specific source file in this project.

> The following substitution variables are supported:
> - `{filename}` resolves to the base file name being edited.
> - `{files}` resolves to the list of files being selected or the active editor.
> - `{path}` resolves to the full IFS path corresponding to the source in the editor.
> - `{host}` resolves to the IBM i hostname.
> - `{usrprf}` the user profile that the command will be executed under.
> - `{branch}` resolves to the name of the current git branch if this project is managed by Git.
### extensions

Expand Down
18 changes: 15 additions & 3 deletions docs/pages/projectExplorer/run-builds-compiles-and-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,29 @@ The build or compiles of a project are based on the `buildCommand` and `compileC

Before running a build, the project's build command must be set. This can be done using the **Set Build Command** action on the project. Here you can leverage any build tool such as `elias` in ARCAD Builder or `makei` in `ibmi-bob`.

![Set Build Command](../../assets/ProjectExplorer_11.png)
![Set Build Command](../../assets/ProjectExplorer_11.png ':size=500')

To then launch a build, use the **Run Build** action on the project heading or the `ctrl+shift+b` shortcut (`cmd+shift+b` on Mac). This will first deploy the project and then invoke the build command. To view the output of this build process, navigate to the **Output** view and select the **IBM i Output** channel.

![Run Build](../../assets/ProjectExplorer_12.png)

In the case you want to simply build a specific object in your project, you can set your project's build object command using the **Set Build Object Command** action on the project.

![Set Build Object Command](../../assets/ProjectExplorer_41.png ':size=500')

To then build a target object, locate the object under the **Library List** or **Object Libraries** and use the right-click **Run Build Object** action.

> [!NOTE]
>
> This action can also be performed on objects under the [Source Orbit heading](https://ibm.github.io/sourceorbit/#/./pages/extension/index?id=ibm-i-project-explorer-integration) in **Project Explorer** as well as on objects in both [impacted object views](https://ibm.github.io/sourceorbit/#/./pages/extension/index?id=view-impacted-objects) provided by Source Orbit (**Source Impacts** and **Change Impacts**).
![Run Build Object](../../assets/ProjectExplorer_42.png ':size=500')

## Run a Compile

Similar to the build command, the project's compile command must be first set using the **Set Compile Compile** action on the project.

![Set Compile Command](../../assets/ProjectExplorer_13.png)
![Set Compile Command](../../assets/ProjectExplorer_13.png ':size=500')

To compile a directory or file, this can be achieved from several locations:

Expand All @@ -29,7 +41,7 @@ To compile a directory or file, this can be achieved from several locations:

An alternative to using the build or compile command is to leverage the use of Code for IBM i workspace actions. These actions are stored in `.vscode/actions.json` at the root of the project and should be pushed to the Git repository. To generate an initial `actions.json` file, use the **Launch Action Setup** action on the project. Here you will be prompted to select from a set of pre-defined actions.

![Launch Action Setup](../../assets/ProjectExplorer_15.png)
![Launch Action Setup](../../assets/ProjectExplorer_15.png ':size=500')

Refer to the example below of having setup a project to use `ibmi-bob`:

Expand Down
2 changes: 1 addition & 1 deletion schema/iproj.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
"buildObjectCommand": {
"type": "string",
"markdownDescription": "PASE command line used to build a specific object.\n\nThe following substitution variables are supported:\n * `{object}` resolves to the base object name.\n * `{filename}` resolves to the base file name being edited.\n * `{path}` resolves to the full IFS path corresponding to the source in the editor.\n * `{host}` resolves to the IBM i hostname.\n * `{usrprf}` the user profile that the command will be executed under.\n * `{branch}` resolves to the name of the current git branch if this project is managed by Git."
"markdownDescription": "PASE command line used to build a specific object in this project.\n\nThe following substitution variables are supported:\n * `{object}` resolves to the base object name.\n * `{filename}` resolves to the base file name being edited.\n * `{path}` resolves to the full IFS path corresponding to the source in the editor.\n * `{host}` resolves to the IBM i hostname.\n * `{usrprf}` the user profile that the command will be executed under.\n * `{branch}` resolves to the name of the current git branch if this project is managed by Git."
},
"compileCommand": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion src/iProjectT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export interface IProjectT {
buildCommand?: string;

/**
* PASE command line used to build a specific object.
* PASE command line used to build a specific object in this project.
*
* The following substitution variables are supported:
* * `{object}` resolves to the base object name.
Expand Down

0 comments on commit 65cd14a

Please sign in to comment.