Question

I'm a bit confused about the logic of logic expression in <enablement>s of decorators in Eclipse. I want to enable a decorator for two classes. Should I combine them with <and> (it should work on both classes) or <or> (it should work on either class)?

  <enablement>
    <or>
      <objectClass name="foo">
      </objectClass>
      <objectClass name="bar">
      </objectClass>
    </or>
  </enablement>
Was it helpful?

Solution

The decorator is enabled if the expression is true. So if you want the decorator enabled if the object is of class 'foo' or of class 'bar' then your expression is correct.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top