Skip to content
Snippets Groups Projects
Commit d16ef1a9 authored by Árpád Lovassy's avatar Árpád Lovassy Committed by Gerrit Code Review
Browse files

Merge "convertToAbsoluteURI -> resolvePathURI"

parents b8f76600 486f3166
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ public final class TITANPathUtilities {
}
final IPathVariableManager pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
URI uri = URIUtil.toURI(tmp2);
URI uri = URIUtil.toURI(tmp2);//the trailing dots are removed but later corrected
uri = pathVariableManager.resolveURI(uri);
if (basePath != null && uri != null && !uri.isAbsolute()) {
......@@ -148,12 +148,12 @@ public final class TITANPathUtilities {
*
* @return the resolved uri.
* */
//not used, TODO: remove it!
//not used, TODO: remove it! use resolvePath(String,String)
@Deprecated
public static URI convertToAbsoluteURI(final String pathToBeConverted, final String basePath) {
return convertToAbsoluteURI(pathToBeConverted, URIUtil.toURI(basePath));
}
//not used, TODO: remove it!
//not used, TODO: remove it!, use resovePath(String,URI)
@Deprecated
public static URI convertToAbsoluteURI(final String pathToBeConverted, final URI basePath) {
......
......@@ -184,7 +184,7 @@ public class TpdImporter {
// Hint: cp $TTCN3_DIR/etc/xsd/TPD.xsd designer/schema/
}
URI resolvedProjectFileURI = TITANPathUtilities.convertToAbsoluteURI(projectFile, (URI) null);
URI resolvedProjectFileURI = TITANPathUtilities.resolvePath(projectFile, (URI) null);
//====================================
// Loading all URI Documents (tpds)
// and collect projects to be imported
......@@ -572,7 +572,7 @@ public class TpdImporter {
try {
if (relativeURINode != null) {
String relativeLocation = relativeURINode.getTextContent();
URI absoluteURI = TITANPathUtilities.convertToAbsoluteURI(relativeLocation, projectFileFolderURI);
URI absoluteURI = TITANPathUtilities.resolvePath(relativeLocation, projectFileFolderURI);
if (absoluteURI == null) {
// The URI cannot be resolved - for example it
// contains not existing environment variables
......@@ -592,7 +592,7 @@ public class TpdImporter {
}
} else if (rawURINode != null) {
String rawLocation = rawURINode.getTextContent();
URI absoluteURI = TITANPathUtilities.convertToAbsoluteURI(rawLocation, projectFileFolderURI);
URI absoluteURI = TITANPathUtilities.resolvePath(rawLocation, projectFileFolderURI);
if (TitanURIUtil.isPrefix(projectLocationURI, absoluteURI)) {
folder.create(false, true, null);
} else {
......@@ -665,7 +665,7 @@ public class TpdImporter {
try {
if (relativeURINode != null) {
String relativeLocation = relativeURINode.getTextContent();
URI absoluteURI = TITANPathUtilities.convertToAbsoluteURI(relativeLocation, projectFileFolderURI);
URI absoluteURI = TITANPathUtilities.resolvePath(relativeLocation, projectFileFolderURI);
if (absoluteURI == null) {
continue;
}
......@@ -679,7 +679,7 @@ public class TpdImporter {
}
} else if (rawURINode != null) {
String rawURI = rawURINode.getTextContent();
URI absoluteURI = TITANPathUtilities.convertToAbsoluteURI(rawURI, projectFileFolderURI);
URI absoluteURI = TITANPathUtilities.resolvePath(rawURI, projectFileFolderURI);
if (absoluteURI == null) {
continue;
}
......@@ -1114,7 +1114,7 @@ public class TpdImporter {
String unresolvedProjectLocationURI = locationNode.getTextContent();
URI absoluteURI = TITANPathUtilities.convertToAbsoluteURI(unresolvedProjectLocationURI, URIUtil.toURI(projectFileFolderPath));
URI absoluteURI = TITANPathUtilities.resolvePath(unresolvedProjectLocationURI, URIUtil.toURI(projectFileFolderPath));
String fileName;
// Determine tpdname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment