Search in sources :

Example 11 with DocumentImpl

use of org.eclipse.wst.xml.core.internal.document.DocumentImpl in project webtools.sourceediting by eclipse.

the class MakeAnonymousTypeGlobalAction method run.

public void run() {
    if (fSelectedComponent == null) {
        return;
    }
    if (fSelectedComponent.getSchema() == null) {
        getSchema().updateElement(true);
    }
    DocumentImpl doc = (DocumentImpl) fSelectedComponent.getElement().getOwnerDocument();
    doc.getModel().beginRecording(this, RefactoringWizardMessages.MakeAnonymousTypeGlobalAction_text);
    MakeAnonymousTypeGlobalCommand command = new MakeAnonymousTypeGlobalCommand(fSelectedComponent, getNewDefaultName());
    command.run();
    doc.getModel().endRecording(this);
}
Also used : MakeAnonymousTypeGlobalCommand(org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeAnonymousTypeGlobalCommand) DocumentImpl(org.eclipse.wst.xml.core.internal.document.DocumentImpl)

Aggregations

DocumentImpl (org.eclipse.wst.xml.core.internal.document.DocumentImpl)11 Element (org.w3c.dom.Element)3 Iterator (java.util.Iterator)2 List (java.util.List)2 NamespaceInfo (org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo)2 TargetNamespaceChangeHandler (org.eclipse.wst.xsd.ui.internal.nsedit.TargetNamespaceChangeHandler)2 MakeAnonymousTypeGlobalCommand (org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeAnonymousTypeGlobalCommand)2 MakeLocalElementGlobalCommand (org.eclipse.wst.xsd.ui.internal.refactor.structure.MakeLocalElementGlobalCommand)2 NodeList (org.w3c.dom.NodeList)2 Hashtable (java.util.Hashtable)1 Map (java.util.Map)1 Path (org.eclipse.core.runtime.Path)1 StyleRange (org.eclipse.swt.custom.StyleRange)1 Color (org.eclipse.swt.graphics.Color)1 Shell (org.eclipse.swt.widgets.Shell)1 DOMNamespaceInfoManager (org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceInfoManager)1 IDOMDocument (org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument)1 IDOMDocumentType (org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocumentType)1 IDOMModel (org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel)1 UpdateNamespaceInformationCommand (org.eclipse.wst.xsd.ui.internal.common.commands.UpdateNamespaceInformationCommand)1