Commit 66b8ca19 authored by Adam Knapp's avatar Adam Knapp
Browse files

Documents updates


Signed-off-by: Adam Knapp's avatarAdam Knapp <adam.knapp@ericsson.com>
parent 62b9c1d3
......@@ -32,3 +32,7 @@
[[_11]]
* [11] link:https://gitlab.eclipse.org/eclipse/titan/titan.core/blob/master/usrguide/java_referenceguide/JavaReferenceGuide.adoc[Programmers Technical Reference for the Java side of the TITAN TTCN-3 Test Executor]
[[_12]]
* [12]
link:https://www.etsi.org/deliver/etsi_es/201800_201899/20187310/04.05.01_60/es_20187310v040501p.pdf[Methods for Testing and Specification (MTS);The Testing and Test Control Notation version 3.Part 10: TTCN-3 Documentation Comment Specification European Telecommunications Standards Institute. ES 201 873-10 Version 4.5.1, April 2013]
......@@ -61,16 +61,49 @@ By default, the Designer plug-in isn’t logging debug information to the Debug
+
The option is NOT CHECKED by default because most of the time these features hold no value for the users.
+
If you want to set any of these options, set the options "Display debug preferences" [.underline]#then press button "Apply".# An entry "Debug" appears under "**TITAN Preferences**" on the left pane (see <<display-debug-preferences,figure below>> ).
If you want to set any of these options, set the options "Display debug preferences" [.underline]#then press button "Apply".# An entry "Debug" appears under "**TITAN Preferences**" on the left pane (see <<display-debug-preferences, the figure below>>).
[[display-debug-preferences]]
image::images/2_F10.png[title="Display Debug preferences"]
Below the last option, the version of the currently set compiler and information about the license of the user is displayed.
Below the last option, the compiler information section is present containing the version of the currently set compiler and information about the license of the user is displayed. The "Details" button shows more information about the configured compiler that can be particularly useful when there are some problems with the configured compiler or with the user license (see <<compiler-information,the figure below>>).
[[compiler-information]]
image::images/2_compiler_information.png[title="Compiler information"]
NOTE: In case the license file is not provided, is not valid or has expired an additional link will appear on this page. Clicking on this link a browser will open directing the user to a web page where he can order a new license or can ask for a renewal of his existing one.
[[bracket-matching-preferences]]
== Bracket matching preferences
image::images/3_F16.png[title="Bracket matching preferences"]
The following options can be set on the Bracket matching preferences page (see the figure above):
* **Highlight matching brackets**
+
Checking this option enables highlighting of matching round, square and curly bracket pairs.
* **Color**
+
The highlighting color is selected with this option.
* **Enable coloring of matching brackets**
+
Checking this option enables coloring of matching round, square and curly bracket pairs according to their level of depth.
+
NOTE: This preference depends on the semantic highlighting option, i.e. that must be enabled to have effect of this preference. It might be necessary to reopen the current file in the editor to enable re-parsing of the file and applying the change.
* **Bracket color level x**
+
The highlighting color related to the specified level of depth is selected with this option. If the bracketing is more than eight level deep, the coloring starts over from level 1 (see <<,the figure below>>).
[[bracket-coloring]]
image::images/3_coloring_of_matching_brackets.png[title="Coloring of matching brackets"]
== Content Assist Preferences
[[content-assist]]
image::images/3_F11.png[title="Content Assist"]
......@@ -105,6 +138,20 @@ This option is CHECKED by default.
The delay between the auto activation of the content assistant, and its actual starting can be set here in milliseconds. +
The default setting is: 500 milliseconds
* **Enable code hover popups**
+
If enabled, a popup window is shown when hovering over different elements of the source code. The content is context-dependent and presents relevant information related to the selected part of the source code. See also the next preference.
* **Hover window content**
+
The content of the popup window can be specified by this preference. This option can be directly changed using the shortcut button of the hover window (see <<hover-window-content,the figure below>>). Two types are implemented:
* code comment and info: relevant information is shown based on the documentation comments (if available) and the semantic information related to the selected part of the source code.
* code peek: the definition of the selected code part is shown in the popup window.
[[hover-window-content]]
image::images/3_hover_window_content.png[title="Hover window content"]
[[debug]]
== Debug
[[debug-options]]
......@@ -216,6 +263,7 @@ Choose this option if you want to have up-to-date tpd files in your workspace. T
+
This option works if the previous option is set. Choose this option if you want to change the location of the tpd file while it is being imported or if you want to specify the location of new tpd files at the first automatic save. The automatic save shall not work if it is not set and the project does not have a tpd file yet. This way the automatic save can work only on a subset of the projects.
[[folding-preferences]]
== Folding Preferences
image::images/3_F15.png[title="Folding preferences"]
......@@ -244,21 +292,6 @@ Parameters, that is, (text between parentheses) will be folded if both this opti
+
This option disables the folding of a region unless there are at least that many lines between the ending and starting lines of the region.
[[matching-brackets-highlighting-preferences]]
== Matching Brackets Highlighting Preferences
image::images/3_F16.png[title="Matching brackets preferences"]
The following options can be set on the Highlight matching brackets page (see the figure above):
* **Highlight matching brackets**
+
Checking this option enables highlighting of matching round, square and curly bracket pairs.
* **Color**
+
The highlighting color is selected with this option.
== Indentation Preferences
image::images/3_F17.png[title="Indentation preferences"]
......@@ -267,14 +300,18 @@ Indentation rules (valid for each editor provided by the TITAN Designer plug-in)
* **Indentation policy**
+
the drop-down list contains two options: *Spaces* and *Tab*. When *Spaces* is selected, indentation is done by inserting a number of spaces before the text; the number of space characters is determined in the field *Indentation size*. When *Tab* is selected, indentation is performed by inserting a single tabulator character before the text.
The drop-down list contains two options: *Spaces* and *Tab*. When *Spaces* is selected, indentation is done by inserting a number of spaces before the text; the number of space characters is determined in the field *Indentation size*. When *Tab* is selected, indentation is performed by inserting a single tabulator character before the text.
* **Indentation size**
+
this field determines the number of spaces used for indentation. It is only enabled when the indentation policy is set to *Spaces*.
This field determines the number of spaces used for indentation. It is only enabled when the indentation policy is set to *Spaces*.
In the default indentation policy, a single indentation level corresponds to inserting two spaces.
* **Remove trailing whitespaces when saving**
+
Enabling this feature allows removing the trailing whitespaces during saving.
[[mark-occurrences-0]]
== Mark Occurrences
......@@ -292,6 +329,7 @@ if the selection or the position of the cursor changes and the occurrences of th
+
the occurrences of the selected elements will be displayed.
[[on-the-fly-checker-preferences]]
== On-the-fly Checker Preferences
image::images/3_F19.png[title="On-the-fly checker preferences"]
......@@ -332,6 +370,9 @@ When this feature enabled support for the realtime extension of the TTCN-3 stand
+
When this feature enabled support for the OOP extension of the TTCN-3 standard will be activated. This also means that the now, e.g. class, this, super etc. words become keywords in TTCN-3 files.
* **Enable on-the-fly checking of document comments**
+
When this feature enabled the document comments are parsed and analyzed on the fly as well according to the related TTCN-3 standard extension. The document comments are used for providing information upon hovering over a source code element, as well as upon showing the content assist (code completion). Furthermore, this allows for certain consistency checks between the code comments and the related semantic information, e.g. if the formal parameter list of a function differs from its commented one, the user can be notified.
=== Pitfalls
......@@ -383,6 +424,14 @@ Potential programming problems:
+
According to the standard syntax errors in the extension attribute should not be reported, but should be assumed as correct for some other tool. The on-the-fly checker, when a syntax error is detected in an extension attribute, triggers one of the following behaviors: *Ignore*, *Warning*, *Error*. The default setting is: *Error*.
* **Report reuse of module name as identifier**
+
According to the standard the reuse of the module is not allowed, however technically it does not effect the code generation. The severity of this issue can be: *Ignore*, *Warning*, *Error*. The default setting is: *Error*.
* **Check for possible inconsistencies between the document comment and its related definition**
+
During parsing the document comments, consistency checks are performed between the code comments and the related semantic information, e.g. if the formal parameter list of a function differs from its commented one, the user can be notified. The severity of such issues can be: *Ignore*, *Warning*, *Error*. The default setting is: *Warning*.
The on-the-fly checker is described in detail <<7-editing_with_titan_designer_plugin.adoc#on-the-fly-semantic-checking, here>>.
NOTE: Changing these preferences will trigger a full re-checking of the projects already checked (when the changes are applied).
......@@ -426,45 +475,61 @@ Visibility attributes should not be mentioned in the names of the definitions. T
image::images/3_F22.png[title="Syntax coloring preferences 1"]
On the Syntax coloring page, the syntax coloring preferences of the editors can be set. To change the color scheme of an element, the element must be selected in the middle pane. To find the right element, click the *+* sign next to the appropriate group. The following groups have been defined:
On the Syntax coloring page, the syntax coloring preferences of the editors can be set. To change the color scheme and style of an element, first the element must be selected in the middle pane. To find the right element, click the *>* sign next to the appropriate group. The following groups have been defined:
* **General**
+
the settings of these elements are applied in every editor. The coloring of text, comments and strings can be set here.
The settings of these elements are applied in every editor. The style of text, comments and strings can be set here.
* **ASN.1 specific**
+
the settings of these elements are applied in the ASN.1 editor. Colors of ASN.1 specific elements are determined here.
The settings of these elements are applied in the ASN.1 editor. Styles of ASN.1 specific elements are determined here.
* **Configuration specific**
+
the settings applied to these elements are valid for the Configuration editor. Colors of configuration specific elements are set here.
The settings applied to these elements are valid for the Configuration editor. Styles of configuration specific elements are set here.
* **TTCN-3 specific**
+
the settings of these elements are applied in the TTCN-3, TTCNPP and TTCNIN editors. Colors of TTCN-3 specific elements and preprocessor tokens are chosen here.
The settings of these elements are applied in the TTCN-3, TTCNPP and TTCNIN editors. Styles of TTCN-3 specific elements and preprocessor tokens are chosen here.
* **TTCN-3 semantic specific**
+
These settings are only available if the semantic highlighting is enabled on the top of the preference page. It contains such TTCN-3 specific elements that also carries semantic information, e.g. constants, type definitions etc. For certain elements, e.g. deprecated, the documentation comments have to parsed (to enable this feature see <<on-the-fly-checker-preferences, here>>). These settings allow the users to create more sophisticated coloring and style schemes.
The elements are only enabled if there is a node selected in the tree displayed on the middle pane. The elements are disabled if a branch is selected.
The actual attributes assigned to the selected elements are always shown (and can be modified) on the upper half of the right pane as follows:
* **foreground color**
* **Color**
+
This option sets the color used for displaying characters.
* **background color**
* **Background color**
+
This option sets the character background color.
* **use background color**
* **Enable background color**
+
This option enables background color. If this is disabled, the background color of the general text editor will be used instead of the selected one.
* **bold**
* **Bold**
+
This option sets the style of the text to be bold. If this is disabled, the normal text will be used.
This option sets the style of the text to be bold.
The lower half of the right pane, if a node is selected, shows either the words that are affected by the color scheme or an example text.
* **Italic**
+
This option sets the style of the text to be italic.
* **Strikethrough**
+
This option strikethrough/strikeout the specific text.
* **Underline**
+
This option underlines the specific text.
The lower half of the right pane shows an example text, where the user can follow the changes he made.
image::images/3_F23.png[title="Syntax coloring preferences 2"]
......@@ -472,7 +537,7 @@ To apply the new syntax color scheme, press the *Apply* or the *OK* button. Acti
The *Restore Defaults* button restores every setting to its default value.
As an experimental feature, TITAN Designer plug-in supports theming. The supported Eclipse built-in themes are light (default) and dark. To change the theme go to *Window / Preferences* and select *General/Appearance*. Check *Enable theming* and select the preferred theme from the drop-down list.
TITAN Designer plug-in supports theming. The supported Eclipse built-in themes are light (default) and dark. To change the theme go to *Window / Preferences* and select *General/Appearance*. Check *Enable theming* and select the preferred theme from the drop-down list. The different themes have different syntax coloring preferences.
image::images/theming.png[title="Setting up theming"]
......@@ -504,4 +569,7 @@ The first group deals with automatic bracket insertion. For the last three items
The second group contains only one box for controlling new line insertion. A checked box has the following effect:
if the user hits *Enter* between two curly brackets, the cursor will be moved to the next line and the closing bracket even further, to the second line. This way an empty line is formed with an opening bracket above and a closing bracket below it. The cursor will be placed on the empty line.
The third group contains only one box for controlling '\*' insertion. A checked box has the following effect:
if the user hits *Enter* when typing in multi-line/block comment context, the new line will automatically start with an indented '\*' character. This behavior stops when the multi-line/block comment is closed (with '\*/').
By default, all boxes are checked.
......@@ -30,31 +30,31 @@ image::images/7_F85.png[title="Syntax coloring of TTCN-3 files"]
== Matching Brackets
Bracket matching in source code provides structural information to the user. The functionality is activated by placing the mouse cursor after an opening or closing bracket. Figure 85 shows the closing bracket in line 51 highlighted with black color.
Bracket matching in source code provides structural information to the user. The functionality is activated by placing the mouse cursor after an opening or closing bracket. The figure below shows the open bracket in the end of the first line and its closing pair in the last line.
image::images/7_F86.png[title="Matching brackets highlight in TTCN-3 files"]
The function can be customized on the workbench preferences; see <<3-setting_workbench_preferences.adoc#matching-brackets-highlighting-preferences, here>>.
The function can be customized on the workbench preferences; see <<3-setting_workbench_preferences.adoc#bracket-matching-preferences, here>>.
== Folding
Folding is another mechanism to provide structural information to the user. Folding decreases the amount of information displayed on screen, thus, users only sees that part of the code they are working with. Text regions can be folded and un-folded with a single click on the folding marker on the left-side ruler.
Folding is another mechanism to provide structural information to the user. Folding decreases the amount of information displayed on screen, thus, users only sees that part of the code they are working with. Text regions can be folded and unfolded with a single click on the folding marker on the left-side ruler.
Figure 86 shows a possible folding but the text is not folded.
The figure below shows a possible folding but the text is not folded.
NOTE: Folding marker on the left-side ruler at line 47.
image::images/7_F87.png[title="Template not folded"]
Figure 87 shows the folding range, the smallest folding region the selected line belongs to. The folding range is displayed when the mouse pointer is placed over the left-side ruler.
The next figure shows the folding range, the smallest folding region the selected line belongs to. The folding range is displayed when the mouse pointer is placed over the left-side ruler.
image::images/7_F88.png[title="Folding range shown"]
Figure 88 shows the text folded. Regions of text can be folded and un-folded with a single click on the folding marker on the left-side ruler.
The following figure shows the text folded. Regions of text can be folded and unfolded with a single click on the folding marker on the left-side ruler.
image::images/7_F89.png[title="Template folded"]
The function can be customized by modifying the Folding preferences on the workbench (see <<3-setting_workbench_preferences.adoc#excluded-resources, here>>).
The function can be customized by modifying the Folding preferences on the workbench (see <<3-setting_workbench_preferences.adoc#folding-preferences, here>>).
[[on-the-fly-parsing]]
== On-the-fly Parsing
......@@ -63,7 +63,7 @@ On-the-fly parsing means that the text is automatically parsed and checked as it
The parser starts one second after the last character is typed. (This duration should be long enough for the parser to operate without disturbing the user.) The problems found by this parser are automatically and instantly indicated to the user, allowing a fast and precise feedback on errors and reducing the detection time to almost zero.
Figure 89 shows an example error marker. The user was about to type the keyword `template`, but as soon as he has typed `tem` the on-the-fly parser noticed that the file was syntactically faulty.
<<content-assistant-figure, This>> figure shows an example error marker. The user was about to type the keyword `template`, but as soon as he has typed `tem` the on-the-fly parser noticed that the file was syntactically faulty.
Before parsing, the error markers created by the on-the-fly parser are removed. As parsing proceeds, new markers are appearing ensuring that the markers are always up-to-date (except for the markers of the compiler as they are updated by the compiler itself, see <<mark-occurrences-1, here>>).
......@@ -78,7 +78,7 @@ The three steps of the parsing process:
The parsing process (like every other long running operation in the plugin) provides progress indication. Overall parsing of a file is usually very fast; however, the duration of the on-the-fly parsing is adversely influenced by the size of the actually edited file. The size of the project does not matter except for the first parsing of a project, when every file needs to be analyzed once. However, if several files need to be parsed, our algorithm will try to do this in parallel, where the level of parallelism is only limited by the amount of hardware support available (for example a computer with 2 or 4 processor cores, will finish this task about 2, 4 times faster in the optimal case).
If too slow, the parsing can be turned off on the TITAN preferences page (see <<3-setting_workbench_preferences.adoc#titan-preferences, here>>). Disabling the parsing does not destruct the data stored in the memory; rather, the data cannot be updated while this option is set. If parsing is enabled again, the parser will try to update outdated data.
If too slow, the parsing can be turned off on the TITAN preferences page (see <<3-setting_workbench_preferences.adoc#on-the-fly-checker-preferences, here>>). Disabling the parsing does not destruct the data stored in the memory; rather, the data cannot be updated while this option is set. If parsing is enabled again, the parser will try to update outdated data.
Parsing of files can be slow in the following cases:
......@@ -200,13 +200,14 @@ When an element is selected in the list of the proposed elements, a pop-up windo
=== Assistance with Keywords
Editors support a basic level of content assistance, namely the listing of the appropriate keywords (Figure 89).
Editors support a basic level of content assistance, namely the listing of the appropriate keywords (next figure).
[[content-assistant-figure]]
image::images/7_F90.png[title="Content assistant"]
=== Assistance with Code Skeletons
The intermediate level of assistance inserts structural elements into the source code (Figure 90). Inserting skeletons is only supported for TTCN-3, TTCNPP, TTCNIN and ASN.1 files.
The intermediate level of assistance inserts structural elements into the source code (following figure). Inserting skeletons is only supported for TTCN-3, TTCNPP, TTCNIN and ASN.1 files.
image::images/7_F91.png[title="Skeletons in the content assistant"]
......@@ -216,7 +217,7 @@ A short description of them is provided after the name of the skeleton if a skel
==== Using the Inserted Skeleton
The insertions may contain linked editing points (Figure 91).
The insertions may contain linked editing points (next figure).
image::images/7_F92.png[title="Example inserted skeleton"]
......@@ -228,6 +229,7 @@ Hints for using the inserted skeleton:
* To leave this insertion mode and validate the insertion, press the *ESC* key.
[[assistance-with-dynamic-elements]]
=== Assistance with Dynamic Elements
The highest level of content assistance is available for TTCN-3 and ASN.1 files. It is providing scope and type structure information that has been parsed and collected by the on-the-fly parser. The calculation of the proposals is done this way:
......@@ -243,12 +245,54 @@ The proposals are ordered in the following way (definitions don’t hide each ot
. Skeletons available in the given scope. The skeletons are ordered alphabetically.
. Keywords available. The keywords are ordered alphabetically.
As an experimental feature, the content assistant is made context-aware in some cases meaning that it lists more relevant proposals based on the context where it was initiated. The following cases are handled (not a complete list):
* list of modules after `import from` and `friend` keywords;
* list of component types after `runs on` and `system` keywords;
* list of matching/compatible type of elements from the visible scope for the right side of an assignment;
* list of matching/compatible type of elements from the visible scope for a function parameter;
* list of the enumerated items of the matching type for the right side of an assignment;
* documentation comment tags when editing documentation comment section.
When this context-aware content assist is invoked, it also provides the documentation comments (if available) related to the selected proposal.
=== Content Assistance Limitations
Full context sensitivity is not possible yet. Only the scopes and the type structures are used to filter the list of proposals. For this reason, the content assistant might offer completion proposals, which are possible in the actual scope but not in the actual context. It is the user’s task to choose the right proposal.
Only data gathered and stored by the on-the-fly parsers can be offered. If this data is outdated or not complete, the content assistance will also offer outdated or limited information. Section 3.1 explains how this can happen.
== Documentation comments
Documentation comments are supported according to <<_12, TTCN-3 Documentation Comment Specification>> and also available for extending the capabilities of some IDE features. Beside having a brief description in the code about the commented language element, the documentation comments are parsed and able to assist the users who are writing or browsing the code through integrating the documentation comments in some standard IDE features. The documentation comments are integrated into the following IDE functions:
* Code hover popups: when hovering over certain language elements, a popup window appears containing the related and parsed documentation comment. The documentation comments are completed with relevant semantical information, e.g. with the types of the formal parameters of a function. An example of this feature is presented in the figure below. The content of this popup window can be changed to peek the definition of that language element (for details see <<peek-declaration,Peek declaration>>). To enable this feature see the <<content-assist,Content Assist Preferences>>.
image::images/7_doc_comment_hover_example.png[title="Documentation comments usage during hovering"]
* Content assistance: in certain use cases the documentation comments are also presented to the listed proposals when the user requesting for code assistance/completion. This is illustrated in the figure below. Such use cases are listed in <<assistance-with-dynamic-elements,Assistance with Dynamic Elements>>. In these cases, the content of the popup window is identical to the previous one.
image::images/7_doc_comment_code_assist_example.png[title="Documentation comments usage during code assist"]
* Semantic information and documentation comments consistency checks: it is intentionally left a big user freedom to write basically anything in the documentation comment section of the code, however, there are several validation mechanisms available to notify the users about possible problems with the code and/or with the documentation comment. The severity of these problems is configurable (see <<errors-warnings-preferences, Errors / Warnings Preferences>>). The comment tags are validated against the language element to which they are related, e.g. the `@verdict` tag is marked if it used in documentation comment of a type definition. Also, the related comments of the formal parameter lists are also checked against the definition, e.g. the number of the documented parameters differ from the related function definition, etc.
* Code highlight: the specification recommends to use the `@status` tag for describing the actual status of the object. If the deprecated status (`@status deprecated`) is used, the highlight of the relevant code parts is changed according to the configured style (the semantic highlighting preference must be enabled, see <<syntax-coloring-preferences, Syntax Coloring Preferences>>).
To have the listed functions, the on-the-fly checking of document comments preference must be enabled (see <<on-the-fly-checker-preferences,On-the-fly Checker Preferences>>) beside the function specific configuration.
Additional features:
* the `@url` tag is automatically converted to a link.
* HTML tags are allowed in the documentation comments. Actually, the popup windows work as simple web browsers, thus complete pages or PDF documents can also be shown.
=== Generate documentation comment
To simply the work with the documentation comments, skeletons can be generated taking into account the actual language element, on which the generation was initiated. Generate documentation comment can be invoked either by a key combination (by default *Ctrl+F3*) or by selecting/clicking on the language object, then *right clicking* and selecting *Generate doc comment*. The generated comment skeleton can be easily filled with the relevant information by the user. Only the most typical comment tags specific to the given language element are generated, see the examples below.
image::images/7_doc_comment_gen_example.png[title="Examples of the generated documentation comments"]
=== Documentation comments limitations
Implicitly tagged documentation information is not supported.
The documentation comment has to directly precede the language element to which it is related to, i.e. new line characters are not allowed between the language object and its documentation comment. Otherwise, it is considered as there is no documentation comment to the specific object.
== Find Declaration
Open Declaration provides a feature to jump to the declaration point of the selected element.
......@@ -281,7 +325,7 @@ Find module parameter declarations. If the module parameter is given as a module
"Find references" provides a feature to search for all elements that refer the selected TTCN-3 or ASN.1 element. The user can select TTCN-3 definitions of types, constants, variables, templates, variable templates, functions, testcases, altsteps, components, ports, formal parameters, enumerated values, etc. ASN.1 type and value assignments can be selected in ASN.1 files. In case of structured types (record, set, union, etc.) the individual fields can be selected, in this case all references to that field will be displayed. The source files should be syntactically and semantically correct prior to starting the search, otherwise it cannot be guaranteed that all references to the given element will be found.
Find References can be invoked either by a key combination (by default *F4*) or by *right clicking* anywhere on the screenand selecting *Find References*. The element is determined by the current position of the cursor when the functionality is invoked.
Find References can be invoked either by a key combination (by default *F4*) or by *right clicking* anywhere on the screen and selecting *Find References*. The element is determined by the current position of the cursor when the functionality is invoked.
The found references will be displayed in the standard Eclipse search result view, it is usually displayed at the bottom as a new tab. The found references are displayed in a tree view, grouped by module. If it cannot be determined what element we are trying to search for, an error message will be displayed and the search result view will not be opened. The error message will be displayed in *the status line of Eclipse*, without presenting any extra pop-up windows. In the search result view clicking on an occurrence will open the source file and jump to the reference location.
......@@ -327,15 +371,21 @@ in the example below, if the cursor is on the `field1` sub-reference, the occurr
* The occurrences of keywords, predefined functions, primitive data types and literals are not marked.
[[peek-declaration]]
== Peek declaration
As experimental feature, this functionality shows the definition of the selected TTCN-3 language element in a popup window to avoid navigating to the actual location of the definition (see the figure below). If enabled and configured (for details see <<content-assist,Content Assist preferences>>), the popup window appears when hovering over elements of the source code. This feature builds upon the <<find-references,Find References>> feature. It works with most of the TTCN-3 language elements. The feature can be initiated from the popup menu when selecting a TTCN-3 language element or by pressing the hotkey `F9` as well.
image::images/7_peek_declaration_example.png[title="Peek declaration example"]
== Refactoring
=== Rename Refactoring
This feature builds upon the "Find References" feature, it can be invoked the same way and it works on the same language elements. Most of the TTCN-3 and ASN.1 language elements can be renamed using this feature.
This feature builds upon the <<find-references,Find References>> feature, it can be invoked the same way and it works on the same language elements. Most of the TTCN-3 and ASN.1 language elements can be renamed using this feature.
The user can select TTCN-3 definitions of types, constants, variables, templates, variable templates, functions, testcases, altsteps, components, ports, formal parameters, enumerated values, etc. ASN.1 type and value assignments can be selected in ASN.1 files. In case of structured types (record, set, union, etc.) the individual fields can be selected. The source files should be syntactically and semantically correct prior to starting the renaming. By default, projects containing errors or ttcnpp files cannot be refactored, but this behavior can be changed in the TITAN Preferences on the On-the-fly checker page. If refactoring is done on projects which contain syntax or semantic errors or ttcnpp files, then it cannot be guaranteed that all occurrences of the given definition or field will be renamed because some occurrences may reside in places that are inside erroneous source code or places that are not active after pre-processing of ttcnpp files.
Rename refactoring can be invoked either by a key combination (by default *Ctrl+F4*) or by *right clicking* anywhere on the screenand selecting *Rename Refactoring*. The element is determined by the current position of the cursor when the functionality is invoked. If it cannot be determined what element we are trying to rename, an error message will be displayed. The error message will be displayed in *the status line of Eclipse*, without presenting any extra pop-up windows.
Rename refactoring can be invoked either by a key combination (by default *Ctrl+F4*) or by *right clicking* anywhere on the screen and selecting *Rename Refactoring*. The element is determined by the current position of the cursor when the functionality is invoked. If it cannot be determined what element we are trying to rename, an error message will be displayed. The error message will be displayed in *the status line of Eclipse*, without presenting any extra pop-up windows.
The refactoring process starts with a dialog box where the new name should be specified, the new name must be a valid TTCN-3 or ASN.1 identifier.
......
---
Author: Jenő Balaskó, Ádám Knapp
Version: 8.1.0
Date: 2021-11-10
Version: 8.2.0
Date: 2022-05-04
---
= User Guide for the TITAN Designer for the Eclipse IDE
:author: Jenő Balaskó, Ádám Knapp
:revnumber: 8.1.0
:revdate: 2021-11-10
:revnumber: 8.2.0
:revdate: 2022-05-04
:title-logo-image: images/titan_logo.png
:sectnums:
:doctype: book
......@@ -24,7 +24,7 @@ This document describes detailed information of using the TITAN Designer for the
*Copyright*
Copyright (c) 2000-2021 Ericsson Telecom AB. +
Copyright (c) 2000-2022 Ericsson Telecom AB. +
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at
https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment