[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[wtp-dev] XML editor Content Assist set to unconstrained?
|
I'm using the latest WST plugins built from HEAD, and am trying to find
out why the content assist makes many more suggestions than might be
expected, e.g. for a content model with a sequence (A?, B?, C?), the
content assist will always suggest A, B and C regardless of the existing
content (e.g. B and C may already be present).
This turns out to be partly because AbstractContentAssistProcessor:1593
(in o.e.wst.xml.ui.internal.contentassist) hardcodes the value
ModelQuery.EDIT_MODE_UNCONSTRAINED in all calls to getInsertActions,
which returns actions for the legal completions, and is perfectly
capable of filtering out suggestions for existing content - with the
exception mentioned below :)
Setting the value to EDIT_MODE_CONSTRAINED_STRICT is better, but runs
into another issue. The text used for starting the completion ('<') is
erroneously considered #PCDATA, and so all suggestions are evaluated as
invalid by the schema validator used to sieve away illegal suggestions
(this happens in DOMValidator.createContentSpecification:144, in
xml.core.internal.contentmodel.internal.util).
Is someone working on this? Because of the recent package moves I'm
unable to see the Resource History on any of these files, so I can't
really tell. If not, I'll open a bug and attach a patch, if necessary.
Kind regards,
-- Steen
Steen Lehmann
Software Engineer Consultant
Novell Identity Applications Group