Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » [Designer] Generate C++ code in headless mode
[Designer] Generate C++ code in headless mode [message #1841022] Fri, 30 April 2021 15:45 Go to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 235
Registered: November 2017
Senior Member
Hi,

I would know if there is a way to generate C++ code using Papyrus Software Designer in headless mode (without Eclipse UI). If yes, what would be a typical command line to achieve that?

Regards.
Yoann.
Re: [Designer] Generate C++ code in headless mode [message #1841026 is a reply to message #1841022] Fri, 30 April 2021 18:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In principle it's just Java code so of course you can do it, just use a debugger to see where the good code starts and invoke the same code yourself.

But, I recall that to get EMF to GenModel standalone, I had to override a method that assumed a running platform. This has now been fixed. Subsequently I had to get JDT to revert a regression that again imposed an unjustified running platform assumption.

So yes, you can almost certainly do it, but may have to work hard and contribute back your solutions to the developers.

Or .. someone who's already done it can just yell you how.

Regards

Ed Willink
Re: [Designer] Generate C++ code in headless mode [message #1841288 is a reply to message #1841026] Tue, 11 May 2021 07:58 Go to previous messageGo to next message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 235
Registered: November 2017
Senior Member
Hi Ed,

Thanks for your reply and advice.

I already managed to generate code by calling Java code into the Eclipse application. I have to watch in detail how to avoid the UI prompts during the creation of the code project. What I would do initially was to call a command line from a terminal similarly to what can be done to create or build a project in headless mode but it is probably not available today.

Example of command line to build a project :
/eclipse -nosplash -data /app/ws -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import $PROJECT_NAME -build $PROJECT_NAME


I'll try the Java way.

Regards.
Yoann.
Re: [Designer] Generate C++ code in headless mode [message #1841298 is a reply to message #1841288] Tue, 11 May 2021 12:45 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Hi Yoann,

while the generator tests are not running in headless mode, they also face the problem that they need to avoid the UI dialog for project creation. The workaround currently in place in the test code is to create the projects in advance (see plugin oep.designer.transformation.languages.cpp.tests). The created project is not a specific CDT project though, as this was not relevant for the test.

HTH

Ansgar
Re: [Designer] Generate C++ code in headless mode [message #1841594 is a reply to message #1841298] Fri, 21 May 2021 11:50 Go to previous message
Yoann Farré is currently offline Yoann FarréFriend
Messages: 235
Registered: November 2017
Senior Member
Hi Ansgar,

Probably a good track to follow. Thank you for the tip.
Yoann.
Previous Topic:Problem with Papyrus 20-12 and Sysml 16.
Next Topic:weird Interface
Goto Forum:
  


Current Time: Fri Apr 26 20:28:45 GMT 2024

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

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

Back to the top