Examples of IDOMModel


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

        final QName  containerQName = getContainerTag().asQName();
        boolean hasform = ValidatorSupport.checkContainer(domPosition, containerQName);
        IDOMPosition newPosition = domPosition;
        if (!hasform)
        {
            final IDOMModel model = ((IDOMNode) domPosition.getContainerNode())
                .getModel();
           
            final IFile fileForDocument = ResolverUtil.getFileForDocument(model.getStructuredDocument());           
            final ITagDropSourceData creationProvider =
                TagToolCreationAdapter.findProviderForContainer(containerQName, PaletteItemManager.createPaletteContext(fileForDocument));
            newPosition = ValidatorSupport
                    .insertContainer(domPosition, model, creationProvider, getContainerCustomizationData());
            if (newPosition == null) {
View Full Code Here

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

   */
  private void documentTypeChanged() {
    IDOMDocument document = getDocument();
    if (document == null)
      return; // error
    IDOMModel model = document.getModel();
    if (model == null)
      return; // error

    IFile file = getFile(model);

View Full Code Here

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

   * CMDocument is appropriate for the DOM Node.
   */
  public CMDocument getCorrespondingCMDocument(Node node) {
    CMDocument jcmdoc = null;
    if (node instanceof IDOMNode) {
      IDOMModel model = ((IDOMNode) node).getModel();
      String modelPath = model.getBaseLocation();
      if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
        if(node.getNodeName().trim().startsWith("t:")){
          jcmdoc = JSPCMDocumentFactory.getTapestryCMDocument();
        }else{
          float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
View Full Code Here

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

    // null,attr check is done in isValidAttribute()
    Element element = getElement();
    String href = element.getAttribute("href");//$NON-NLS-1$

    IDOMModel baseModel = ((IDOMNode) element).getModel();
    if (baseModel == null)
      return null;
    Object id = baseModel.getId();
    if (!(id instanceof String))
      return null;
    //String base = (String)id;

    // get ModelProvideAdapter
View Full Code Here

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

   */
  public void styleUpdate(ICSSModel srcModel) {
    IDOMNode node = (IDOMNode) getElement();
    if (node == null)
      return;
    IDOMModel model = node.getModel();
    if (model == null)
      return;
    XMLModelNotifier notifier = model.getModelNotifier();
    if (notifier == null)
      return;

    // before updating, all sub-models should be loaded!
    DocumentStyle document = (DocumentStyle) model.getDocument();
    StyleSheetList styles = document.getStyleSheets();
    if (styles != null) {
      int n = styles.getLength();
      ImportedCollector trav = new ImportedCollector();
      for (int i = 0; i < n; i++) {
View Full Code Here

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

  /**
   * declaratoin: "data" for XML declaration, such as "version=\"1.0\""
   * publicId: publicId for DOCTYPE declaration
   */
  public void convert(InputStream input, OutputStream output, String declaration, String publicId) throws UnsupportedEncodingException, IOException, CoreException {
    IDOMModel model = readModel(input);
    if (model == null)
      return;
    try {
      convert(model, declaration, publicId);
      writeModel(model, output);
    }
    finally {
      if (model != null)
        model.releaseFromEdit();
    }
  }
View Full Code Here

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

  /**
   * declaratoin: "data" for XML declaration, such as "version=\"1.0\""
   * publicId: publicId for DOCTYPE declaration
   */
  public void convert(IFile file, String declaration, String publicId) throws IOException, CoreException {
    IDOMModel model = readModel(file);
    if (model == null)
      return;
    try {
      convert(model, declaration, publicId);
      writeModel(model, file);
    }
    finally {
      if (model != null)
        model.releaseFromEdit();
    }
  }
View Full Code Here

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

    super.preLoadAdapt(structuredModel);
    // DMW: just added this preload on 8/16/2002
    // I noticed the ProagatingAdapterFactory was being added,
    // that that the ProagatingAdapterAdapter was not being
    // preload adapted -- I'm assuing it ALWAYS has to be.
    IDOMModel domModel = (IDOMModel) structuredModel;
    // if there is a model in the adapter, this will adapt it to
    // first node. After that the PropagatingAdater spreads over the
    // children being
    // created. Each time that happends, a side effect is to
    // also "spread" sprecific registered adapters,
    // they two can propigate is needed.
    ((INodeNotifier) domModel.getDocument()).getAdapterFor(PropagatingAdapter.class);
    if (Debug.debugNotificationAndEvents) {
      PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) domModel.getDocument()).getAdapterFor(PropagatingAdapter.class);
      propagatingAdapter.addAdaptOnCreateFactory(new DebugAdapterFactory());
    }  }
View Full Code Here

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

   */
  private void documentTypeChanged() {
    IDOMDocument document = getDocument();
    if (document == null)
      return; // error
    IDOMModel model = document.getModel();
    if (model == null)
      return; // error

    IFile file = getFile(model);

View Full Code Here

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

    return new JSPSourceParser();
  }

  protected void preLoadAdapt(IStructuredModel structuredModel) {
    super.preLoadAdapt(structuredModel);
    IDOMModel domModel = (IDOMModel) structuredModel;
    //
    // document must have already been set for this to
    // work.
    Document document = domModel.getDocument();
    Assert.isNotNull(document);
    // if there is a model in the adapter, this will adapt it to
    // first node. After that the PropagatingAdater spreads over the
    // children being
    // created. Each time that happends, a side effect is to
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.