AWorkspaceProject project = WorkspaceController.getProject(targetNode);
int mode = WorkspaceNewFolderPanel.MODE_VIRTUAL_PHYSICAL;
if(targetNode instanceof IFileSystemRepresentation) {
mode = WorkspaceNewFolderPanel.MODE_VIRTUAL_ONLY;
}
WorkspaceNewFolderPanel dialog = new WorkspaceNewFolderPanel(mode , targetNode);
int response = JOptionPane.showConfirmDialog(UITools.getFrame(), dialog, TextUtils.getText("workspace.action.node.new.folder.dialog.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if(response == JOptionPane.OK_OPTION) {
String value = dialog.getFolderName();
if(value == null || value.trim().length() <= 0) {
//WORKSPACE - ToDo: prepare message, or call this method (with error message) again?
return;
}
if(dialog.isLinkedFolder()) {
File path = new File(dialog.getLinkPath());
if (path != null) {
FolderLinkNode node = new FolderLinkNode();
node.setName(value);
URI uri = project.getRelativeURI(path.toURI());
if(uri == null) {