private void getSRXFile(Text edTextField) { String caption; if (edTextField == edSourceSRX) caption = "Select SRX for Source"; else caption = "Select SRX for Target"; String[] paths = Dialogs.browseFilenames( shell, caption, false, null, "SRX Documents (*.srx)\tAll Files (*.*)", "*.srx\t*.*"); if (paths == null) return; UIUtil.checkProjectFolderAfterPick(paths[0], edTextField, projectDir); }
private void editSRXFile(Text edTextField) { try { SRXEditor editor = new SRXEditor(shell, true, help); String oriPath = edTextField.getText(); if (projectDir != null) { oriPath = oriPath.replace("${ProjDir}", projectDir); } if (oriPath.length() == 0) oriPath = null; editor.showDialog(oriPath); String newPath = editor.getPath(); UIUtil.checkProjectFolderAfterPick(newPath, edTextField, projectDir); } catch (Throwable e) { Dialogs.showError(shell, e.getMessage(), null); } }