Class EditorJSONElementWrapper

    • Constructor Detail

      • EditorJSONElementWrapper

        public EditorJSONElementWrapper()
        Creates the property container without a name. The name must be set in all cases using the setPropertyAtom call.
      • EditorJSONElementWrapper

        public EditorJSONElementWrapper​(Atom propertyAtom)
        Creates the property container with the specified name. All system-reserved names for components begins with "$".
        Parameters:
        propertyAtom - the name of the component, unique within it's parent.
    • Method Detail

      • clone

        public EditorJSONElementWrapper clone()
                                       throws java.lang.CloneNotSupportedException
        Clones the JSONElementWrapper.
        Overrides:
        clone in class JSONElementWrapper
        Returns:
        A new wrapper for a cloned JSON element.
        Throws:
        java.lang.CloneNotSupportedException - For property errors when cloning.
      • getCNImage

        public org.eclipse.swt.graphics.Image getCNImage()
        Gets the image for the Common Navigator.
        Specified by:
        getCNImage in interface IWSPropDesigner
        Returns:
        Image or null if there is no image.
      • getCNText

        public java.lang.String getCNText()
        Gets the label text for the Common Navigator.
        Specified by:
        getCNText in interface IWSPropDesigner
        Returns:
        The text.
      • getCNImage

        public org.eclipse.swt.graphics.Image getCNImage​(int columnIndex)
        Gets the image for the Common Navigator.
        Specified by:
        getCNImage in interface IWSPropDesigner
        Parameters:
        columnIndex - Index of column.
        Returns:
        Image or null if there is no image.
      • getCNText

        public java.lang.String getCNText​(int columnIndex)
        Gets the label text for the Common Navigator.
        Specified by:
        getCNText in interface IWSPropDesigner
        Parameters:
        columnIndex - Index of column.
        Returns:
        The column text.
      • createCNToolTip

        public org.eclipse.swt.widgets.Composite createCNToolTip​(org.eclipse.swt.widgets.Composite parent,
                                                                 int columnIndex)
        Requests creates of the Composite used to show the tooltip.
        Specified by:
        createCNToolTip in interface IWSPropDesigner
        Parameters:
        parent - The parent composite.
        columnIndex - Index of column.
        Returns:
        The created composite in the parent, or null for none.
      • getCNDescriptionType

        public java.lang.String getCNDescriptionType()
        Provide a type description for the status bar view, if available.
        Specified by:
        getCNDescriptionType in interface IWSPropDesigner
        Returns:
        A type description for the status bar view, or null if not available.
      • canMapToVSField

        public boolean canMapToVSField()
        Verifies if the element is potentially not a repeated value that can be placed in a VS Field. For e.g. XML, there is often no way of knowing this unless there is an XML Schema (XSD) present. For JSON, it is obvious if it's not an Array.
        Specified by:
        canMapToVSField in interface IWrappedElement
        Returns:
        true by default.
      • canMapToVSTableColumn

        public boolean canMapToVSTableColumn()
        Verifies if the element is potentially a repeated value that can be placed in a VS Table Column. For e.g. XML, there is often no way of knowing this unless there is an XML Schema (XSD) present. For JSON, it is obvious if it's an Array.
        Specified by:
        canMapToVSTableColumn in interface IWrappedElement
        Returns:
        true by default.
      • isRepeated

        public boolean isRepeated()
        Checks if an element that can be mapped to a column is perhaps repeated. Such elements will prefer creation of VS Table Columns instead of VS Fields as default operation.
        Specified by:
        isRepeated in interface IWrappedElement
        Returns:
        The flag.
      • getValueType

        public Value.Type getValueType()
        Gets the Value type that applies for this element.
        Specified by:
        getValueType in interface IWrappedElement
        Returns:
        The value type to use, or null if it can't be connected at all.
      • createCNToolTip

        public org.eclipse.swt.widgets.Composite createCNToolTip​(org.eclipse.swt.widgets.Composite parent)
        Creates a tooltip for the input variables.
        Specified by:
        createCNToolTip in interface IWSPropDesigner
        Parameters:
        parent - The parent composite.
        Returns:
        The created composite in the parent.
      • getWrappedElementValue

        public java.lang.String getWrappedElementValue()
        Gets the String version of the Wrapped Element value.
        Specified by:
        getWrappedElementValue in interface IWrappedElement
        Returns:
        The wrapped element value, or null for none.
      • canCombineSelection

        public boolean canCombineSelection​(GProp<?>[] props)
        Checks if the element can be combined in a selection with other properties.
        Specified by:
        canCombineSelection in interface IWrappedElement
        Parameters:
        props - The selected properties (at least one [itself - this]).
        Returns:
        The flag.
      • createComposite

        public org.eclipse.swt.widgets.Composite createComposite​(WebServiceEditor editor,
                                                                 org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.widgets.Composite existingComposite,
                                                                 GProp<?>[] props)
        Creates the composite to show. The property editor must be disposed of if required.
        Specified by:
        createComposite in interface IWrappedElement
        Parameters:
        editor - The editor.
        parent - Parent composite.
        existingComposite - The existing composite for wrapped elements, null for none.
        props - The selected properties (at least one).
        Returns:
        The composite for to show.