XML DOM: "lax" enums?

In Idea's XML binding framework: Is there any way to specify string attributes that know about common values, but allow any value.
This is an extract of the xsd:
]]>

6 comments

What do you mean by "know"? Doesn't GenericAttributeValue satisfy you? "Stephen Friedrich" ]]> wrote in message
news:22841159.1159262102197.JavaMail.itn@is.intellij.net...

In Idea's XML binding framework: Is there any way to specify string
attributes that know about common values, but allow any value.
This is an extract of the xsd:
> > > > > > > > > > > > > > > > > > > > > value="subprocess-created"/> > > > > > > > ]]>



0

I was hoping for code-completion in attribute value.
Using String is my current workaround.

In general: What is the benefit of using enums/NamedEnums in DOM interfaces?

0

>I was hoping for code-completion in attribute value.

Using String is my current workaround.


Currently I don't see any way. I can suggest to file a request.

In general: What is the benefit of using enums/NamedEnums in DOM
interfaces?

NamedEnum is just a named enum :). It has corresponding method. If your XML
enum variant isn't Java identifier, use it, otherwise these names will just
be equal to your enum constants names.


0

Currently I don't see any way. I can suggest to file a request.

It's not that important.

NamedEnum is just a named enum :). It has corresponding method. If your XML
enum variant isn't Java identifier, use it, otherwise these names will just
be equal to your enum constants names.


I do understand that.
What I don't really understand is what difference it makes in practice wether I use
GenericDomValue getType(); or GenericDomValue]]> getType();

0

The difference is precisely your problem. The values not present in TypeEnum
will be highlighted as incorrect.

"Stephen Friedrich" <no_mail@jetbrains.com> wrote in message
news:8719929.1159266535294.JavaMail.itn@is.intellij.net...
>> Currently I don't see any way. I can suggest to file a request.

It's not that important.

>
>> NamedEnum is just a named enum :). It has corresponding method. If your
>> XML
>> enum variant isn't Java identifier, use it, otherwise these names will
>> just
>> be equal to your enum constants names.
>

I do understand that.
What I don't really understand is what difference it makes in practice
wether I use
GenericDomValue<String> getType();
or
GenericDomValue<TypeEnum> getType();



0

I came across a couple more of these situations, so I filed a Jira request:
http://www.jetbrains.net/jira/browse/IDEA-9542

0

Please sign in to leave a comment.