use of org.eclipse.wst.xsd.ui.internal.common.commands.SetTypeCommand in project webtools.sourceediting by eclipse.
the class SetTypeAction method run.
public void run() {
Object selection = ((IStructuredSelection) getSelection()).getFirstElement();
if (selection instanceof XSDBaseAdapter) {
Object target = ((XSDBaseAdapter) selection).getTarget();
if (target instanceof XSDConcreteComponent) {
command = new SetTypeCommand(Messages._UI_ACTION_SET_TYPE, getId(), (XSDConcreteComponent) target);
command.setAdapter((XSDBaseAdapter) selection);
getCommandStack().execute(command);
}
}
}
Aggregations