Package org.eclipse.wst.xml.core.internal.provisional.document

Examples of org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument.createElement()


        Element root  = doc.getDocumentElement();
        Element pages = null;
        NodeList list = doc.getElementsByTagName(ClickPlugin.TAG_PAGES);
       
        if(list.getLength()==0){
          pages = doc.createElement(ClickPlugin.TAG_PAGES);
          boolean inserted = false;
          NodeList children = root.getChildNodes();
          for(int i=0;i<children.getLength();i++){
            Node node = children.item(i);
            if(node instanceof Element){
View Full Code Here


              break;
            }
          }
        }
        if(!found){
          Element page = doc.createElement(ClickPlugin.TAG_PAGE);
          page.setAttribute(ClickPlugin.ATTR_PATH, newPath);
          page.setAttribute(ClickPlugin.ATTR_CLASSNAME, newClazz);
          pages.appendChild(page);
        }
        model.save();
View Full Code Here

    IDOMDocument document = (IDOMDocument) sourceElement.getOwnerDocument();
    IDOMModel model = document.getModel();
    if (model != null) {
      model.beginRecording(this);
      if (interceptor == null) {
        interceptor = (IDOMElement) document.createElement(IntegrationSchemaConstants.ELEM_INTERCEPTORS);
        interceptor.setPrefix(ConfigCoreUtils
            .getPrefixForNamespaceUri(document, IntegrationSchemaConstants.URI));
        sourceElement.appendChild(interceptor);
        processor.insertDefaultAttributes(interceptor);
        formatter.formatNode(interceptor);
View Full Code Here

        processor.insertDefaultAttributes(interceptor);
        formatter.formatNode(interceptor);
        formatter.formatNode(sourceElement);
      }

      IDOMElement wiretap = (IDOMElement) document.createElement(IntegrationSchemaConstants.ELEM_WIRE_TAP);
      wiretap.setPrefix(ConfigCoreUtils.getPrefixForNamespaceUri(document, IntegrationSchemaConstants.URI));
      interceptor.appendChild(wiretap);
      processor.insertDefaultAttributes(wiretap);
      formatter.formatNode(wiretap);
      formatter.formatNode(interceptor);
View Full Code Here

      }
      else {
        namespaceUri = uri;
      }
      IDOMDocument document = getDiagram().getDomDocument();
      input = (IDOMElement) document.createElement(getInputName());
      input.setPrefix(ConfigCoreUtils.getPrefixForNamespaceUri(document, namespaceUri));
      internalSetName();
    }
  }
View Full Code Here

  protected void extendedAddChild(Activity child, int index) {
    IDOMDocument document = (IDOMDocument) getInput().getOwnerDocument();
    IDOMElement childElem = child.getInput();
    if (childElem == null) {
      childElem = (IDOMElement) document.createElement(child.getInputName());
      childElem.setPrefix(ConfigCoreUtils.getPrefixForNamespaceUri(document, getDiagram().getNamespaceUri()));
    }

    IDOMModel model = document.getModel();
    if (model != null) {
View Full Code Here

  public void execute() {
    IDOMDocument document = (IDOMDocument) sourceElement.getOwnerDocument();
    IDOMModel model = document.getModel();
    if (model != null) {
      model.beginRecording(this);
      IDOMElement mapping = (IDOMElement) document.createElement(IntegrationSchemaConstants.ELEM_MAPPING);
      mapping.setPrefix(ConfigCoreUtils.getPrefixForNamespaceUri(document, IntegrationSchemaConstants.URI));
      sourceElement.appendChild(mapping);
      processor.insertDefaultAttributes(mapping);
      formatter.formatNode(mapping);
      formatter.formatNode(sourceElement);
View Full Code Here

  public void execute() {
    IDOMDocument document = (IDOMDocument) sourceElement.getOwnerDocument();
    IDOMModel model = document.getModel();
    if (model != null) {
      model.beginRecording(this);
      IDOMElement recipient = (IDOMElement) document.createElement(IntegrationSchemaConstants.ELEM_RECIPIENT);
      recipient.setPrefix(ConfigCoreUtils.getPrefixForNamespaceUri(document, IntegrationSchemaConstants.URI));
      sourceElement.appendChild(recipient);
      processor.insertDefaultAttributes(recipient);
      formatter.formatNode(recipient);
      formatter.formatNode(sourceElement);
View Full Code Here

  @Override
  protected void createNewElement() {
    if (parentElement != null) {
      IDOMDocument document = (IDOMDocument) parentElement.getOwnerDocument();
      IDOMElement childElement = (IDOMElement) document.createElement(inputName);
      IDOMModel model = document.getModel();
      if (model != null) {
        model.beginRecording(this);
        parentElement.appendChild(childElement);
        processor.insertDefaultAttributes(childElement);
View Full Code Here

      IDOMDocument doc = getConfigEditor().getDomDocument();
      doc.getModel().beginRecording(textView);

      if (rootElement == null) {
        // Create a beans element and add the default namespace
        rootElement = doc.createElement(BeansSchemaConstants.ELEM_BEANS);
        doc.appendChild(rootElement);

        INamespaceDefinition defNamespace = NamespaceUtils.getDefaultNamespaceDefinition();
        if (defNamespace != null) {
          if (!xsdViewer.getChecked(defNamespace)) {
View Full Code Here

TOP
Copyright © 2015 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.