Commit d38e6424 authored by Tatiana Chuprina's avatar Tatiana Chuprina
Browse files

RED

refs 2480
parent 6f7058e2
......@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Shell;
* @author reaboi
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E422769792FC9124ED85D69C23DCED65
* @ConQAT.Rating RED Hash: 9B71744B53A771D1DAE7C077BE0CDC1B
*/
public final class FolderOrProjectDialogUtils {
......@@ -55,8 +55,10 @@ public final class FolderOrProjectDialogUtils {
public static final IResource openFolderDialog() {
Shell shell = getWorkbench().getActiveWorkbenchWindow().getShell();
// TODO(TC,25)
IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IProject project = myWorkspaceRoot.getProject("AF3-Project-Directory");
// TODO(TC,25)
IPath location = ResourcesPlugin.getWorkspace().getRoot().getLocation();
IPath projectPath = project.getFullPath();
......@@ -68,22 +70,27 @@ public final class FolderOrProjectDialogUtils {
if(projectFolder != null) {
String subfolder;
// TODO(TC,25)
String platform = SWT.getPlatform();
if(platform.equals("win32") || platform.equals("win64")) {
subfolder = projectFolder.substring(projectFolder.lastIndexOf("\\"));
} else {
// TODO(TC,25)
subfolder = projectFolder.substring(projectFolder.lastIndexOf(IPath.SEPARATOR));
}
IPath path;
if(subfolder.endsWith("AF3-Project-Directory")) {
// TODO(TC,25)
path = Path.fromOSString(projectPath.toString());
} else {
// TODO(TC,25)
path = Path.fromOSString((projectPath + subfolder).toString());
}
if(isValidPath(path) == null) {
if(projectFolder.length() != 0) {
// TODO(TC,25)
Assert.isTrue(path != null, "Expected project folder to be a Path");
if(path.segmentCount() < 2) { // projects need special treatment
return getWorkspace().getRoot().findMember(path);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment