Package org.eclipse.wst.xml.ui.internal.dialogs

Examples of org.eclipse.wst.xml.ui.internal.dialogs.EditAttributeDialog


  public void run() {
    Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
    if (validateEdit(manager.getModel(), shell)) {
      manager.beginNodeAction(this);
      EditAttributeDialog dialog = new EditAttributeDialog(shell, ownerElement, attr);
      dialog.create();
      dialog.getShell().setText(title);
      dialog.setBlockOnOpen(true);
      dialog.open();
 
      if (dialog.getReturnCode() == Window.OK) {
        if (attr != null) {
          ownerElement.removeAttributeNode(attr);
        }
        Document document = ownerElement.getOwnerDocument();
        Attr newAttribute = document.createAttribute(dialog.getAttributeName());
        newAttribute.setValue(dialog.getAttributeValue());
        ownerElement.setAttributeNode(newAttribute);
        manager.setViewerSelection(newAttribute);
      }
      manager.endNodeAction(this);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.ui.internal.dialogs.EditAttributeDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.