Package org.eclipse.jst.jsp.core.internal.contentmodel.tld

Examples of org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$IncludeHelper


   *
   * @deprecated - does not properly handle prefixes
   */
  protected void handleTaglib() {
    // get/create TLDCMDocument
    TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(fStructuredDocument);
    if (mgr != null) {
      List trackers = mgr.getCMDocumentTrackers(getCurrentNode().getEnd());
      Iterator it = trackers.iterator();
      CMDocumentTracker tracker = null;
      Iterator taglibRegions = null;
      IStructuredDocumentRegion sdRegion = null;
      ITextRegion r = null;
View Full Code Here


   * include file taglibs are handled on the fly when they are encountered. *
   * @param regions
   */
  private void handleTaglib(String prefix) {
    // get/create TLDCMDocument
    TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(fStructuredDocument);
    if (mgr != null) {
      // get trackers for the CMDocuments enabled at this offset
      List trackers = mgr.getCMDocumentTrackers(getCurrentNode().getEnd());
      Iterator it = trackers.iterator();
      CMDocumentTracker tracker = null;
      while (it.hasNext()) {
        tracker = (CMDocumentTracker) it.next();
        addBlockMarkers(prefix + ":", tracker.getDocument()); //$NON-NLS-1$
View Full Code Here

   *
   * @param fullFunctionName
   * @return
   */
  protected String genFunction(String fullFunctionName) {
    TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fDocument);
    int colonIndex = fullFunctionName.indexOf(':');
    String prefix = fullFunctionName.substring(0, colonIndex);
    String functionName = fullFunctionName.substring(colonIndex + 1);
    if (docMgr == null)
      return null;
   
    Iterator taglibs = docMgr.getCMDocumentTrackers(fCurrentNode.getStartOffset()).iterator();
    while (taglibs.hasNext()) {
      TaglibTracker tracker = (TaglibTracker)taglibs.next();
      if(tracker.getPrefix().equals(prefix)) {
        CMDocumentImpl doc = (CMDocumentImpl)tracker.getDocument();
       
View Full Code Here

    //only returns anything if looking for child nodes
    if(((includeOptions & ModelQuery.INCLUDE_CHILD_NODES) != 0) && parentElement instanceof IDOMElement) {
      //get the trackers
      IDOMElement elem = (IDOMElement)parentElement;
      IStructuredDocument structDoc = elem.getModel().getStructuredDocument();
      TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(structDoc);

      if(manager != null) {
        List trackers = new ArrayList(manager.getTaglibTrackers());
       
        //for each tracker add each of its elements to the node list
        for(int trackerIndex = 0; trackerIndex < trackers.size(); ++trackerIndex) {
          CMNamedNodeMap elements = ((TaglibTracker)trackers.get(trackerIndex)).getElements();
          for(int elementIndex = 0; elementIndex < elements.getLength(); ++elementIndex) {
View Full Code Here

      String prefix = node.getPrefix();

      if (result == null && prefix != null && prefix.length() > 0 && node instanceof IDOMNode) {
        // check position dependent
        IDOMNode xmlNode = (IDOMNode) node;
        TLDCMDocumentManager tldmgr = TaglibController.getTLDCMDocumentManager(xmlNode.getStructuredDocument());
        if (tldmgr != null) {
          List documents = tldmgr.getCMDocumentTrackers(node.getPrefix(), xmlNode.getStartOffset());
          // there shouldn't be more than one cmdocument returned
          if (documents != null && !documents.isEmpty())
            result = (CMDocument) documents.get(0);
        }
      }
View Full Code Here

      fTaglibPrefixes.add("servlet"); //$NON-NLS-1$
      fTaglibPrefixes.add("sun"); //$NON-NLS-1$
      fTaglibPrefixes.add("sunw"); //$NON-NLS-1$

      // add all taglib prefixes
      TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(document);
      if (manager != null) {
        List trackers = manager.getTaglibTrackers();
        for (Iterator it = trackers.iterator(); it.hasNext();) {
          TaglibTracker tracker = (TaglibTracker) it.next();
          if (tracker.getElements().getLength() == 0)
            continue;
          String prefix = tracker.getPrefix();
View Full Code Here

   * @param document
   * @return the TLDElementDeclaration for this required tag or null if there  is nothing appropriate
   */
  public static CMElementDeclaration getTLDElementDeclaration(final String uri, final String elementName, IDocument document)
  {
      TLDCMDocumentManager tldmgr = TaglibController.getTLDCMDocumentManager(document);
     
      if (tldmgr != null)
      {
            for (Iterator it = tldmgr.getTaglibTrackers().iterator();it.hasNext();)
            {
                TaglibTracker  tracker = (TaglibTracker) it.next();
               
                if (tracker.getURI().equals(uri))
                {
View Full Code Here

    String teiClass = null;
    if (problems == null)
      problems = new ArrayList();
    ModelQuery mq = getModelQuery(structuredDoc);
    if (mq != null) {
      TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(structuredDoc);

      if (mgr != null) {

        List trackers = mgr.getCMDocumentTrackers(-1);
        Iterator taglibs = trackers.iterator();
 
        CMDocument doc = null;
        CMNamedNodeMap elements = null;
        while (taglibs.hasNext()) {
View Full Code Here

    List results = new ArrayList();
    if (problems == null)
      problems = new ArrayList();
    ModelQuery mq = getModelQuery(structuredDoc);
    if (mq != null) {
      TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(structuredDoc);

      // TaglibSupport support = ((TaglibModelQuery)
      // mq).getTaglibSupport();
      if (mgr == null)
        return new TaglibVariable[0];

      List trackers = mgr.getCMDocumentTrackers(-1);
      Iterator taglibs = trackers.iterator();

      // TaglibSupport support = ((TaglibModelQuery)
      // mq).getTaglibSupport();
      // if (support == null)
View Full Code Here

            final IDocument doc)
    {
        final String prefix = element.getPrefix();

        // TODO: merge back with JSPUtil.findUri()
        final TLDCMDocumentManager m =
            TaglibController.getTLDCMDocumentManager(doc);

        if (prefix == null || m == null)
        {
            return null;
        }
        final List<?> trackers = m.getTaglibTrackers();
        for (final Object name : trackers)
        {
            final TaglibTracker tracker = (TaglibTracker) name;
            if (prefix.equals(tracker.getPrefix()))
            {
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$IncludeHelper

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.