Search in sources :

Example 1 with MakeLocalElementGlobalCommand

use of org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand in project webtools.sourceediting by eclipse.

the class MakeLocalElementGlobalAction method run.

public void run() {
    DocumentImpl doc = (DocumentImpl) fSelectedComponent.getElement().getOwnerDocument();
    doc.getModel().beginRecording(this, getText());
    MakeLocalElementGlobalCommand command = new MakeLocalElementGlobalCommand(fSelectedComponent);
    command.run();
    doc.getModel().endRecording(this);
}
Also used : MakeLocalElementGlobalCommand(org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand) DocumentImpl(org.eclipse.wst.xml.core.internal.document.DocumentImpl)

Example 2 with MakeLocalElementGlobalCommand

use of org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand in project webtools.sourceediting by eclipse.

the class MakeLocalElementGlobalHandler method run.

public void run(ISelection selection, XSDElementDeclaration selectedComponent) {
    DocumentImpl doc = (DocumentImpl) selectedComponent.getElement().getOwnerDocument();
    doc.getModel().beginRecording(this, "MakeLocalElementGlobalHandler.text");
    MakeLocalElementGlobalCommand command = new MakeLocalElementGlobalCommand(selectedComponent);
    command.run();
    doc.getModel().endRecording(this);
}
Also used : MakeLocalElementGlobalCommand(org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand) DocumentImpl(org.eclipse.wst.xml.core.internal.document.DocumentImpl)

Aggregations

DocumentImpl (org.eclipse.wst.xml.core.internal.document.DocumentImpl)2 MakeLocalElementGlobalCommand (org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand)2