Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [papyrus-rt-dev] Textual syntax for UML-RT merged into master

Hi,

On 11 December 2015 at 16:49, Ernesto Posse <eposse@xxxxxxxxxxxxx> wrote:

Since Xtext generates the appropriate tooling (outline, formatting, code-assist), then that may work for combined languages. Of course, it is unlikely to be as mature as the JDT or the CDT, but I don't know if it is at all possible to somehow "invoke" the JDT or CDT formatting, code-assist and other capabilities. for specific sections of the same source file inside the same editor. I'll look into it. My guess is that such "mixed" editor is not possible, so we could only have limited support for other languages within the same editor, and if the user really wants the full support of JDT or CDT, then he could write such action code in separate file(s) and the .umlrt file will have references to those files.

The idea of combining the capabilities and support for the core language and an action language within the same editor is very ambitious and it would be incredible, but I think that should be a bit of a longer term goal. Even Papyrus doesn't provide any language aware support in the OpaqueBehaviour editor. 

​No, Papyrus, does not support it. But we definitively should have this in Papyrus-RT and the integration with CDT into the "code snippet view" that I have proposed a work item for (not made into a Bugzilla yet). This also ties in to the default language framework to ensure that the tooling hides the details of having to assing the language manually to each and every OpaqueBehavior/OpaqueExpression that the user (implicitly) creates. The legacy tooling have such a code editor view and default language handling, and we need to be on par with that.
 

I agree that formatting and completion support for action languages are highly desirable. However, I would argue that if an action's code is sufficiently long and complex, it would be better to put it into a separate file and the action in the model would refer to that external file. I have actually done this, with PapyrusRT and with another tool I used a while ago. Putting complex action code in separate files improves readability and navigability. If we promote that approach, then the need for complex formatting and code-completion within the same editor is greatly reduced, as we delegate that task to the appropriate editor in CDT or JDT.

​Sure, you can handle it by having that in separate files. But I just have a feeling that we also need to have good support editing code snippets "inline" also, but possibly using some separate "view" or "floating window". Maybe the proposed code snippet view (as I mentioned above) used for editing code snippets in the graphical notation, also could be used for editing the code snippets in the textual notation. 

​/Peter Cigéhn​

Back to the top