private Command getSetWidgetCommand(CompositeWidget newWidget) {
   if (section.getWidget() == null)
     return SetCommand.create(
         editingDomain,
         section,
         section.eClass().getEStructuralFeature("widget"),
         newWidget); //$NON-NLS-1$
   else return UnexecutableCommand.INSTANCE;
 }
  private Command getCreateResourceCommand(CompositeWidget newWidget) {
    URI widgetURI;
    if (section.getSectionFile() == null || section.getSectionFile().equals("")) { // $NON-NLS-1$
      section.setSectionFile(section.getName() + ".xwt"); // $NON-NLS-1$
    }

    widgetURI = URI.createURI(section.getSectionFile());
    widgetURI = widgetURI.resolve(section.eResource().getURI());
    Command createWidget =
        new CreateResourceCommand(newWidget, widgetURI, section.eResource().getResourceSet());

    return createWidget;
  }