Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [HUTN] Null value on a reference
[HUTN] Null value on a reference [message #409] Mon, 13 October 2008 13:31 Go to next message
Pau Giner is currently offline Pau GinerFriend
Messages: 18
Registered: July 2009
Junior Member
Hello,

is there any way of indicating in HUTN that a reference is empty?

I tried unsuccessfully different options ( null, OclUndefined, none,
nil, etc.) being null the one that provides a non-standard error
message. With null I get the following error (trying to assign the
useCase attribute of a UML Class to null):

org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
'values' not found in object
org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line: 0,
col: 0] [feature: useCase] (262:21)


Thanks.


--
Pau Giner Blasco
Centro de Investigación en Métodos de Producción de Software
Universidad Politécnica de Valencia
Camí de Vera, s/n 46022 Valencia
Office 2L04. Building 1F
e-mail: pginer@pros.upv.es
web: http://www.dsic.upv.es/~pginer/
Re: [HUTN] Null value on a reference [message #415 is a reply to message #409] Mon, 13 October 2008 13:37 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Pau,

useCase is a multi-valued feature (collection). Why would you need to
set it to null? If you don't specify a value for it at all in HUTN, it
should be left empty by default.

Cheers,
Dimitrios

Pau Giner wrote:
> Hello,
>
> is there any way of indicating in HUTN that a reference is empty?
>
> I tried unsuccessfully different options ( null, OclUndefined, none,
> nil, etc.) being null the one that provides a non-standard error
> message. With null I get the following error (trying to assign the
> useCase attribute of a UML Class to null):
>
> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
> 'values' not found in object
> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line: 0,
> col: 0] [feature: useCase] (262:21)
>
>
> Thanks.
>
>
Re: [HUTN] Null value on a reference [message #420 is a reply to message #415] Mon, 13 October 2008 13:46 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Pau,

As Dimitrios mentions, the following HUTN will produce a model
containing a single class whose useCase feature is empty:

@Spec {
metamodel "UML" {
nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
}
}

UML {
Class {
}
}

(If you receive an error about required features not being specified,
please run HUTN from source, as described here:
http://www.eclipse.org/gmt/epsilon/doc/EpsilonSVN.pdf)

Cheers,
Louis.

Dimitrios Kolovos wrote:
> Hi Pau,
>
> useCase is a multi-valued feature (collection). Why would you need to
> set it to null? If you don't specify a value for it at all in HUTN, it
> should be left empty by default.
>
> Cheers,
> Dimitrios
>
> Pau Giner wrote:
>> Hello,
>>
>> is there any way of indicating in HUTN that a reference is empty?
>>
>> I tried unsuccessfully different options ( null, OclUndefined, none,
>> nil, etc.) being null the one that provides a non-standard error
>> message. With null I get the following error (trying to assign the
>> useCase attribute of a UML Class to null):
>>
>> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
>> 'values' not found in object
>> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line:
>> 0, col: 0] [feature: useCase] (262:21)
>>
>>
>> Thanks.
>>
>>
Re: [HUTN] Null value on a reference [message #870 is a reply to message #415] Mon, 13 October 2008 15:43 Go to previous message
Pau Giner is currently offline Pau GinerFriend
Messages: 18
Registered: July 2009
Junior Member
Ok, the problem was more a conceptual issue (stating something
explicitly), than a practical problem. In this case I can always write
it as a comment and obtain the same effect ;-)




Dimitrios Kolovos escribió:
> Hi Pau,
>
> useCase is a multi-valued feature (collection). Why would you need to
> set it to null? If you don't specify a value for it at all in HUTN, it
> should be left empty by default.
>
> Cheers,
> Dimitrios
>
> Pau Giner wrote:
>> Hello,
>>
>> is there any way of indicating in HUTN that a reference is empty?
>>
>> I tried unsuccessfully different options ( null, OclUndefined, none,
>> nil, etc.) being null the one that provides a non-standard error
>> message. With null I get the following error (trying to assign the
>> useCase attribute of a UML Class to null):
>>
>> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
>> 'values' not found in object
>> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line:
>> 0, col: 0] [feature: useCase] (262:21)
>>
>>
>> Thanks.
>>
>>


