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

Examples of org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement


  }

  @Override
  public void run() {
    super.run();
    IDOMElement selection = getElementFromTreeItem(getSelectedTreeItem());
    IDOMElement nextSib = getElementFromTreeItem(getNextTreeItem());
    if (textView != null && selection != null) {
      IDOMModel model = selection.getModel();
      Node parent = selection.getParentNode();
      if (model != null && nextSib != null && parent != null) {
        model.beginRecording(textView);
        parent.insertBefore(nextSib, selection);
        formatter.formatNode(nextSib);
        formatter.formatNode(nextSib.getParentNode());
        model.endRecording(textView);
      }
    }
  }
View Full Code Here


              if (shell != null && !shell.isDisposed()) {
                WizardDialog dialog = new WizardDialog(shell, wizard);
                dialog.create();
                dialog.setBlockOnOpen(true);
                if (dialog.open() == Window.OK) {
                  IDOMElement element = wizard.getNewElement();
                  getMasterPart().getViewer().setSelection(new StructuredSelection(element));
                }
              }
            }
            catch (CoreException e1) {
View Full Code Here

  public abstract AbstractConfigDetailsPart getDetailsPage(Object key);

  @Override
  public AbstractConfigDetailsPart getPage(Object key) {
    if (key instanceof IDOMElement) {
      IDOMElement element = (IDOMElement) key;
      if (getFormPage().getNamespaceUri().equals(element.getNamespaceURI())) {
        return getDetailsPage(element);
      }
      for (final IConfigurationElement config : getFormPage().getAdapterDefinitions()) {
        String uri = config.getAttribute(PageAdaptersExtensionPointConstants.ATTR_NAMESPACE_URI);
        if (uri.equals(element.getNamespaceURI())) {
          if (config.getAttribute(PageAdaptersExtensionPointConstants.ATTR_DETAILS_FACTORY) == null) {
            return new AbstractNamespaceDetailsPart(getMasterPart());
          }
          else {
            try {
View Full Code Here

  }

  @Override
  public void run() {
    super.run();
    IDOMElement selection = getElementFromTreeItem(getSelectedTreeItem());
    IDOMElement prevSib = getElementFromTreeItem(getPreviousTreeItem());
    if (textView != null && selection != null) {
      IDOMModel model = selection.getModel();
      Node parent = selection.getParentNode();
      if (model != null && parent != null) {
        model.beginRecording(textView);
View Full Code Here

  }

  @Override
  public void run() {
    super.run();
    IDOMElement selection = getElementFromTreeItem(getSelectedTreeItem());
    if (textView != null && selection != null) {
      IDOMModel model = selection.getModel();
      Document doc = null;
      if (selection instanceof Document) {
        doc = (Document) selection;
      }
      else if (selection.getOwnerDocument() != null) {
        doc = selection.getOwnerDocument();
      }

      if (model != null && doc != null) {
        model.beginRecording(textView);
        IDOMElement child = (IDOMElement) doc.createElement(childName);
        selection.appendChild(child);
        processor.insertDefaultAttributes(child);
        formatter.formatNode(child);
        formatter.formatNode(child.getParentNode());
        model.endRecording(textView);
        if (treeViewer != null) {
          treeViewer.setSelection(new StructuredSelection(child));
        }
      }
View Full Code Here

  }

  @Override
  public void run() {
    super.run();
    IDOMElement element = getElementFromTreeItem(getSelectedTreeItem());
    if (treeViewer != null && element != null) {
      treeViewer.expandToLevel(element, TreeViewer.ALL_LEVELS);
    }
  }
View Full Code Here

      if (elem != null) {
        elem.removeAttributeNode(attr);
      }
    }
    else if (transInput instanceof IDOMElement) {
      IDOMElement elem = (IDOMElement) transInput;
      Node parent = elem.getParentNode();
      if (parent != null) {
        parent.removeChild(elem);
      }
    }
  }
View Full Code Here

  @Override
  public void run() {
    super.run();
    TreeItem selection = getSelectedTreeItem();
    IDOMElement element = getElementFromTreeItem(selection);
    if (treeViewer != null && element != null) {
      treeViewer.collapseToLevel(element, TreeViewer.ALL_LEVELS);
    }
  }
View Full Code Here

    List<Activity> registry = getDiagram().getModelRegistry();
    NodeList methods = getInput().getChildNodes();
    for (int i = 0; i < methods.getLength(); i++) {
      Node node = methods.item(i);
      if (node instanceof IDOMElement && node.getLocalName().equals(IntegrationSchemaConstants.ELEM_METHOD)) {
        IDOMElement method = (IDOMElement) node;
        String channel = method.getAttribute(IntegrationSchemaConstants.ATTR_REPLY_CHANNEL);
        if (channel != null && channel.trim().length() > 0) {
          Node channelRef = getDiagram().getReferencedNode(channel);
          if (channelRef instanceof IDOMElement) {
            for (Activity activity : registry) {
              if (!(activity instanceof ParallelActivity) && activity.getInput().equals(channelRef)) {
View Full Code Here

    List<Activity> registry = getDiagram().getModelRegistry();
    NodeList methods = getInput().getChildNodes();
    for (int i = 0; i < methods.getLength(); i++) {
      Node node = methods.item(i);
      if (node instanceof IDOMElement && node.getLocalName().equals(IntegrationSchemaConstants.ELEM_METHOD)) {
        IDOMElement method = (IDOMElement) node;
        String channel = method.getAttribute(IntegrationSchemaConstants.ATTR_REQUEST_CHANNEL);
        if (channel != null && channel.trim().length() > 0) {
          Node channelRef = getDiagram().getReferencedNode(channel);
          if (channelRef instanceof IDOMElement) {
            for (Activity activity : registry) {
              if (!(activity instanceof ParallelActivity) && activity.getInput().equals(channelRef)) {
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement

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.