diff options
author | nitind | 2004-12-09 02:10:41 +0000 |
---|---|---|
committer | nitind | 2004-12-09 02:10:41 +0000 |
commit | 198672f08fcaf9a549b745cb6a9c1505d8744bf7 (patch) | |
tree | 97633fccd3b0832696db1dd63d8e02e27575db44 /bundles/org.eclipse.wst.html.core | |
parent | 1ca371dfec0596091ed885c02be947a3ff9d8ff8 (diff) | |
download | webtools.sourceediting-198672f08fcaf9a549b745cb6a9c1505d8744bf7.tar.gz webtools.sourceediting-198672f08fcaf9a549b745cb6a9c1505d8744bf7.tar.xz webtools.sourceediting-198672f08fcaf9a549b745cb6a9c1505d8744bf7.zip |
correct baselocation path for resolution
Diffstat (limited to 'bundles/org.eclipse.wst.html.core')
-rw-r--r-- | bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java index 0aed9ca03f..1f59e15c07 100644 --- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java +++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/modelquery/ModelQueryAdapterFactoryForHTML.java @@ -12,6 +12,9 @@ package org.eclipse.wst.html.core.modelquery; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Path; import org.eclipse.wst.common.contentmodel.modelquery.ModelQuery; import org.eclipse.wst.common.contentmodel.util.CMDocumentCache; import org.eclipse.wst.sse.core.AbstractAdapterFactory; @@ -64,6 +67,10 @@ public class ModelQueryAdapterFactoryForHTML extends AbstractAdapterFactory impl IStructuredModel model = stateNotifier = xmlNode.getModel(); stateNotifier.addModelStateListener(this); String baseLocation = model.getBaseLocation(); + IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation())); + if(baseFile != null) { + baseLocation = baseFile.getLocation().toString(); + } if (Debug.displayInfo) System.out.println("----------------ModelQueryAdapterFactoryForHTML... baseLocation : " + baseLocation); //$NON-NLS-1$ @@ -78,7 +85,12 @@ public class ModelQueryAdapterFactoryForHTML extends AbstractAdapterFactory impl } protected void updateResolver(IStructuredModel model) { - modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(model.getBaseLocation(), model.getResolver())); + String baseLocation = model.getBaseLocation(); + IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation())); + if(baseFile != null) { + baseLocation = baseFile.getLocation().toString(); + } + modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver())); } /** |