GetPythonIntelliSenseTooltip

Syntax

GetPythonIntelliSenseTooltipResult GetPythonIntelliSenseTooltip(OdId tObject, GetPythonIntelliSenseArg tArg)

Parameters

tObject. Moniker of the Python module, with which code the work is executed.

tArg. Operation execution parameters.

Description

The GetPythonIntelliSenseTooltip operation gets information used on creating a tooltip for type or type member in Python module code.

Comments

To execute the operation, in the tObject field specify module moniker and in the tArg.cursor field specify the cursor layout coordinates in the code. If the module was changed but it has not been saved yet, its code can be passed in the tArg.meta field.

The operation results in the collection of code elements that can be used in the specified code coordinate.

Example

Below is the example of getting a tooltip in the specified code coordinate. The request contains Python module moniker, its changed text and code coordinates. The response contains the obtained tooltip.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPythonIntelliSenseTooltip xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>PNPCCFAPCFEAGOAENJNHNIHKMPIHDHKEJJACNBBIDLGLMMMC!M!304842</id>
  </tObject>
<tArg xmlns="">
  <text>from datetime import date;def SimpleProcedure(d): print("Today: " + d.strftime("%d-%b-%Y")) current_date = date.today()SimpleProcedure(current_date)</text>
<cursor>
  <col>16</col>
  <row>6</row>
  </cursor>
  </tArg>
  </GetPythonIntelliSenseTooltip>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetPythonIntelliSenseTooltipResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tooltip xmlns="">SimpleProcedure(**d**)</tooltip>
  </GetPythonIntelliSenseTooltipResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetPythonIntelliSenseTooltip" :
{
"tObject" :
{
"id" : "PNPCCFAPCFEAGOAENJNHNIHKMPIHDHKEJJACNBBIDLGLMMMC!M!304842"
},
"tArg" :
{
"text" : "from datetime import date;def SimpleProcedure(d):\tprint("Today: " + d.strftime("%d-%b-%Y"))\tcurrent_date = date.today()SimpleProcedure(current_date)",
"cursor" :
{
"col" : "16",
"row" : "6"
}
}
}
}

JSON response:

{
"GetPythonIntelliSenseTooltipResult" :
{
"tooltip" : "SimpleProcedure(**d**)"
}
}
public static GetPythonIntelliSenseTooltipResult GetPythonIntelliSenseTooltip(MbId mb, string pythonModuleId, string pythonText)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetPythonIntelliSenseTooltip()
{
tArg = new GetPythonIntelliSenseArg()
{
cursor = new CodePoint()
{
row = 6,
col = 16
},
text = pythonText
},
// Python module moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, pythonModuleId).k }
};
// Get information
var result = somClient.GetPythonIntelliSenseTooltip(tGet);
return result;
}

See also:

Working with Development Environment