Examples of EditDoctypeDialog


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

    Shell shell = getDisplay().getActiveShell();
    if (validateEdit(model, shell)) {
      model.beginRecording(this, getUndoDescription());
      // Shell shell =
      // XMLCommonUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
      EditDoctypeDialog dialog = showEditDoctypeDialog(shell);
 
      if (dialog.getReturnCode() == Window.OK) {
        if (doctype != null) {
          updateDoctype(dialog, doctype);
        }
        else if (document != null) {
          DocumentType doctype = createDoctype(dialog, document);
View Full Code Here

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

      model.endRecording(this);
    }
  }

  protected EditDoctypeDialog showEditDoctypeDialog(Shell shell) {
    EditDoctypeDialog dialog = null;

    if (doctype != null) {
      dialog = new EditDoctypeDialog(shell, doctype);
      if (title == null) {
        title = XMLUIMessages._UI_LABEL_EDIT_DOCTYPE;
      }
    }
    else if (document != null) {
      String rootElementName = getRootElementName(document);
      dialog = new EditDoctypeDialog(shell, rootElementName, "", rootElementName + ".dtd"); //$NON-NLS-1$ //$NON-NLS-2$
      if (title == null) {
        title = XMLUIMessages._UI_MENU_ADD_DTD_INFORMATION_TITLE;
      }
    }

    dialog.setComputeSystemId((doctype == null) || (doctype.getSystemId() == null) || (doctype.getSystemId().trim().length() == 0));

    dialog.setErrorChecking(false);// !model.getType().equals(IStructuredModel.HTML));
    dialog.create();
    dialog.getShell().setText(title);
    dialog.setBlockOnOpen(true);
    dialog.setResourceLocation(new Path(resourceLocation));
    dialog.open();

    return dialog;
  }
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.