Author: vrubezhny
Date: 2009-05-22 14:04:25 -0400 (Fri, 22 May 2009)
New Revision: 15452
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
Minimal implementation changes (Region in replaced by IRegion)
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-05-22
17:54:17 UTC (rev 15451)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-05-22
18:04:25 UTC (rev 15452)
@@ -14,6 +14,7 @@
import java.util.Map;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
import org.jboss.tools.jst.web.kb.IPageContext;
@@ -26,12 +27,13 @@
* @author Alexey Kazakov
*/
public class JspContextImpl extends ELContextImpl implements IPageContext {
-
protected IDocument document;
protected ITagLibrary[] libs;
- protected Map<Region, Map<String, INameSpace>> nameSpaces = new
HashMap<Region, Map<String, INameSpace>>();
+ protected Map<IRegion, Map<String, INameSpace>> nameSpaces = new
HashMap<IRegion, Map<String, INameSpace>>();
protected IResourceBundle[] bundles;
+
+
/*
* (non-Javadoc)
* @see org.jboss.tools.common.kb.text.PageContext#getLibraries()
@@ -80,7 +82,7 @@
*/
public Map<String, INameSpace> getNameSpaces(int offset) {
Map<String, INameSpace> result = new HashMap<String, INameSpace>();
- for (Region region : nameSpaces.keySet()) {
+ for (IRegion region : nameSpaces.keySet()) {
if(offset>=region.getOffset() && offset<=region.getOffset() +
region.getLength()) {
result.putAll(nameSpaces.get(region));
}
@@ -93,7 +95,7 @@
* @param region
* @param name space
*/
- public void addNameSpace(Region region, INameSpace nameSpace) {
+ public void addNameSpace(IRegion region, INameSpace nameSpace) {
nameSpaces.get(region).put(nameSpace.getPrefix(), nameSpace);
}
}
\ No newline at end of file
Show replies by date