You need to use a with
element to specify that the selection should be used:
<definition
id="xxx.abc.project.addchilddefinition">
<with
variable="org.eclipse.ui.selection">
<iterate
ifEmpty="false"
operator="or">
<instanceof
value="xxx.abc.project.model.ObjectName">
</instanceof>
</iterate>
</with>
You must also call the ESelectionService
setSelection(Object)
method when the tree selection changes.
The selection variable org.eclipse.ui.selection
is defined in IServiceConstants.ACTIVE_SELECTION