private void updateResolver(IStructuredModel model) { String baseLocation = model.getBaseLocation(); IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation())); if (baseFile != null) { if (baseFile.getLocation() != null) { baseLocation = baseFile.getLocation().toString(); } if (baseLocation == null && baseFile.getLocationURI() != null) { baseLocation = baseFile.getLocationURI().toString(); } if (baseLocation == null) { baseLocation = baseFile.getFullPath().toString(); } } else { baseLocation = model.getBaseLocation(); } modelQueryAdapter.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver())); }
protected void updateResolver(IStructuredModel model) { String baseLocation = model.getBaseLocation(); IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation())); if (baseFile != null) { if (baseFile.getLocation() != null) { baseLocation = baseFile.getLocation().toString(); } if (baseLocation == null && baseFile.getLocationURI() != null) { baseLocation = baseFile.getLocationURI().toString(); } if (baseLocation == null) { baseLocation = baseFile.getFullPath().toString(); } } else { baseLocation = model.getBaseLocation(); } modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver())); }
protected void updateResolver(IStructuredModel model) { String baseLocation = model.getBaseLocation(); IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation())); if (baseFile != null) { if (baseFile.getLocation() != null) { baseLocation = baseFile.getLocation().toString(); } if (baseLocation == null && baseFile.getLocationURI() != null) { baseLocation = baseFile.getLocationURI().toString(); } if (baseLocation == null) { baseLocation = baseFile.getFullPath().toString(); } } else { baseLocation = model.getBaseLocation(); } modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver())); }
final URIResolver resolver = baseModel.getResolver();
final URIResolver resolver = baseModel.getResolver();
protected ICSSModel createModel() { // create phantom(broken link) external CSS model if (getElement() == null) return null; IStructuredModel baseModel = ((IDOMNode) getElement()).getModel(); ICSSModel newModel = (ICSSModel) baseModel.getModelManager().createUnManagedStructuredModelFor(CSS_ID); // calculate base location and set // get resolver in Model URIResolver resolver = baseModel.getResolver(); // resolve to absolute url : this need not exact location of css file. It is important that absurl is not null. String ref = getElement().getAttribute(org.eclipse.wst.html.core.internal.provisional.HTML40Namespace.ATTR_NAME_HREF); String absurl = (resolver != null && ref != null) ? resolver.getLocationByURI(ref, true) : null; if ((absurl == null) || (absurl.length() == 0)) { IPath basePath = new Path(baseModel.getBaseLocation()); URLHelper helper = new URLHelper(basePath.removeLastSegments(1).toString()); absurl = helper.toAbsolute(ref == null ? "" : ref);//$NON-NLS-1$ } if ((absurl == null) || (absurl.length() == 0)) { absurl = ref; } if (absurl == null) { absurl = "";//$NON-NLS-1$ } newModel.setBaseLocation(absurl); // set style listener newModel.addStyleListener(this); return newModel; }
org.eclipse.wst.sse.core.internal.util.URIResolver resolver = model.getResolver(); if (Debug.displayInfo) System.out.println("----------------ModelQueryAdapterFactoryForHTML... baseLocation : " + resolver.getFileBaseLocation()); //$NON-NLS-1$
org.eclipse.wst.sse.core.internal.util.URIResolver resolver = model.getResolver(); if (Debug.displayInfo) System.out.println("----------------ModelQueryAdapterFactoryForJSP... baseLocation : " + resolver.getFileBaseLocation()); //$NON-NLS-1$
stateNotifier.addModelStateListener(getInternalModelStateListener()); org.eclipse.wst.sse.core.internal.util.URIResolver resolver = model.getResolver(); if (Debug.displayInfo) System.out.println("----------------ModelQueryAdapterFactoryForXML... baseLocation : " + resolver.getFileBaseLocation()); //$NON-NLS-1$