Forum Discussion

howie_'s avatar
howie_
Contributor
10 years ago

Displaying Script Extension method parameter/return types in the Code Completion window


Hey Everyone, 


 


I'm trying to get the Code Completion window to display my method parameters and return types. 


 


Here's what I'm getting now: 


XML: 


       <RuntimeObject  Name="TestObject">


              <Method Name="Method1" Routine="Method1">Method1 description here</Method>


       </RuntimeObject>


 


JScript: 


       function Method1(input1, input2)


       {


              return true;


       }


 


Code Completion: 


       Object Method1(Object input1, Object input2);


       Method1 description here


 


 


Here's what I'm trying to accomplish: 


Code Completion: 


       Boolean Method1(String input1, String input2);


       Method1 description here


 


 


I can't seem to find the correct combination of XML/JScript to get this to work. All the objects that are built into TC have this additional information, surely there must be a way for me to add these details, right? 



Any help would be greatly appreciated. 



Thanks, 

Howie 







Here are some things I've tried: 


 


Boolean Method1(input1, input2) //trying to get return value


Boolean function Method1(...)


function Boolean Method1(...)


bool Method1(...)


bool function Method1(...)


function bool Method1(...)


boolean Method1(...)


boolean function Method1(...)


function boolean Method1(...)


 


function Method1(input1: string, input2: string)


function Method1(input1 : string, input : string)


function Method1(input1 : String, input2 : String)


function Method1(String: input1, String: input2)

2 Replies


  • Hey Phil, thanks for getting back to me. 



    I was afraid of that. Any idea how I go about requesting a feature for 10.4?



    In the meantime, I've come up with the following, which gets me by: 



    <Method Name="Method1" Routine="Method1">

            Parameters: int, int

            Returns:        bool 

            Description:  Method1 description

    </Method>



    but ohhhh! if I could do this:



    <Method Name="Method1" Routine="Method1" ReturnType="bool">

            <Parameter Name="input1" Type="int" />

            <Parameter Name="input2" Type="int" />

            <Description>Method1 description</Description>

    </Method>



     


  • Philip_Baird's avatar
    Philip_Baird
    Community Expert
     Hi Howie, I don't think you can as the Description.XML file doesn't provide any mechanism for type information.

     


    If you look at the Smartbear Compare function of the  ManualCheck Script Extension in the Code Completion, it also has generic Object return and parameter types:


     




     


    where return type information is defined in the description.


     


    I expect the Smartbear objects display specific type information because they are actual objects and not Script Extensions.


     


    Regards,


    Phil Baird