GetDeclarationPoint

Syntax

GetDeclarationPointResult GetDeclarationPoint(OdId tObject, GetDeclarationPointArg tArg)

Parameters

tObject. Moniker of the unit, which metadata should be obtained.

tArg. Operation execution parameters.

Description

The GetDeclarationPoint operation gets information about the focused the development environment element.

Comments

The operation gets information about function or procedure if a custom method is used, or about property, method, interface, class if a system assembly is used. To execute the operation, in the tObject field specify unit moniker and in the tArg.cursor field specify the cursor layout coordinates in the code.

The operation results in the information about the focused development environment element.

Example

Below is the example of getting information about development environment interface. The request contains unit moniker and indexes of the row and the column, in which the cursor is located. The response contains assembly and interface name.

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">
<GetDeclarationPoint xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!231517</id>
  </tObject>
<tArg xmlns="">
<cursor>
  <col>11</col>
  <row>5</row>
  </cursor>
  </tArg>
  </GetDeclarationPoint>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDeclarationPointResult 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">
  <moduleName xmlns="">Express</moduleName>
  <className xmlns="" />
  <identName xmlns="">IEaxAnalyzerOptions</identName>
  </GetDeclarationPointResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDeclarationPoint" :
{
"tObject" :
{
"id" : "S1!M!231517"
},
"tArg" :
{
"cursor" :
{
"col" : "11",
"row" : "5"
}
}
}
}

JSON response:

{
"GetDeclarationPointResult" :
{
"moduleName" : "Express",
"className" : "",
"identName" : "IEaxAnalyzerOptions"
}
}
public static GetDeclarationPointResult GetDeclarationPoint(MbId mb, string moduleId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetDeclarationPoint()
{
tArg = new GetDeclarationPointArg()
{
cursor = new CodePoint()
{
row = 5,
col = 11
}
},
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, moduleId).k }
};
//Start assembly
var result = somClient.GetDeclarationPoint(tGet);
return result;
}

See also:

Working with Development Environment