public static URL toURL(String projectPathOrURL) {
		if (!projectPathOrURL.startsWith(PROTOCOL + ":")) {
			if (projectPathOrURL.endsWith(ProjectLocator.PROJECT_DIR_SUFFIX) ||
				projectPathOrURL.endsWith(ProjectLocator.PROJECT_FILE_SUFFIX)) {
				String ext = projectPathOrURL.substring(projectPathOrURL.lastIndexOf('.'));
				throw new IllegalArgumentException("Project path must omit extension: " + ext);
			}
			if (projectPathOrURL.contains("?") || projectPathOrURL.contains("#")) {
				throw new IllegalArgumentException("Unsupported query/ref used with project path");
			}
			projectPathOrURL = checkAbsolutePath(projectPathOrURL);
			int minSplitIndex = projectPathOrURL.charAt(2) == ':' ? 3 : 0;
			int splitIndex = projectPathOrURL.lastIndexOf('/');
			if (splitIndex < minSplitIndex || projectPathOrURL.length() == (splitIndex + 1)) {
				throw new IllegalArgumentException("Absolute project path is missing project name");
			}
			++splitIndex;
			String location = projectPathOrURL.substring(0, splitIndex);
			String projectName = projectPathOrURL.substring(splitIndex);
			return makeURL(location, projectName);
		}
		try {
			return new URL(projectPathOrURL);
		}
		catch (MalformedURLException e) {
			throw new IllegalArgumentException(e);
		}
	}
Create a Ghidra URL from a string form of Ghidra URL or local project path.
This method can consume strings produced by the getDisplayString method.
@param projectPathOrURL {@literal project path (<absolute-directory>/<project-name>)} or 
string form of Ghidra URL.
@return local Ghidra project URL
@see #getDisplayString(URL)
@throws IllegalArgumentException invalid path or URL specified
Ghidra/Framework/Project/src/main/java/ghidra/framework/protocol/ghidra/GhidraURL.java