Package org.eclipse.jst.pagedesigner.jsp.core.internal.pagevar

Examples of org.eclipse.jst.pagedesigner.jsp.core.internal.pagevar.DocumentPageVariableAdapter


   * @param file
   * @return the Element
   */
  public Element previewFile(IFile file) {
    IDOMModel xmlModel = null;
    DocumentPageVariableAdapter provider = null;
    boolean pushedPageVarProvider = false;
    try {

      xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForRead(
          file);
      if (xmlModel != null) {
        IDOMDocument doc = xmlModel.getDocument();

        // XXX: need to also register page variable adapters. In the
        // future, this should go to some
        // SSE system registry mechanism.
        xmlModel.getFactoryRegistry().addFactory(
            new PageVariableAdapterFactory());
        provider = new DocumentPageVariableAdapter(doc);
        doc.addAdapter(provider);

        provider.refresh();
        PageExpressionContext.getCurrent()
            .pushPageVarProvider(provider);

        Node child = xmlModel.getDocument().getFirstChild();
        PreviewConvertContext context = new PreviewConvertContext(this
View Full Code Here


          CSSStyleAdapterFactory.getInstance());

      // _viewer.getDestDocumentForDesign().getModel().getFactoryRegistry().addFactory(CSSStyleAdapterFactory.getInstance());
      ((IDOMModel) model).getFactoryRegistry().addFactory(
          new PageVariableAdapterFactory());
      doc.addAdapter(new DocumentPageVariableAdapter(doc));
      _viewer.setContents(((IDOMModel) model).getDocument());
    } else {
      _viewer.setContents((EditPart) null);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.jsp.core.internal.pagevar.DocumentPageVariableAdapter

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.