}
}
public boolean canMoveBinding(IBindingInfo ibinding, int targetIndex, boolean upDown) {
if (ibinding instanceof FieldBindingInfo) {
FieldBindingInfo binding = (FieldBindingInfo) ibinding;
if (binding.getParentBinding() == null) {
BindingInfo target = m_bindings.get(targetIndex);
if (target instanceof FieldBindingInfo) {
FieldBindingInfo fieldTarget = (FieldBindingInfo) target;
return fieldTarget.getParentBinding() == null;
}
} else {
if (binding.isAutobind()) {
return false;
}
BindingInfo target = m_bindings.get(targetIndex);
if (target instanceof FieldBindingInfo) {
FieldBindingInfo fieldTarget = (FieldBindingInfo) target;
return binding.getParentBinding() == fieldTarget.getParentBinding()
&& !fieldTarget.isAutobind();
}
return false;
}
}
return true;