Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » How to use TITAN TTCN3 Java Compiler from command line?
How to use TITAN TTCN3 Java Compiler from command line? [message #1870431] Wed, 28 August 2024 07:23 Go to next message
Harald Welte is currently offline Harald WelteFriend
Messages: 148
Registered: July 2017
Location: Berlin, Germany
Senior Member

I'm wondering if there's any way to give the new TITAN TTCN3 Java Compiler a try from the command line? The official documentation seems to assume everyone is using the Eclipse IDE. Also, the IPL4 example posted here in the forum assumes that one uses the Eclipse IDE.

I personally do not use any IDEs, find them hugely uncomfortable and am use to edit source code in the terminal using vim. That's what I've been doing for the past ~30 years with any compiler in any programming language I used. Is there any way for such users to give the Java Compiler a try?

Also, given that dependency on an IDE: How would you build CI jobs that clone the git repo, build the code headless in some build server and then start to run it? Opening a GUI application and importing/creating a "project" doesn't really sound like something that can be automatized efficiently?

Thanks in advance for any pointers.
Re: How to use TITAN TTCN3 Java Compiler from command line? [message #1870446 is a reply to message #1870431] Wed, 28 August 2024 11:25 Go to previous messageGo to next message
Adam Knapp is currently offline Adam KnappFriend
Messages: 54
Registered: November 2020
Member
Hi Harald,

The Java compiler is very deeply integrated in the Eclispe IDE and in its framework. It is possible however to call the compiler from the command line using the Eclipse IDE's CLI (but you still need the IDE). If you are interested, I can put together a guideline.

Nevertheless, the Titan team abandoned its development (we still maintain the Eclipse plugins) as the users show very limited interest in them and the majority uses the C/C++ compiler. So we mainly focus on that.
The syntactic and semantic analysis of the TTCN3/ASN1 source codes are extracted in a Java based language server as it is a more flexible and IDE independent solution to provide language support. It has CLI to do static analysis on a project. The compiler and the runtime parts are not included yet, this development is also postponed at the moment, but ultimately the Java code generation would be also a service of the language server.
Re: How to use TITAN TTCN3 Java Compiler from command line? [message #1870458 is a reply to message #1870446] Wed, 28 August 2024 14:20 Go to previous messageGo to next message
Harald Welte is currently offline Harald WelteFriend
Messages: 148
Registered: July 2017
Location: Berlin, Germany
Senior Member

I'm sorry to hear that the development was abandoned. I guess at that point there's no point fo investigating it any further.
We've been successfully using the TITAN C++ compiler for many years at osmocom, and we'll then stick to that.

Originally when you started the Java compiler, I was under the impression that it would be the future and we'd eventually have to migrate over to it as the C++ compiler might get EOL at some point. Seems that was a wrong impression and/or prioritiies have changed.

No need to put together a guide for command-line use, but thanks a lot for offering to write one!
Re: How to use TITAN TTCN3 Java Compiler from command line? [message #1870689 is a reply to message #1870431] Thu, 05 September 2024 10:28 Go to previous messageGo to next message
Miklos Magyari is currently offline Miklos MagyariFriend
Messages: 6
Registered: March 2022
Junior Member
hi Harald,

just a side note.
As Adam mentioned, we have extracted the Java compiler to a language server. The idea was saving the effort that has been put into developing the java compiler. The LS cannot generate code, but at least can be used to support code editing with advanced features as it still can perform the full code analysis (optionally with static code analysis).

Currently we are only testing it with vscode because it is by far the most popular code editor these days. We provide our own vscode extension that can fully utilize this language server (we have even extended the standard LSP protocol with some custom requests and notifications to support specific features like autogenerating ttcn3 standard document comments).

I know it has not so much use for you, but theoretically this server should also work with vim/neovim and provide features like jump to definition or find references etc. If you are interested, I may try to spend some time setting it up and play around with it a bit. Supporting editors other than vscode was always on the todo list, so it would not be a complete waste of time; it was just simply lower priority because of limited resources.
Re: How to use TITAN TTCN3 Java Compiler from command line? [message #1870692 is a reply to message #1870689] Thu, 05 September 2024 11:07 Go to previous message
Harald Welte is currently offline Harald WelteFriend
Messages: 148
Registered: July 2017
Location: Berlin, Germany
Senior Member

Hi Miklos,

thanks for the update. I think for me it's not really worth spending time on testing or preparing some instructions.

I think I once played with the TTCN3 language server nokia had released (https://github.com/nokia/vscode-ttcn3) but beyond playing with it for 15 minutes it never looked very attractive to me. I guess I'm just not really convinced that I need anything beyond 'ctags' to navigate around source code. I'm not saying that all of this has no use - I'm just saying somehow it never felt attractive to me enough to invest a lot of time to getting used to working with it.

If there are other users interested, feel free to bring it up here, so Miklos knows whether to invest some time in it.

Related fun fact: In a private exchange with an unnamed member of a group producing large amounts of TTCN-3 code (ETSI TF160 https://www.3gpp.org/about-us/mobile-competence-centre/mcc-task-forces) it was mentioned to me that allegedly nobody in that ETSI task force was using Eclipse or some IDE to write that ETSI conformance testing TTCN-3 code...
Previous Topic:Overview of TestPort porting status to Java?
Next Topic:Strange XSD.String error
Goto Forum:
  


Current Time: Sun Oct 13 21:07:22 GMT 2024

Powered by FUDForum. Page generated in 0.03909 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top