--
Pau Giner Blasco
Centro de Investigación en Métodos de Producción de Software
Universidad Politécnica de Valencia
Camí de Vera, s/n 46022 Valencia
Office 2L04. Building 1F
e-mail: pginer@pros.upv.es
web: http://www.dsic.upv.es/~pginer/
Re: [HUTN] Null value on a reference [message #560965 is a reply to message #409] Mon, 13 October 2008 13:37 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Pau,

useCase is a multi-valued feature (collection). Why would you need to
set it to null? If you don't specify a value for it at all in HUTN, it
should be left empty by default.

Cheers,
Dimitrios

Pau Giner wrote:
> Hello,
>
> is there any way of indicating in HUTN that a reference is empty?
>
> I tried unsuccessfully different options ( null, OclUndefined, none,
> nil, etc.) being null the one that provides a non-standard error
> message. With null I get the following error (trying to assign the
> useCase attribute of a UML Class to null):
>
> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
> 'values' not found in object
> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line: 0,
> col: 0] [feature: useCase] (262:21)
>
>
> Thanks.
>
>
Re: [HUTN] Null value on a reference [message #560978 is a reply to message #415] Mon, 13 October 2008 13:46 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Pau,

As Dimitrios mentions, the following HUTN will produce a model
containing a single class whose useCase feature is empty:

@Spec {
metamodel "UML" {
nsUri: "http://www.eclipse.org/uml2/2.1.0/UML"
}
}

UML {
Class {
}
}

(If you receive an error about required features not being specified,
please run HUTN from source, as described here:
http://www.eclipse.org/gmt/epsilon/doc/EpsilonSVN.pdf)

Cheers,
Louis.

Dimitrios Kolovos wrote:
> Hi Pau,
>
> useCase is a multi-valued feature (collection). Why would you need to
> set it to null? If you don't specify a value for it at all in HUTN, it
> should be left empty by default.
>
> Cheers,
> Dimitrios
>
> Pau Giner wrote:
>> Hello,
>>
>> is there any way of indicating in HUTN that a reference is empty?
>>
>> I tried unsuccessfully different options ( null, OclUndefined, none,
>> nil, etc.) being null the one that provides a non-standard error
>> message. With null I get the following error (trying to assign the
>> useCase attribute of a UML Class to null):
>>
>> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
>> 'values' not found in object
>> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line:
>> 0, col: 0] [feature: useCase] (262:21)
>>
>>
>> Thanks.
>>
>>
Re: [HUTN] Null value on a reference [message #561014 is a reply to message #415] Mon, 13 October 2008 15:43 Go to previous message
Pau Giner is currently offline Pau GinerFriend
Messages: 18
Registered: July 2009
Junior Member
Ok, the problem was more a conceptual issue (stating something
explicitly), than a practical problem. In this case I can always write
it as a comment and obtain the same effect ;-)




Dimitrios Kolovos escribió:
> Hi Pau,
>
> useCase is a multi-valued feature (collection). Why would you need to
> set it to null? If you don't specify a value for it at all in HUTN, it
> should be left empty by default.
>
> Cheers,
> Dimitrios
>
> Pau Giner wrote:
>> Hello,
>>
>> is there any way of indicating in HUTN that a reference is empty?
>>
>> I tried unsuccessfully different options ( null, OclUndefined, none,
>> nil, etc.) being null the one that provides a non-standard error
>> message. With null I get the following error (trying to assign the
>> useCase attribute of a UML Class to null):
>>
>> org.eclipse.epsilon.hutn.exceptions.HutnTranslationException : Property
>> 'values' not found in object
>> org.eclipse.epsilon.hutn.model.hutn.impl.NullSlotImpl@1f36902 [line:
>> 0, col: 0] [feature: useCase] (262:21)
>>
>>
>> Thanks.
>>
>>


--
Pau Giner Blasco
Centro de Investigación en Métodos de Producción de Software
Universidad Politécnica de Valencia
Camí de Vera, s/n 46022 Valencia
Office 2L04. Building 1F
e-mail: pginer@pros.upv.es
web: http://www.dsic.upv.es/~pginer/
Previous Topic:[HUTN] Null value on a reference
Next Topic:[Epsilon] Default values in HUTN
Goto Forum:
  


Current Time: Thu Apr 25 08:55:42 GMT 2024

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

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

Back to the top