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

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


    }
    if (model instanceof IDOMModel) {
      IDOMModel domModel = (IDOMModel) model;
      ModelHandlerForJSP.ensureTranslationAdapterFactory(domModel);

      IDOMDocument xmlDoc = domModel.getDocument();
      JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
      IJSPTranslation translation = translationAdapter.getJSPTranslation();

      if (!reporter.isCancelled()) {
        loadPreferences(f);
View Full Code Here


    private String getAppConfigFileVersion(final FacesConfigArtifactEdit facesConfigEdit)
    {
        String appConfigVersion = null;

        final IDOMModel domModel = facesConfigEdit.getIDOMModel();
        final IDOMDocument document = domModel.getDocument();
        if (document == null) {return null;}

        final DocumentType docType = domModel.getDocument().getDoctype();

        // if we have DTD doctype then we're looking at 1.1 or before
View Full Code Here

        IDocument document = getDocument();
        if (document != null) {
          IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
          try {
            if (model instanceof IDOMModel) {
              IDOMDocument modelDocument = ((IDOMModel) model).getDocument();
              NodeList rootChildren = modelDocument.getChildNodes();

              boolean tooManyChildren = (rootChildren.getLength() > MAX_NUM_CHILD_NODES_FOR_AUTO_EXPAND);
              /*
               * For each root (there should really only be one
               * real root but there are also could be empty
View Full Code Here

        case IEditorPart.PROP_INPUT : {
          if (source == getTextEditor() && fDesignViewer instanceof XMLTableTreeViewer) {
            IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
            try {
              if (model instanceof IDOMModel) {
                IDOMDocument modelDocument = ((IDOMModel) model).getDocument();
                Object designInput = ((XMLTableTreeViewer) fDesignViewer).getInput();
                if (modelDocument != designInput)
                  setInput(getTextEditor().getEditorInput());
              }
            }
View Full Code Here

    if (completionRegion == null) {
      if (((treeNode == null) || (((Node) treeNode).getNodeType() == Node.DOCUMENT_NODE)) && (completionRegion == null) && ((xmlnode == null) || (xmlnode.getChildNodes() == null) || (xmlnode.getChildNodes().getLength() == 0))) {
        IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
        try {
          if (sModel != null) {
            IDOMDocument docNode = ((IDOMModel) sModel).getDocument();
            contentAssistRequest = newContentAssistRequest(docNode, docNode, sdRegion, completionRegion, documentPosition, 0, null);
            addEmptyDocumentProposals(contentAssistRequest);
          }
        }
        finally {
View Full Code Here


  protected DocumentType createDoctype(EditDoctypeDialog dialog, Document document) {
    DocumentType result = null;
    if (document instanceof DocumentImpl) {
      IDOMDocument documentImpl = (IDOMDocument) document;
      IDOMDocumentType doctypeImpl = (IDOMDocumentType) documentImpl.createDoctype(dialog.getName());
      doctypeImpl.setPublicId(dialog.getPublicId());
      doctypeImpl.setSystemId(dialog.getSystemId());
      result = doctypeImpl;
    }
    return result;
View Full Code Here

            // add factory to factory registry
            factoryRegistry.addFactory(newFactory);

            // add factory to propogating adapter
            final IDOMModel domModel = (IDOMModel) sModel;
            final IDOMDocument document = domModel.getDocument();
            final PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document)
                .getAdapterFor(PropagatingAdapter.class);
            if (propagatingAdapter != null) {
              propagatingAdapter
                  .addAdaptOnCreateFactory(newFactory);
View Full Code Here

  protected void addPropagatingAdapters(IStructuredModel structuredModel) {

    if (structuredModel instanceof IDOMModel) {
      IDOMModel xmlModel = (IDOMModel) structuredModel;
      IDOMDocument document = xmlModel.getDocument();
      PropagatingAdapter propagatingAdapter = (PropagatingAdapter) document
          .getAdapterFor(PropagatingAdapter.class);
      if (propagatingAdapter != null) {
        // what to do?
      }
    }
View Full Code Here

  public void initModel(IStructuredModel model){
    Section generic = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
    generic.setText(ClickPlugin.getString("editor.clickXML.general"));
    generic.setLayoutData(ClickUtils.createGridData(2, GridData.FILL_HORIZONTAL));
   
    IDOMDocument doc = ((IDOMModel)model).getDocument();
    NodeList nodes = doc.getElementsByTagName(ClickPlugin.TAG_CLICK_APP);
    final IDOMElement clickApp = (IDOMElement)nodes.item(0);
    IDOMElement format = ClickUtils.getElement(clickApp, ClickPlugin.TAG_FORMAT);
    IDOMElement mode   = ClickUtils.getElement(clickApp, ClickPlugin.TAG_MODE);
   
    Composite compsote = toolkit.createComposite(generic);
View Full Code Here

   
    form.getBody().layout();
  }

  public void modelUpdated(IStructuredModel model){
    IDOMDocument doc = ((IDOMModel)model).getDocument();
    NodeList nodes = doc.getElementsByTagName(ClickPlugin.TAG_CLICK_APP);
    IDOMElement clickApp = (IDOMElement)nodes.item(0);
    IDOMElement format = ClickUtils.getElement(clickApp, ClickPlugin.TAG_FORMAT);
    IDOMElement mode   = ClickUtils.getElement(clickApp, ClickPlugin.TAG_MODE);

    updateText(textCharset, clickApp, ClickPlugin.ATTR_CHARSET);
View Full Code Here

TOP

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

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.