NPE in OCLSyntaxHelper getPropertyChoices [message #34425] |
Fri, 27 July 2007 17:01 |
Eclipse User |
|
|
|
Originally posted by: eric.atportunity.com
Hi,
I got a NullPointerException in the method
OCLSyntaxHelper.getPropertyChoices() while asking for completion proposals
My context is a UML Class with a property on which the type is still not
set. When I set the type of the property it works fine, but I think it may
not result in a NPE when the type of the property is null.
Kind regards,
Eric Kop
|
|
|
Re: NPE in OCLSyntaxHelper getPropertyChoices [message #34493 is a reply to message #34425] |
Fri, 27 July 2007 17:31 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Eric,
Yes, that sounds like a bug. The OCLSyntaxHelper shouldn't even attempt to
propose a property that doesn't have a type, as that should be interpreted
as the OclVoid type, which is not a useful property type.
Please raise a bug if you want this to be fixed :-)
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& version=1.1.0&component=OCL
Thanks,
Christian
Eric Kop wrote:
> Hi,
>
> I got a NullPointerException in the method
> OCLSyntaxHelper.getPropertyChoices() while asking for completion proposals
>
> My context is a UML Class with a property on which the type is still not
> set. When I set the type of the property it works fine, but I think it may
> not result in a NPE when the type of the property is null.
>
> Kind regards,
> Eric Kop
|
|
|
|
Re: NPE in OCLSyntaxHelper getPropertyChoices [message #34593 is a reply to message #34559] |
Fri, 27 July 2007 19:09 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, François,
You're right! I thought I had seen this problem raised before, but I didn't
find it. Don't know how I missed that bug ...
I think perhaps it would make sense to convert bug 195474 to an enhancement,
to display the property with some kind of indication that it has to type.
And, in the mean-time, use
https://bugs.eclipse.org/bugs/show_bug.cgi?id=198141 to hide the offending
property from the completion proposals.
Or, perhaps, the problem can be fully resolved without resorting to adding
new translatable strings by simply substituting OclVoid for the missing
type.
What do you think?
Cheers,
Christian
François Lagarde wrote:
> In the last post, on 07/27 about 07h, "Christian" (Christian W Damus)
> wrote:
>
> Christian> Please raise a bug if you want this to be fixed :-)
>
> is it not the same as this one:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=195474
>
|
|
|
Re: NPE in OCLSyntaxHelper getPropertyChoices [message #34760 is a reply to message #34593] |
Tue, 31 July 2007 13:59 |
Eclipse User |
|
|
|
Originally posted by: firstname.name.gmail.com
In the last post, on 07/27 about 09h, "Christian" (Christian W Damus) wrote:
Christian> Or, perhaps, the problem can be fully resolved [...] by simply
Christian> substituting OclVoid for the missing type.
hello,
it makes sens and it is certainly the "easier" solution. I am just wondering if
OclInvalid could be more adapted to be jointly used with oclIsUndefined.
--
F. Lagarde
|
|
|
Re: NPE in OCLSyntaxHelper getPropertyChoices [message #34826 is a reply to message #34760] |
Tue, 31 July 2007 16:48 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, François,
I'm not sure I understand what you mean by using OclInvalid with
oclIsUndefined(). The oclIsUndefined() operation returns "true" for the
OclInvalid value as well as for null; both are considered undefined.
Cheers,
Christian
François Lagarde wrote:
> In the last post, on 07/27 about 09h, "Christian" (Christian W Damus)
> wrote:
>
> Christian> Or, perhaps, the problem can be fully resolved [...] by
> simply Christian> substituting OclVoid for the missing type.
> hello,
>
> it makes sens and it is certainly the "easier" solution. I am just
> wondering if OclInvalid could be more adapted to be jointly used with
> oclIsUndefined.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04016 seconds