Author: scabanovich
Date: 2009-09-25 12:52:55 -0400 (Fri, 25 Sep 2009)
New Revision: 17768
Removed:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TaglibManagerWrapper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4950
Deleted:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TaglibManagerWrapper.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TaglibManagerWrapper.java 2009-09-25
16:52:01 UTC (rev 17767)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TaglibManagerWrapper.java 2009-09-25
16:52:55 UTC (rev 17768)
@@ -1,61 +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.text.ext.util;
-
-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.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-
-public class TaglibManagerWrapper {
- TLDCMDocumentManager manager;
- List trackers;
-
- public TaglibManagerWrapper() {}
-
- public void init(IDocument document, int offset) {
- manager = TaglibController.getTLDCMDocumentManager(document);
- if(exists()) {
- trackers = manager.getCMDocumentTrackers(offset);
- }
- }
-
- public boolean exists() {
- return manager != null;
- }
-
- public String getUri(String prefix) {
- for (int i = 0; i < trackers.size(); i++) {
- TaglibTracker tt = (TaglibTracker)trackers.get(i);
- if (prefix.equals(tt.getPrefix())) {
- return tt.getURI();
- }
- }
- return null;
- }
-
- public String getPrefix(String uri) {
- for (int i = 0; i < trackers.size(); i++) {
- TaglibTracker tt = (TaglibTracker)trackers.get(i);
- if (uri.equals(tt.getURI())) {
- return tt.getPrefix();
- }
- }
- return null;
- }
-
- public String getCorePrefix() {
- return
getPrefix("http://java.sun.com/jsf/core"); //$NON-NLS-1$
- }
-
-}