Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment property not working in the object model #99

Open
listrate77 opened this issue Feb 5, 2025 · 5 comments
Open

Comment property not working in the object model #99

listrate77 opened this issue Feb 5, 2025 · 5 comments

Comments

@listrate77
Copy link

Hi,
I'm trying to use comment property from bounded context, but they are always empty (I tried on other types and it's the same). It works for doc property, but that is not available on all DSL object types (and it's not in bounded context object).
This is how I defined the BC.

/Comment line1
Comment line 2
/
BoundedContext Test implements TestDomain {
type FEATURE
}

From Freemaker template I get the BC, but the comment property is not working ${bc.comment}

I'm I doing something wrong?

@listrate77
Copy link
Author

listrate77 commented Feb 5, 2025

I see that * "star" char was removed from my comment - I'm using correct notation for multi line comments

@stefan-ka
Copy link
Member

Hi @listrate77

The comment syntax is actually the same as in Java:

// one line comment

/* multi
   line comment */

However, it is unfortunately a known issue that the comments content are not parsed. You have to use the doc property if you want to parse the content. That was actually the reason why we introduced it.

I would be happy if someone could tell me how the comments can be parsed with Xtext :)

Best regards,
Stefan

@listrate77
Copy link
Author

Ok - I like using doc, but it's not available on important objects. I want to generate nice diagrams with documentation and it's important to have the doc property especially on context map and business context.

@stefan-ka
Copy link
Member

Should be possible to add it where needed, I would say. Would you be interested to create a PR?

Best regards,
Stefan

@listrate77
Copy link
Author

listrate77 commented Feb 5, 2025

What do I need to do?

I'm not sure I understand the way it works. I actually want to modify many things :), but I'm rusty with java and the other frameworks used are completely new to me. This one is just about changing ContextMappingDSL.xtext?

Is it possible to make the change and see how it works locally with the Visual Studio extension?
thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants