public void assignSDKPath() {
try {
String sInstallationFolder = "";
Object oFolderPicker = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.ui.dialogs.FolderPicker", m_xComponentContext);
XFolderPicker xFolderPicker = (XFolderPicker) UnoRuntime.queryInterface(XFolderPicker.class, oFolderPicker);
XExecutableDialog xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oFolderPicker);
XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oFolderPicker);
String sPath = getSDKPath();
if (!sPath.equals("")){
xFolderPicker.setDisplayDirectory(sPath);
}
xFolderPicker.setTitle("Add the Path to your SDK installation");
short nResult = xExecutable.execute();
if (nResult == com.sun.star.ui.dialogs.ExecutableDialogResults.OK){
sInstallationFolder = xFolderPicker.getDirectory();
if (m_oIntrospector.isValidSDKInstallationPath(sInstallationFolder)){
XNameAccess xNameAccess = getConfigurationAccess(true);
XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess);
xPropertySet.setPropertyValue("SDKPath", sInstallationFolder);
XChangesBatch xBatch = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, xNameAccess);