Author: scabanovich
Date: 2009-07-21 11:09:14 -0400 (Tue, 21 Jul 2009)
New Revision: 16696
Removed:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/TLDVersionHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1826
TLDVersionHelper moved.
Deleted:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/TLDVersionHelper.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/TLDVersionHelper.java 2009-07-21
15:04:43 UTC (rev 16695)
+++
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/TLDVersionHelper.java 2009-07-21
15:09:14 UTC (rev 16696)
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.kb.wtp;
-
-import java.util.List;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentImpl;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-public class TLDVersionHelper {
- public static String getTldVersion(String uri, String prefix, IDocument document) {
- if(uri==null & prefix==null && document==null) {
- return null;
- }
- TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(document);
- if (manager != null) {
- List list = manager.getTaglibTrackers();
- for(int i=0; i<list.size(); i++) {
- TaglibTracker tracker = (TaglibTracker)list.get(i);
- if(prefix.equals(tracker.getPrefix()) && uri.equals(tracker.getURI())) {
- return getTldVersion(tracker);
- }
- }
- }
- return null;
- }
-
- public static String getTldVersion(TaglibTracker tracker) {
- CMDocument cmd = tracker.getDocument();
- if(cmd instanceof CMDocumentImpl) {
- CMDocumentImpl doc = (CMDocumentImpl)cmd;
- return doc.getTlibversion();
- }
- return null;
- }
-
-}