ModelQuery "todo" - always returns true on canInsert [message #185428] |
Wed, 27 December 2006 22:11  |
Eclipse User |
|
|
|
Originally posted by: eric.services.ideoform.org
I just went to test if some elements could be validly inserted according
to a DTD and it kept returning true. It turns out this is the reason why:
public boolean canInsert(Element parent, List cmNodeList, int index,
int validityChecking)
{
// todo
return true;
}
It would be nice if at least an exception was thrown. Though I'm not
sure this is 'todo' because it could at least be implemented with the
single element version and a for-loop.
|
|
|
|
Re: ModelQuery "todo" - always returns true on canInsert [message #185470 is a reply to message #185434] |
Fri, 29 December 2006 21:13   |
Eclipse User |
|
|
|
On Wed, 27 Dec 2006 22:18:43 -0500, Eric Woodruff
<eric.services@ideoform.org> wrote:
>>
>> It would be nice if at least an exception was thrown. Though I'm not
>> sure this is 'todo' because it could at least be implemented with ...
>>
Feel free to open an enhancement request. I suspect it's "todo" only
since we, apparently, never found a need for it in WTP per se.
I suspect you could provide a proposed patch ... some form of
"getValidator().canInsert(...)" would seem to be the right approach,
if that works for you. Within the approriate switch statements, type
checks etc., similar to the implemented 'canInsert' method.
Some unit tests would help promote is adoption.
BTW, it's unlikely this would become official API in the 2.0 timeframe,
but ... the more requests, the higher the priority, even if for the next
version.
|
|
|
Re: ModelQuery "todo" - always returns true on canInsert [message #185487 is a reply to message #185470] |
Fri, 29 December 2006 23:18  |
Eclipse User |
|
|
|
Originally posted by: eric.services.ideoform.org
In the meantime, shouldn't the method be deleted? I can't imagine anyone
is depending on a completely unimplemented function. Or an
IllegalStateException should be thrown at a minimum.
David Williams wrote:
> On Wed, 27 Dec 2006 22:18:43 -0500, Eric Woodruff
> <eric.services@ideoform.org> wrote:
>
>
>>>
>>> It would be nice if at least an exception was thrown. Though I'm not
>>> sure this is 'todo' because it could at least be implemented with ...
>>>
>
> Feel free to open an enhancement request. I suspect it's "todo" only
> since we, apparently, never found a need for it in WTP per se.
>
> I suspect you could provide a proposed patch ... some form of
> "getValidator().canInsert(...)" would seem to be the right approach,
> if that works for you. Within the approriate switch statements, type
> checks etc., similar to the implemented 'canInsert' method.
> Some unit tests would help promote is adoption.
>
> BTW, it's unlikely this would become official API in the 2.0 timeframe,
> but ... the more requests, the higher the priority, even if for the next
> version.
>
|
|
|
Powered by
FUDForum. Page generated in 0.20888 seconds