if (extension.length () == 0) return ""; //$NON-NLS-1$
if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$
/* Use the character encoding for the default locale */
TCHAR extensionKey = new TCHAR(0, extension, true);
String result = getKeyValue(extensionKey);
if (result != null) {
// look for "<programID>\NotInsertable"
TCHAR notInsertableKey = new TCHAR(0, result+"\\NotInsertable", true); //$NON-NLS-1$
if (getKeyExists(notInsertableKey)) return ""; //$NON-NLS-1$
// look for "<programID>\Insertable"
TCHAR insertableKey = new TCHAR(0, result+"\\Insertable", true); //$NON-NLS-1$
if (getKeyExists(insertableKey)) return result;
// look for "<programID>\protocol\StdFileEditing\server"
TCHAR serverKey = new TCHAR(0, result+"\\protocol\\StdFileEditing\\server", true); //$NON-NLS-1$
if (getKeyExists(serverKey)) return result;
}
return ""; //$NON-NLS-1$
}