Examples of EditProcessingInstructionDialog


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

    Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
    if (validateEdit(manager.getModel(), shell)) {
      manager.beginNodeAction(this);
     
 
      EditProcessingInstructionDialog dialog = null;
      if (pi != null) {
        dialog = new EditProcessingInstructionDialog(shell, pi);
      }
      else {
        dialog = new EditProcessingInstructionDialog(shell, XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE);
      }
 
      dialog.create();
      dialog.getShell().setText(title);
      dialog.setBlockOnOpen(true);
      dialog.open();
 
      if (dialog.getReturnCode() == Window.OK) {
        if (pi != null) {
          childRef = pi;
        }
 
        Document document = parent.getNodeType() == Node.DOCUMENT_NODE ? (Document) parent : parent.getOwnerDocument();
        Node newNode = document.createProcessingInstruction(dialog.getTarget(), dialog.getData());
        parent.insertBefore(newNode, childRef);
 
        if (pi != null) {
          parent.removeChild(pi);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.