public void execute() {
if (_viewer.isInRangeMode()) {
ISelection selection = _viewer.getSelection();
if (selection instanceof DesignRange) {
DesignPosition posStart = ((DesignRange) selection)
.getStartPosition();
DesignPosition posEnd = ((DesignRange) selection)
.getEndPosition();
if (EditValidateUtil.validPosition(posStart)
&& EditValidateUtil.validPosition(posEnd)) {
Node ancestor = EditModelQuery.getInstance()
.getCommonAncestor(posStart.getContainerNode(),
posEnd.getContainerNode());
if (ancestor instanceof Text) {
ancestor = ancestor.getParentNode();
}
if (ancestor instanceof Element) {
EditPart part = Target.resolvePart(ancestor);