Class ParametersHoverInfoControl


  • public class ParametersHoverInfoControl
    extends Object
    Class provides methods for creating and showing browser control for hover information about parameters of methods and constructors in Bsl language
    • Field Detail

      • WIDTH_IN_CHAR

        public static final int WIDTH_IN_CHAR
        Default width in char of infoControl
        See Also:
        Constant Field Values
      • HEIGHT_IN_CHAR

        public static final int HEIGHT_IN_CHAR
        Default height in char of infoControl
        See Also:
        Constant Field Values
    • Method Detail

      • getControl

        public org.eclipse.jface.text.AbstractInformationControl getControl()
        Gets active browser AbstractInformationControl
        Returns:
        active browser AbstractInformationControl, can be null if browser hasn't been initialized yet
      • dispose

        public void dispose()
        Disposes browser control
      • getInfoString

        public String getInfoString​(String returnTypeStr)
        Returns content for browser which contains description of current parameter
        Parameters:
        returnTypeStr - string of return types corresponding to method, can be null
        Returns:
        string content for browser, can be null
      • initInfoControl

        public void initInfoControl​(org.eclipse.jface.text.ITextViewer viewer,
                                    String returnTypeStr)
        Initializes browser for actual ITextViewer
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
      • showPrevIndex

        public void showPrevIndex​(org.eclipse.jface.text.ITextViewer viewer,
                                  String returnTypeStr)
        Shows previous parameter if available in browser
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
      • showNextIndex

        public void showNextIndex​(org.eclipse.jface.text.ITextViewer viewer,
                                  String returnTypeStr)
        Shows next parameter if available in browser
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
      • showToggleDescr

        public void showToggleDescr​(org.eclipse.jface.text.ITextViewer viewer,
                                    String returnTypeStr)
        Shows or hides parameter description in browser
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
      • showControlInfo

        public void showControlInfo​(org.eclipse.jface.text.ITextViewer viewer,
                                    String returnTypeStr,
                                    List<org.eclipse.xtext.util.Pair<BslDocumentationProvider.DocumentContent.ParamContent,​String>> params,
                                    Version version)
        Shows browser control
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
        version - current version of 1C:Enterprise, can be null
        params - list of available parameters, can't be null
      • showControlInfo

        public void showControlInfo​(org.eclipse.jface.text.ITextViewer viewer,
                                    String returnTypeStr)
        Shows browser control
        Parameters:
        viewer - actual ITextViewer, can't be null
        returnTypeStr - string of return types corresponding to method, can be null
      • setInput

        public void setInput​(String info)
        Sets browser's content
        Parameters:
        info - content to display in browser, can be null