Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Label Expression :: "Unknown EMF Problem"
Label Expression :: "Unknown EMF Problem" [message #1712258] Thu, 22 October 2015 12:51 Go to next message
Yariv Amar is currently offline Yariv AmarFriend
Messages: 29
Registered: October 2015
Junior Member
I have table with Feature Column that has the following label expression:
aql:if self.oclIsTypeOf(myDsl::SomeType) then self.name endif 


I would like to show the name attribute only when the line is of type SomeType.
The above code works well, the table shows what i wanted.

The problem:
when i click the "Validate Model" on the Sirius Specification Editor, I get an Error:
ErrorExpression my.odesign /my.studio/description Unknown EMF Problem


What can cause it? how do I fix it?

Another problem is that if i change the code to be more readable with new lines (\n), then the editor replace everything after the first new line with "...." and the code is gone (I think it's a bug)!

aql:if self.oclIsTypeOf(myDsl::SomeType) 
      then self.name 
endif 

The above code is replaced with the following (bad) code.
aql:if self.oclIsTypeOf(myDsl::SomeType) ...


I'm using the latest 3.1.0
Re: Label Expression :: "Unknown EMF Problem" [message #1712507 is a reply to message #1712258] Mon, 26 October 2015 08:49 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Hi,

Le 22/10/2015 14:52, Yariv Amar a écrit :
> I have table with Feature Column that has the following label expression:
>
> aql:if self.oclIsTypeOf(myDsl::SomeType) then self.name endif
>
> I would like to show the name attribute only when the line is of type
> SomeType. The above code works well, the table shows what i wanted.
>
> The problem:
> when i click the "Validate Model" on the Sirius Specification Editor, I
> get an Error:
> ErrorExpression my.odesign /my.studio/description Unknown
> EMF Problem
>
>
> What can cause it? how do I fix it?

Are you sure this problem is caused by the expression "aql:if
self.oclIsTypeOf(myDsl::SomeType) then self.name endif"? If you replace
this expression, by a more simple one, do you have always the validation
problem?
>
> Another problem is that if i change the code to be more readable with
> new lines (\n), then the editor replace everything after the first new
> line with "...." and the code is gone (I think it's a bug)!
>
>
> aql:if self.oclIsTypeOf(myDsl::SomeType) then self.name endif
> The above code is replaced with the following (bad) code.
>
> aql:if self.oclIsTypeOf(myDsl::SomeType) ...
>

Could you create a bugzilla [1] for the above "..." case?

>
> I'm using the latest 3.1.0

Best regards,

[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

--
Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Label Expression :: "Unknown EMF Problem" [message #1712923 is a reply to message #1712507] Thu, 29 October 2015 11:56 Go to previous messageGo to next message
Yariv Amar is currently offline Yariv AmarFriend
Messages: 29
Registered: October 2015
Junior Member
hi,

1. for the label expression, I've replaced:
aql:if self.oclIsTypeOf(myDsl::SomeType) then self.name endif

with:
[if self.oclIsTypeOf(myDsl::SomeType) then self.name else '' endif /]

and the validation pass.

2. I've opened a new bug for the "..."
https://bugs.eclipse.org/bugs/show_bug.cgi?id=480981


Regards,
Re: Label Expression :: "Unknown EMF Problem" [message #1712939 is a reply to message #1712923] Thu, 29 October 2015 13:15 Go to previous message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 29/10/2015 12:56, Yariv Amar a écrit :
> hi,
>

Hi,

> 1. for the label expression, I've replaced:
> aql:if self.oclIsTypeOf(myDsl::SomeType) then self.name endif
> with:
> [if self.oclIsTypeOf(myDsl::SomeType) then self.name else '' endif /]
> and the validation pass.
>

I think that the problem is the same as in message #1712830 [1]. You can
add a dependency to your meta-model plugin in your plugin where you
defined the Viewpoint Specification Model and try again.

> 2. I've opened a new bug for the "..."
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=480981

Thanks.

>
>
> Regards,

Regards,

[1]
https://www.eclipse.org/forums/index.php?t=msg&th=1071547&goto=1712830&#msg_1712830

--
Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Superclass created when creating subclass
Next Topic:Eclipse RCP with Sirius
Goto Forum:
  


Current Time: Tue Apr 16 04:56:33 GMT 2024

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

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

Back to the top