GetIntelliSenseInfoResult GetIntelliSenseInfo(OdId tObject, GetIntelliSenseArg tArg)
tObject. Moniker of the unit, with which code the work is executed.
tArg. Operation execution parameters.
The GetIntelliSenseInfo operation gets the list of types and types members available to use in the current code point.
The operation gets the list that will be displayed on using the IntelliSense technology during unit code development. 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. If the unit 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.
Below is the example of getting the list of type members available for use in the specified code coordinate. The unit moniker and code coordinate are sent in the query. The list of type members with parameters available for use in this code place is received in the response. The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"GetIntelliSenseInfo" :
{
"tObject" :
{
"id" : "EBNIJHOJBFHOFOAEMHDCCHPHGKHABKGEPKLBOEMGMNCFCAIK!M!172002"
},
"tArg" :
{
"cursor" :
{
"col" : "30",
"row" : "26"
}
}
}
}
{
"GetIntelliSenseInfoResult" :
{
"items" :
{
"it" :
[
{
"type" : "Sub",
"name" : "Create",
"access" : "Public",
"blocks" : "",
"imask" : "2",
"helpString" : ""
},
{
"type" : "Sub",
"name" : "CreateWithParams",
"access" : "Public",
"blocks" :
{
"it" :
[
{
"type" : "Var",
"name" : "Size",
"typeName" : "Integer",
"access" : "Public",
"imask" : "4"
},
{
"type" : "Var",
"name" : "DefaultValue",
"typeName" : "Double",
"Value" : "0",
"access" : "Public",
"imask" : "4"
}
]
},
"imask" : "2",
"helpString" : ""
}
]
}
}
}
public static GetIntelliSenseInfoResult GetIntelliSenseInfo(MbId mb, string moduleId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetIntelliSenseInfo()
{
tArg = new GetIntelliSenseArg()
{
cursor = new CodePoint()
{
row = 26,
col = 30
}
},
// Unit moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, moduleId).k }
};
// Get information
var result = somClient.GetIntelliSenseInfo(tGet);
return result;
}
See also: