#=============================================================================
# Object Inspector configuration file
#=============================================================================
#
# For activating config support check option "Options -> Default -> General -> Config-based inspector support"
#
# At the top level Inspector pane consists of several pages groupped in a tabbed pane.
# By default, it contains pages named Properties, Hyperlinks and Doc (some of them might
# not be visible for certain elements).
#
# =============================================================================
# Part I: Pages
# =============================================================================
# The syntax for defining a page is the following:
# inspector.node.element.<language>.<element_type>.item.<page_name>.view.UI = <pageUI>
# Where:
#   language =     name of a language (*, java or cpp)
#   element_type = the element's shape type. Some values are defined in the
#                  RwiShapeType interface (see API documentation located in the \doc directory under your installation).
#                  if it is not * (asterik), then the page/property will be visible only for
#                  elements with the specified value of a shape type.
#   page_name =    the name of a page
#   pageUI    =    defines how the page will display its contents. Possible values are:
#              1) treeTableNodeUI - the table-like structure with the values on the right, and
#                                   the keys on the left. The keys are displayed as a tree-like structure.
#                                   Examples: Properties page for a class, attribute, operation.
#                                   This is the most frequently used type of a page.
#              2) SinglePropertyNodeUI - the page will display only the first property, using all the
#                                   available space. So, if there are other properties, they won't be shown
#                                   in the page
#                                   Examples: the text property of a Note.
#              3) hyperLinkNavigatorNodeUI - the hyperlinks page.
#                                   Page allows to add hyperlinks to model elements and URLs.
#                                   Only NullField type should be defined for hyperlinks page (see below).
#                                   Examples: the Hyperlinks page.
# Example:
# inspector.node.element.*.*.item.MyProperties.item.$placeYourPropertyHere = StringField
# inspector.node.element.*.*.item.MyProperties.view.UI = treeTableNodeUI
# This creates a Properties-like page visible for all elements.
# A page must have at least one visible property to be visible itself (the visibility of a property
# is controlled by the .condition statement. See below)
#
# =============================================================================
# Part II: Properties
# =============================================================================
# A page can contain properties. The syntax of a property is the following:
#  inspector.node.element.<language>.<element_type>.item.<page_name>.item.<property_name> = <field>
# Where:
#   property_name =   the name of a property. Some values are defined in the
#                     RwiProperty interface (see API documentation located in the \doc directory under your installation)
#   field = the string which defines how the property will be displayed. The possible field names are:
#                      - StringField (simple text field) - does not require any parameters
#                      - BooleanField (checkbox) - does not require any parameters
#                      - IntField (accepts only integer values) - does not require any parameters
#                      - FloatField (accepts only float values) - does not require any parameters
#                      - ComboBoxField (combobox)
#                      - ChoiceField (choice)
#                      - ExtendedStringField - does not require any parameters
#                      - ClassField
#                      - NullField - does not require any parameters
#                      - HTMLStringField - does not require any parameters
#                     The syntax of each field is described below.
#
#------------------------------------------------------------------------
# StringField
#------------
# Example of usage:
# inspector.node.element.java.Attribute.item.Properties.item.version = StringField
#
# Purpose:
# Allows the user to enter a string which will be assigned the specified property.
# In this example, the entered value will be assigned to the "version" property of a java attribute.
#------------------------------------------------------------------------
# IntField
#------------
# Example of usage:
# inspector.node.element.*.*.item.Req.item.number = IntField
#
# Purpose:
# Allows the user to enter an integer number which will be assigned the specified property. If
# the user enters a non-integer value (for example, "a32") then the value will be highlighted with red color
# and the current value of the property will not be changed.
# In this example, the entered value will be assigned to the "number" property from the Req tab.
#------------------------------------------------------------------------
# FloatField
#------------
# Example of usage:
# inspector.node.element.*.*.item.Req.item.floatNumber = FloatField
#
# Purpose:
# Allows the user to enter a float number which will be assigned the specified property. If
# the user enters a non-float value (for example, "a32.89") then the value will be highlighted with red color
# and the current value of the property will not be changed.
# In this example, the entered value will be assigned to the "floatNumber" property from the Req tab.
#------------------------------------------------------------------------
# BooleanField
#-------------
# Example of usage:
# inspector.node.element.java.Attribute.item.Properties.item.$static = BooleanField
#
# Purpose:
# Allows the user to choose a boolean value for the specified property via clicking a checkbox.
# In this example, the user-defined boolean value will be assigned to the "$static" property of a java attribute.
#------------------------------------------------------------------------
# ComboBoxField
#--------------
# Example of usage:
# inspector.node.element.*.MessageLink.item.Properties.item.$controlFlowType = ComboBoxField
# \ (
# \   {
# \     values := { "call", "synchronous", "asynchronous", "wait", "nowait" },
# \     icons := { "DropDowns\seq-call.gif", "DropDowns\seq-synchronus.gif", "DropDowns\seq-asynchronous.gif", "DropDowns\seq-wait.gif", "DropDowns\seq-nowait.gif" }
# \   }
# \ )
# Parameters:
#   values - a set of strings with the values of a property.
#   icons  - a set of string containing names of images used for "values" items.
#            If just a single image name is specified, then this icon will be used
#            for all items in the "values" list.
#
# Purpose:
# Allows the user to choose a value for the specified property by selecting it from a drop-down list
# or by entering a new value.
# In this example, the value of the "$controlFlowType" property can be chosen from a set of predefined
# values, or it can be assigned a new value.
#------------------------------------------------------------------------
# ChoiceField
#------------
# Example of usage:
#  inspector.node.element.*.AssociationLink.item.Properties.item.$directed = ChoiceField(
#  \   {
#  \     values := { "Automatic", "Directed", "Undirected" },
#  \     names := { "Automatic", "Directed link", "Undirected link" }
#  \   }
#  \ )
# Parameters:
#   values - a set of strings with the values of a property.
#   names -  a set of strings which will be visible in Inspector. These strings are used to substitue
#            a real name of a property with a nice-looking name.
#            In this example, instead of a "Directed" value of a property, the user will see "Directed link" etc.
#   icons  - a set of string containing names of images used for "values" items.
#            If just a single image name is specified, then this icon will be used
#            for all items in the "values" list.
#
# Purpose:
# Allows the user to choose a value for the specified property by selecting it from a drop-down list.
# Note the difference with the ComboBoxField - this field doesn't allow to enter a new value of a property.
# In this example, the value of the "$directed" property can be chosen from a set of predefined values.
#------------------------------------------------------------------------
# ExtendedStringField
#--------------------
# Example of usage:
# inspector.node.element.*.Operation.item.Properties.item.time = ExtendedStringField
#
# Purpose:
# Allows the user to enter a multiline string which will be assigned the specified property.
# Linefeeds will automatically be converted to '\n' characters when displaying the string in a
# single-line editor and vice-versa when using a multi-line editor dialog.
# In this example, the entered value will be assigned to the "time" property of an operation.
#------------------------------------------------------------------------
# FileNameField
#--------------------
# Example of usage:
# inspector.node.element.*.*.item.Req.item.document = FileNameField
#
# Purpose:
# Allows the user to enter the URL of a document. The entered text will be assigned to the specified property.
# This field will have a popup menu with some commands ("Open" - tries to open this URL, "Copy" etc.)
# In this example, the entered value will be assigned to the "document" property from the "Req" tab.
#------------------------------------------------------------------------
# ClassField
#--------------
# Example of usage:
# inspector.node.element.java.Class.item.Properties.item.$extends = ClassField
# \ (
# \   {
# \     title := if ( %element%->hasProperty("$interface"), "Select interface to extend", "Select class to extend" ) ,
# \     class_filter :=
# \                     %class%->hasPropertyValue("$shapeType", "Class") &&
# \                     %element% != %class% &&
# \             if (
# \                         hasProperty("$interface"),
# \                         %class%->hasProperty("$interface"),
# \                         !%class%->hasProperty("$interface")
# \                     ) ,
# \     display_filter :=
# \                     if ( %class%->isPackage(),
# \                           true,
# \                           if ( %class%->isDiagram(),
# \                                true,
# \                                %class%->hasPropertyValue("$shapeType", "Class") &&
# \                                %element% != %class% &&
# \                                if (
# \                                   hasProperty("$interface"),
# \                                   %class%->hasProperty("$interface"),
# \                                   !%class%->hasProperty("$interface")
# \                                )
# \                           )
# \                     )
# \   }
# \ )
# Parameters:
#   title - a string with a title for the chooser dialog. Note, that instead of a single string,
#           a query can be used in order to be able to dynamically choose a title, based on the values
#           of the element's properties.
#           In this example, if the element is an interface, then the title will be
#           "Select interface to extend"; "Select class to extend" otherwise.
#   class_filter - a boolean query. In this, and display_filter parameter, the macro %class% can be used.
#           This macro stands for an element-candidate being analyzed by this chooser dialog.
#           If the calculated value is true, then the element represented by the %class% macro can be
#           selected (for example, added to the right panel by pressing Add button). If this value is
#           false, then the element won't be selectable.
#           In our example, an element in the chooser dialog will be selectable, only if it satisfies
#           this condition:
#                1) it is a class/interface
#                2) AND it is not the original element
#                3) AND ( if original element is interface, an element is interface also, or not interface otherwise)
#   display_filter - a boolean query. This query is very similar to the class_filter, but it controls
#            whether an element will be displayed in the chooser dialog at all.
#            In our example, an element will be displayed only if:
#                1) it is a package.
#                2) OR it is a diagram
#                3) OR : (
#                  3.1) it is a class/interface
#                  3.2) AND it is not the original element
#                  3.3) AND ( if original element is interface, an element is interface also, or not interface otherwise)
#                         )
#            Note, that in display_filter we make packages and diagrams visible to be able to
#            navigate through the tree-like structure of the model to the desired element (in our example
#            it is a class/interface)
#
# Purpose:
# Allows the user to choose several elements using a chooser dialog, providing powerful mechanism
# to filter out unwanted elements.
# This field returns unique names of selected elements and assigns these names to the specified property.
# For details about unique names and multiple instances of the same property, please see the description
# of RwiPropertyMap and RwiProperty interfaces in the API docs located in the \doc dir under your installation.
#------------------------------------------------------------------------
# NullField
#------------
# Example of usage:
# inspector.node.element.*.*.item.MyProperties.item.$nullProperty = NullField
# inspector.node.element.*.*.item.MyProperties.view.UI = treeTableNodeUI
#
# Purpose:
# Used to indicate that there shouldn't be any fields for the specified property. You can supply
# a NullField-property in order to create a new page, as it is shown in the example.
#------------------------------------------------------------------------
# HTMLStringField
#------------
# Example of usage:
# inspector.node.element.*.Note.item.Text.item.text = HTMLStringField
#
# Purpose:
# This field displays a multiline HTML text area. Also it contains
# a button enabling the HTML source editing.
#
# =============================================================================
# Part III : Other features
# =============================================================================
# For pages and properties it is possible to provide some additional information used by Inspector to
# define a page/property behavior:
#------------------------------------------------------------------------
# 1. Visible names
#------------
#    By default, the Inspector will display a name of a page/property as it is defined in this file.
# If you need to have another string displayed, use the following syntax:
#  inspector.node.element.<language>.<element_type>.item.<page_name>.item.<property_name>.name = "<visible_name>"
#
# Here, the visible_name is a string to be displayed. Example:
#  inspector.node.element.java.Attribute.item.Properties.item.$initialValue.name = "initial value"
#------------------------------------------------------------------------
# 2. Conditions
#------------
#   A condition is a boolean query. If its value is true, then a page/property will be displayed in the
# Inspector. If it is false, then it won't be displayed.
# A condition is defined using the following syntax:
#  inspector.node.element.<language>.<element_type>.item.<page_name>.item.<property_name>.condition = <boolean_query>
# Examples:
# 1) inspector.node.element.*.*.item.Doc.condition = !hasPropertyValue("$shapeType", "Note") && !isPackage()
#    Here, the Doc page will be displayed only if an element in NOT a Note, AND it is NOT a package
# 2) inspector.node.element.java.Operation.item.Properties.item.$final.condition = !hasProperty("$constructor") && !getContainingNode()->hasProperty("$interface")
#    The "$final" property will be displayed only if an operation is NOT a constructor, and its parent element is NOT an interface.
# Help on using and composing boolean queries can be found in the help topic for the "Expression"
# field in the Options->View Management->Show group.
#------------------------------------------------------------------------
# 3. Enabling the property edit
#------------
#   It is possible to specify a boolean query used to determine whether some property can
# be edited (if it is visible). If the value of the query is true, then the property can be edited.
# If it is false, the property will be read-only.
# Note the difference with the condition statement - it controls not the visibility of
# a property, but whether the user can change its value or not.
# The syntax:
#  inspector.node.element.<language>.<element_type>.item.<page_name>.item.<property_name>.enabled = <boolean_query>
# Examples:
# 1) inspector.node.element.*.MessageLink.item.Properties.item.$messageOperationName.enabled =
#    \                        getDestination()->hasProperty("$instantiatedClass")
#    The "$messageOperationName" property will be editable only if the destination has the specified property.
# Otherwise, it will be read-only.
# Help on using and composing boolean queries can be found in the help topic for the "Expression"
# field in the Options->View Management->Show group.
#
#
#
#=========================================================================
#=========================================================================
#
# Uncomment following lines to turn on example of inspector config
#
#=========================================================================
#=========================================================================
#
#
#inspector.node.element.*.Class.item.My page.view.UI = treeTableNodeUI
#
#inspector.node.element.*.Class.item.My page.item.myStringProperty = StringField
#inspector.node.element.*.Class.item.My page.item.myStringProperty.name = "My string property"
#inspector.node.element.*.Class.item.My page.item.myBooleanProperty = BooleanField
#inspector.node.element.*.Class.item.My page.item.myBooleanProperty.name = "My boolean property"
#inspector.node.element.*.Class.item.My page.item.myChoiceProperty = ComboBoxField
#\ (
#\   {
#\     values := { "value1", "value2", "value3" }
#\   }
#\ )
#inspector.node.element.*.Class.item.My page.item.myChoiceProperty.name = "My choice property"
#inspector.node.element.*.Class.item.My page.item.myConditionalProperty = StringField
#inspector.node.element.*.Class.item.My page.item.myConditionalProperty.name = "My conditional property"
#inspector.node.element.*.Class.item.My page.item.myConditionalProperty.condition = hasProperty("myBooleanProperty")
#inspector.node.element.*.Class.item.My page.item.myClassFieldProperty = ClassField
#\ (
#\   {
#\     title := if ( %element%->hasProperty("$interface"), "Select interface", "Select class" ) ,
#\     class_filter :=
#\                     %class%->hasPropertyValue("$shapeType", "Class") &&
#\                     %element% != %class% &&
#\             if (
#\                         hasProperty("$interface"),
#\                         %class%->hasProperty("$interface"),
#\                         !%class%->hasProperty("$interface")
#\                     ) ,
#\     display_filter :=
#\                     if ( %class%->isPackage(),
#\                           true,
#\                           if ( %class%->isDiagram(),
#\                                true,
#\                                %class%->hasPropertyValue("$shapeType", "Class") &&
#\                                %element% != %class% &&
#\                                if (
#\                                   hasProperty("$interface"),
#\                                   %class%->hasProperty("$interface"),
#\                                   !%class%->hasProperty("$interface")
#\                                )
#\                           )
#\                     )
#\   }
#\ )
#inspector.node.element.*.Class.item.My page.item.myClassFieldProperty.name = "My class field property"

