titan.EclipsePlug-ins issueshttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues2024-03-27T10:12:38Zhttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/517Exception when editing TTCN3 code2024-03-27T10:12:38ZEduárd CzimbalmosException when editing TTCN3 codeWhen changing line 13 from `var octetstring vl_char := "";` to `var octetstring vl_char := '';` then an exception is dropped:
Exception in thread "Thread-38" java.lang.StringIndexOutOfBoundsException: begin 1, end 0, length 2
at java.b...When changing line 13 from `var octetstring vl_char := "";` to `var octetstring vl_char := '';` then an exception is dropped:
Exception in thread "Thread-38" java.lang.StringIndexOutOfBoundsException: begin 1, end 0, length 2
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4606)
at java.base/java.lang.String.substring(String.java:2709)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Lexer.HSTRING_action(Ttcn3Lexer.java:687)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Lexer.action(Ttcn3Lexer.java:551)
at org.antlr.v4.runtime.atn.LexerCustomAction.execute(LexerCustomAction.java:97)
at org.antlr.v4.runtime.atn.LexerActionExecutor.execute(LexerActionExecutor.java:168)
at org.antlr.v4.runtime.atn.LexerATNSimulator.accept(LexerATNSimulator.java:369)
at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:302)
at org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(LexerATNSimulator.java:233)
at org.antlr.v4.runtime.atn.LexerATNSimulator.match(LexerATNSimulator.java:117)
at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:141)
at org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:169)
at org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:152)
at org.antlr.v4.runtime.BufferedTokenStream.nextTokenOnChannel(BufferedTokenStream.java:325)
at org.antlr.v4.runtime.CommonTokenStream.adjustSeekIndex(CommonTokenStream.java:70)
at org.antlr.v4.runtime.BufferedTokenStream.consume(BufferedTokenStream.java:137)
at org.antlr.v4.runtime.Parser.consume(Parser.java:571)
at org.antlr.v4.runtime.Parser.match(Parser.java:203)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_AssignmentChar(Ttcn3Parser.java:45237)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_SingleVarInstance(Ttcn3Parser.java:22435)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_VarList(Ttcn3Parser.java:22312)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_VarInstance(Ttcn3Parser.java:22045)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_FunctionLocalInst(Ttcn3Parser.java:13684)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_FunctionStatementOrDef(Ttcn3Parser.java:13564)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_FunctionStatementOrDefList(Ttcn3Parser.java:13490)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_StatementBlock(Ttcn3Parser.java:35621)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_TestcaseDef(Ttcn3Parser.java:15668)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_ModuleDef(Ttcn3Parser.java:2111)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_ModuleDefinition(Ttcn3Parser.java:1891)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_ModuleDefinitionsList(Ttcn3Parser.java:1831)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_TTCN3Module(Ttcn3Parser.java:1285)
at org.eclipse.titan.designer.parsers.ttcn3parser.Ttcn3Parser.pr_TTCN3File(Ttcn3Parser.java:1007)
at org.eclipse.titan.designer.parsers.ttcn3parser.TTCN3Analyzer.parse(TTCN3Analyzer.java:218)
at org.eclipse.titan.designer.parsers.ttcn3parser.TTCN3Analyzer.parse(TTCN3Analyzer.java:140)
at org.eclipse.titan.designer.parsers.ProjectSourceSyntacticAnalyzer.fileBasedGeneralAnalysis(ProjectSourceSyntacticAnalyzer.java:910)
at org.eclipse.titan.designer.parsers.ProjectSourceSyntacticAnalyzer.fileBasedTTCN3Analysis(ProjectSourceSyntacticAnalyzer.java:871)
at org.eclipse.titan.designer.parsers.ProjectSourceSyntacticAnalyzer.access$000(ProjectSourceSyntacticAnalyzer.java:77)
at org.eclipse.titan.designer.parsers.ProjectSourceSyntacticAnalyzer$2.run(ProjectSourceSyntacticAnalyzer.java:474)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
```
module BinaryBody {
type component MAIN_CT {}
type enumerated STATE {
OCT,
CHAR
}
testcase tc_binary() runs on MAIN_CT {
const octetstring vl_isup := '011160'O; // removed whole msg for security
var octetstring vl_oct := ''O;
var octetstring vl_char := "";
var STATE vl_state := OCT;
for(var integer i := 0; i < lengthof(vl_isup); i := i + 1) {
if(oct2int(vl_isup[i]) <= 127) {
vl_oct := vl_oct & vl_isup[i];
if(vl_state == CHAR) {
if(lengthof(vl_char) > 0) {
action("...then: ", vl_char);
vl_char := "";
}
}
vl_state := OCT;
} else {
vl_char := vl_char & vl_isup[i];
if(vl_state == OCT) {
if(lengthof(vl_oct) > 0) {
action("...then: ", oct2char(vl_oct));
vl_oct := ''O;
}
}
vl_state := CHAR;
}
}
}
control {
execute(tc_binary());
}
}
```Miklos MagyariMiklos Magyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/516False positive result of "unused import" code smell2024-03-01T09:16:59ZAdam KnappFalse positive result of "unused import" code smellThe "unused import" code smell of Titanium provides false positive result in the following case:
```
module General_Types
{
type record of integer IntegerList;
}
module test {
import from General_Types all;
public function f_Csil...The "unused import" code smell of Titanium provides false positive result in the following case:
```
module General_Types
{
type record of integer IntegerList;
}
module test {
import from General_Types all;
public function f_CsillamPoni1()
return IntegerList // import is marked, but the imported type is used here
{
return { 1 };
}
}
```Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/515False positive result of "read only out and inout parameter" code smell2024-03-01T09:17:09ZAdam KnappFalse positive result of "read only out and inout parameter" code smellThe "read only out and inout parameter" code smell of Titanium provides false positive result in the following case:
```
module test {
type port PT message {
in integer
}
type component CT {
port PT pt
}
function f_recv(
out...The "read only out and inout parameter" code smell of Titanium provides false positive result in the following case:
```
module test {
type port PT message {
in integer
}
type component CT {
port PT pt
}
function f_recv(
out integer pl_recv
) runs on CT return boolean {
alt {
[] pt.receive(?) -> value pl_recv { return true; } // pl_recv is marked, but written here
[] pt.receive { return false; }
}
return false;
}
}
```Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/512Uncompilable generated code2023-08-03T12:34:08ZAdam KnappUncompilable generated codeCopy of titan.core#699
## Summary
The TITAN generates uncompilable code from the ASN.1 file
## Steps and/or TTCN-3 code to reproduce
Try to compile the generated code
## What is the current bug behavior?
error: redeclaration of ‘si...Copy of titan.core#699
## Summary
The TITAN generates uncompilable code from the ASN.1 file
## Steps and/or TTCN-3 code to reproduce
Try to compile the generated code
## What is the current bug behavior?
error: redeclaration of ‘size_t pos’
size_t pos = p_buf.get_pos();
^~~
error: redeclaration of ‘OER_struct tmp_oer’
OER_struct tmp_oer;
^~~~~~~
## Titan version
Latest
/cc @aknappqwt @mmagyariAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/511Error markers are shown after editing with earlier code content2023-06-09T10:09:58ZEduárd CzimbalmosError markers are shown after editing with earlier code content## Summary
After correcting an erroneous code, Eclipse TITAN Designer still shows error marker with the earlier code content.
## Steps and/or TTCN-3 code to reproduce
Happens on big project, could not reproduce it with small project. ...## Summary
After correcting an erroneous code, Eclipse TITAN Designer still shows error marker with the earlier code content.
## Steps and/or TTCN-3 code to reproduce
Happens on big project, could not reproduce it with small project. I've shown it to @aknappqwt on screen share.
## Platform details (OS type and version)
eclipse.buildId=4.27.0.20230309-1200
eclipse.vm=/home/ethecs/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/bin/java
Ubuntu 22.04
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/506Improve content assist - phase 32022-12-07T09:42:03ZAdam KnappImprove content assist - phase 3Improve content assist processor to provide better/more relevant suggestions
Use cases for proposing:
- [ ] add more meaningful template text when proposing HTML tags
- [ ] for 'create', find out the context (component or constructor) a...Improve content assist processor to provide better/more relevant suggestions
Use cases for proposing:
- [ ] add more meaningful template text when proposing HTML tags
- [ ] for 'create', find out the context (component or constructor) and provide the correct proposals
- [ ] encoding related proposals
- [ ] attribute qualifier
- [ ] attribute qualifier all
- [ ] attribute qualifier all except
- [ ] variant attribute XER
- [ ] variant attribute BER
- [ ] variant attribute JSON
- [ ] variant attribute RAW
- [ ] variant attribute TEXT
- [ ] single assignments, (eg. x := )
- [ ] modifier keywords starts with "@"
- [ ] class member definition: var type @property
Generic tasks:
- [ ] if the user started to type and asks for proposals, the proposals could contain symbols from any known modules from the project (also the import statement could be added automatically)https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/505Imrovement on logging of sensitive data2022-11-17T14:20:31ZAdam KnappImrovement on logging of sensitive data## Summary
Our customers complain that they could find some sensitive data are printed in TTCN log. (such as k, op, opc…)
So we want to check whether Titan team could support a new function to protect these sensitive data in logs.
## ...## Summary
Our customers complain that they could find some sensitive data are printed in TTCN log. (such as k, op, opc…)
So we want to check whether Titan team could support a new function to protect these sensitive data in logs.
## What is the expected correct behavior?
No sensitive data is written to logs
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.)
## Possible fixes
We have a proposal for this function:
To fulfil generic product security requirement, Titan could provide log API to filter out sensitive contents before output to log file.
Sensitive contents can be described by e.g. regular expression patterns.
The API could be set in whole process level since typhon framework is used by AAT and AAT can’t change typhon code directly.
Example imlementation:
```
type record UserData{
charstring username,
octetstring secret_key
} with {
extension (secret_key) “sensitive_data”
}
type octetstring OPc with {extension “sensitive_data” }
If
FileMask:=LOG_ALL
Then the log would contain
{ username := “User1”, secret_key=<redacted>}
If
FileMask:=LOG_ALL | SENSITIVE
Then the log would contain
{ username := “User1”, secret_key=’11223344’O}
```
## Titan version
8.2
## Platform details (OS type and version)
All
/cc @aknappqwthttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/504OOP: classes embedded in structured types2022-11-15T15:57:57ZAdam KnappOOP: classes embedded in structured typesImplement classes as fields or elements of TTCN-3 structures as described in version 1.3.1 of the standard extension.Implement classes as fields or elements of TTCN-3 structures as described in version 1.3.1 of the standard extension.https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/503OOP: properties2022-11-15T15:57:51ZAdam KnappOOP: propertiesImplement the @property modifier for variable and template variable class members.Implement the @property modifier for variable and template variable class members.https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/502Document comment lexer/parser error handling2022-11-08T09:06:12ZMiklos MagyariDocument comment lexer/parser error handlingDocument comment lexer/parser should do a better job for error handling.
Example:
If a html tag is used when only an identifier is expected, an antlr error is printed instead of a graceful error handling.
Code to reproduce:
`//* @verd...Document comment lexer/parser should do a better job for error handling.
Example:
If a html tag is used when only an identifier is expected, an antlr error is printed instead of a graceful error handling.
Code to reproduce:
`//* @verdict <b>fail</b>`Miklos MagyariMiklos Magyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/494Titanium searching for port and component instances in the wrong scope2022-07-27T07:26:52ZLevente ErősTitanium searching for port and component instances in the wrong scope## Summary
Component and port references are searched for on module level.
## Steps and/or TTCN-3 code to reproduce
```
module connections {
type integer myint;
type port pt1 message{
inout integer
}with{extension "internal"}
typ...## Summary
Component and port references are searched for on module level.
## Steps and/or TTCN-3 code to reproduce
```
module connections {
type integer myint;
type port pt1 message{
inout integer
}with{extension "internal"}
type port pt2 message{
inout myint
}with{extension "internal"}
type component parent{
port pt1 P1;
port pt2 P2;
}
function receiver() runs on parent{
P2.receive;
}
testcase tc_pt_compatibility() runs on parent{
var parent ptc := parent.create;
connect(mtc:P1, ptc:P2);
ptc.start(receiver());
P1.send(1);
}
}
```
## What is the current bug behavior?
The ptc.start(receiver()); line gets an error saying there is no definition named ptc
P1.send(1); gets an error saying there is no definition named ptc
However, the code compiles and runs.
## What is the expected correct behavior?
Neither of these should be problems as ptc is defined on testcase level, while P1 in the scope of the component that the testcase runs on.
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwtMiklos MagyariMiklos Magyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/493Add breadcrumb support to text editors2022-11-16T14:10:39ZMiklos MagyariAdd breadcrumb support to text editorsIt would be good to add a breadcrumb in the top of our editors. This is how it looks like in the java plugin:
![image](/uploads/9afe36cd5da7ee1647ee48b572a96b26/image.png)
It should be available in all of our editors (ttcn3, ttcnpp, as...It would be good to add a breadcrumb in the top of our editors. This is how it looks like in the java plugin:
![image](/uploads/9afe36cd5da7ee1647ee48b572a96b26/image.png)
It should be available in all of our editors (ttcn3, ttcnpp, asn1, config).
Tasks:
- [ ] breadcrumb should start with the full file path
- [ ] at the end, hierarchy from the file (like functions, classes) should be added dynamically
- [ ] if possible, extra icon markers (like error markers) should be implementedhttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/492JSON float values2022-06-30T10:52:58ZAdam KnappJSON float valuesCopy of titan.core#609
## Summary
JSON decoder can not decode certain float values
## Steps and/or TTCN-3 code to reproduce
Encode a float value, such as `1.23456789e-6`
## What is the current bug behavior?
`While JSON-decoding typ...Copy of titan.core#609
## Summary
JSON decoder can not decode certain float values
## Steps and/or TTCN-3 code to reproduce
Encode a float value, such as `1.23456789e-6`
## What is the current bug behavior?
`While JSON-decoding type ...: Failed to extract valid token, invalid JSON format
Can not decode type ..., because invalid or incomplete message was received`
## What is the expected correct behavior?
Decode the float value properly
## Titan version
8.2.0
## Platform details (OS type and version)
All
/cc @aknappqwtAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/490Add TTCN3 specific search2022-06-23T09:38:04ZMiklos MagyariAdd TTCN3 specific searchThere are a couple of possible search options available in the plugin (even Java search), but there is no TTCN3 specific search.
It would be nice to add a search option that could filter search results according to the TTCN3 language sta...There are a couple of possible search options available in the plugin (even Java search), but there is no TTCN3 specific search.
It would be nice to add a search option that could filter search results according to the TTCN3 language standard, eg. showing hits only for testcases or altsteps etc.https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/487Synchronize OOP code with titan core2023-01-27T13:04:24ZMiklos MagyariSynchronize OOP code with titan coreMiklos MagyariMiklos Magyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/486Uplift OOP support to 1.4.12022-05-11T10:35:32ZMiklos MagyariUplift OOP support to 1.4.1The latest oop standard is now 1.4.1
We should check the changes compared to currently supported 1.3.1 and implement the differences.
https://www.etsi.org/deliver/etsi_es/203700_203799/203790/01.04.01_60/es_203790v010401p.pdfThe latest oop standard is now 1.4.1
We should check the changes compared to currently supported 1.3.1 and implement the differences.
https://www.etsi.org/deliver/etsi_es/203700_203799/203790/01.04.01_60/es_203790v010401p.pdfhttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/485Errors/warnings with an invalid location should be reported to the console2022-05-05T09:24:46ZMiklos MagyariErrors/warnings with an invalid location should be reported to the consoleSometimes errors and warnings are related to objects that has no valid location (an example is an implicit class constructor generated by the compiler).
As these markers are invisible, they can be easily missed, making debugging more dif...Sometimes errors and warnings are related to objects that has no valid location (an example is an implicit class constructor generated by the compiler).
As these markers are invisible, they can be easily missed, making debugging more difficult.
It would be useful to send problems with invalid location to the console so they could be spotted.Miklos MagyariMiklos Magyarihttps://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/483Enable value list notation for setting values of set types2024-02-28T07:11:12ZAdam KnappEnable value list notation for setting values of set typesCopy of titan.core#600
Currently this is explicitly forbidden ("The value list notation for setting values shall not be used for values of set types."), however this behavior was changed in version 4.6.1: "When the value list notation i...Copy of titan.core#600
Currently this is explicitly forbidden ("The value list notation for setting values shall not be used for values of set types."), however this behavior was changed in version 4.6.1: "When the value list notation is used for values of set types, the values are assigned to the fields in the sequential order of the fields in the type definition."https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/482Refactoring class hierarchy of Types (eliminating `ASN1Type`)2022-04-22T14:28:11ZAdam KnappRefactoring class hierarchy of Types (eliminating `ASN1Type`)`ASN1Type` is a technical class to not to implement the `getLikelyLocation()` function in many subclasses that comes from the `IASN1Type` interface. However, as the Java version is uplifted to 1.8, it is possible to have a default implem...`ASN1Type` is a technical class to not to implement the `getLikelyLocation()` function in many subclasses that comes from the `IASN1Type` interface. However, as the Java version is uplifted to 1.8, it is possible to have a default implementation of this function in the interface.https://gitlab.eclipse.org/eclipse/titan/titan.EclipsePlug-ins/-/issues/481Refactoring TTCNPPEditor2022-04-22T14:19:08ZAdam KnappRefactoring TTCNPPEditorThere are a lot of common code in TTCNPPEditor and TTCN3Editor, as well as many features are common, such as code peek, hover, content assist etc.
Therefore it is worth refactoring these code parts to get a smaller and consolidated code ...There are a lot of common code in TTCNPPEditor and TTCN3Editor, as well as many features are common, such as code peek, hover, content assist etc.
Therefore it is worth refactoring these code parts to get a smaller and consolidated code base.