Examples of EditSchemaInfoDialog


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

      manager.beginNodeAction(this);
 
      // todo... change constructor to take an element
      Element element = getElement(node);
      if (element != null) {
        EditSchemaInfoDialog dialog = new EditSchemaInfoDialog(shell, new Path(resourceLocation));
 
        List namespaceInfoList = namespaceInfoManager.getNamespaceInfoList(element);
        List oldNamespaceInfoList = NamespaceInfo.cloneNamespaceInfoList(namespaceInfoList);
 
        // here we store a copy of the old info for each NamespaceInfo
        // this info will be used in createPrefixMapping() to figure out
        // how to update the document
        // in response to these changes
        for (Iterator i = namespaceInfoList.iterator(); i.hasNext();) {
          NamespaceInfo info = (NamespaceInfo) i.next();
          NamespaceInfo oldCopy = new NamespaceInfo(info);
          info.setProperty("oldCopy", oldCopy); //$NON-NLS-1$
        }
 
        dialog.setNamespaceInfoList(namespaceInfoList);
        dialog.create();
        // dialog.getShell().setSize(500, 300);
        dialog.getShell().setText(XMLUIMessages._UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE);
        dialog.setBlockOnOpen(true);
        dialog.open();
 
        if (dialog.getReturnCode() == Window.OK) {
          List newInfoList = dialog.getNamespaceInfoList();
          namespaceInfoManager.removeNamespaceInfo(element);
          namespaceInfoManager.addNamespaceInfo(element, newInfoList, false);
 
          // see if we need to rename any prefixes
          Map prefixMapping = createPrefixMapping(oldNamespaceInfoList, namespaceInfoList);
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.