This class provides methods for handling current workspace in winIDEA.
Python example.
#include <CWorkspaceController.h>
◆ CWorkspaceController()
isys::CWorkspaceController::CWorkspaceController |
( |
std::shared_ptr< ConnectionMgr > |
connectionMgr | ) |
|
Instantiates object.
- Parameters
-
connectionMgr | class which maintains connection to winIDEA. Connection must be established before this call. Python example: test_workspace_save.py
|
◆ close()
void isys::CWorkspaceController::close |
( |
| ) |
|
Closes workspace.
If there are some changes, winIDEA prompts user to save the changes.
- Exceptions
-
IOException | in case of an error |
Python example: test_close_open.py
◆ closeDiscard()
void isys::CWorkspaceController::closeDiscard |
( |
| ) |
|
Closes workspace and discards all changes.
- Exceptions
-
IOException | in case of an error |
Python example: test_close_open.py
◆ create()
void isys::CWorkspaceController::create |
( |
const std::string & |
rstrWorkspaceFileName, |
|
|
const std::string & |
rstrIOPEN, |
|
|
const CCfg_debug_basic & |
rCfg |
|
) |
| |
Creates a new workspace.
- Parameters
-
rstrWorkspaceFileName | file name of the workspace |
rstrIOPEN | name of iOPEN server to use; if empty, the default iSYSTEM server is used |
rCfg | initial debug session configuration |
- Exceptions
-
IOException | in case of an error |
Python example.
◆ get_cfg_debug()
Returns current debug configuration.
- Returns
- Basic Debug configuration
- Exceptions
-
IOException | in case of an error, or if winIDEA is using Full Debug configuration which cannot be converted to Basic configuration |
Python example.
◆ invoke()
This method invokes functions within winIDEA process.
Use this method only when instructed by iSYSTEM support. Example:
result = wsCtrl.invoke('/IDE/Divide', {'Dividend': '10', 'Divisor': '2'})
- Parameters
-
funcUrl | name of the winIDEA service function to call |
inParams | input parameters as mapping |
- Returns
- mapping of output values.
Note: Python and Java support Python mapping and Java Map as input/output types in addition to isystem.connect.StrStrMap
. Example for Java:
wsCtrl.invoke("/IDE/Divide", Map.of("Dividend", "10", "Divisor", "2"));
Python example: test_invoke.py
Note: This method is equivalent to CIDEController::invoke()
.
◆ invokej()
std::string isys::CWorkspaceController::invokej |
( |
const std::string & |
funcUrl, |
|
|
const std::string & |
inParams |
|
) |
| |
This method invokes functions within winIDEA process.
Use this method only when instructed by iSYSTEM support. Example:
result = wsCtrl.invoke('/IDE/Divide', '{"Dividend": 10, "Divisor": 2}')
- Parameters
-
funcUrl | name of the winIDEA service function to call |
inParams | input parameters as JSON string |
- Returns
- string with JSON encoded output values
Python example: test_invokej.py
◆ newWS()
void isys::CWorkspaceController::newWS |
( |
const std::string & |
rstrWorkspaceFileName, |
|
|
const std::string & |
rstrIOPEN = {} |
|
) |
| |
- Deprecated:
- Use CWorkspaceController::create instead
Creates a new workspace.
- Parameters
-
rstrWorkspaceFileName | file name of the workspace |
rstrIOPEN | name of iOPEN server to use; if empty, the default iSYSTEM server is used |
- Exceptions
-
IOException | in case of an error |
◆ open()
bool isys::CWorkspaceController::open |
( |
const std::string & |
workspaceFileName | ) |
|
Opens workspace in winIDEA.
- Parameters
-
workspaceFileName | file name of the workspace |
- Exceptions
-
IOException | in case of an error |
Python example.
◆ path()
std::string isys::CWorkspaceController::path |
( |
| ) |
|
returns path of currently opened workspace
- Exceptions
-
IOException | in case of an error |
Python example.
◆ save()
void isys::CWorkspaceController::save |
( |
| ) |
|
◆ saveAs()
void isys::CWorkspaceController::saveAs |
( |
const std::string & |
workspaceFileName | ) |
|
Saves workspace to a new file.
- Parameters
-
workspaceFileName | file name of the workspace |
- Exceptions
-
IOException | in case of an error |
Python example: test_workspace_save.py
◆ set_cfg_debug()
Sets debug configuration.
- Parameters
-
rCfg | Basic Debug configuration |
- Exceptions
-
IOException | in case of an error, or the configuration is invalid (unsupported device etc.) |
Python example.