Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » NPE in OCLSyntaxHelper getPropertyChoices
NPE in OCLSyntaxHelper getPropertyChoices [message #34425] Fri, 27 July 2007 17:01 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #34559 is a reply to message #34493] Fri, 27 July 2007 18:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: firstname.name.gmail.com

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

--
F. Lagarde
Re: NPE in OCLSyntaxHelper getPropertyChoices [message #34593 is a reply to message #34559] Fri, 27 July 2007 19:09 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:[Announce] OCL Tools component proposal
Next Topic:handling setters.
Goto Forum:
  


Current Time: Fri Apr 19 19:30:53 GMT 2024

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

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

Back to the top