private static GhidraScriptProvider findProvider(ResourceFile scriptFile) {
		GhidraScriptProvider baseProvider = null;
		String fileName = scriptFile.getName().toLowerCase();
		for (GhidraScriptProvider provider : getProviders()) {
			String extension = provider.getExtension().toLowerCase();
			if (fileName.endsWith(extension)) {
				baseProvider = provider;
				if (!scriptFile.exists()) {
					// Use UnsupportedScriptProvider. The provider will be updated later when
					// the file actually exists and we can properly look for an @runtime tag 
					// (or confirm that one is not defined)
					break;
				}
				String runtime = new ScriptInfo(provider, scriptFile).getRuntimeEnvironmentName();
				if (runtime == null ||
					runtime.equalsIgnoreCase(provider.getRuntimeEnvironmentName())) {
					return provider;
				}
			}
		}
		if (baseProvider != null) {
			return new UnsupportedScriptProvider(baseProvider);
		}
		return null;
	}
Find the first provider whose extension matches the given file's extension and whose 
{@link ScriptInfo#AT_RUNTIME} matches 

@param scriptFile the script file (not guaranteed to exist if this method is called because
  the script manager is creating a new script and all it has to go off of initially is
  the desired file extension...in this case there will not be a @runtime tag yet)
@return the matching provider or null if no provider matches
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScriptUtil.java