diff options
author | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-17 06:14:42 +0000 |
---|---|---|
committer | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-17 06:14:42 +0000 |
commit | ae69d4dae83d70576c524ababa15f9deb7249fea (patch) | |
tree | 2f4d8ea262f30c10da274cf0940539b885fbb9c9 /Tools | |
parent | 3c82f1a5430e078a9d613052e64b9a9c6cb2d497 (diff) | |
download | edk2-platforms-ae69d4dae83d70576c524ababa15f9deb7249fea.tar.xz |
1. Fix EDKT308: Tool initialization should be supported by wizard
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1768 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
2 files changed, 29 insertions, 7 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java index ad08749b7f..0b0493aeed 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java @@ -3711,6 +3711,11 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
this.dispose();
System.exit(0);
+ case Workspace.WORKSPACE_NO_TARGET_FILE:
+ JOptionPane.showConfirmDialog(null, "Target.txt File Is Not Existed", "Error",
+ JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
+ this.dispose();
+ System.exit(0);
}
}
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/Workspace.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/Workspace.java index 5785aaf8aa..580086ff92 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/Workspace.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/Workspace.java @@ -24,15 +24,17 @@ public class Workspace { // Define static return value
//
public final static int WORKSPACE_VALID = 0;
-
+
public final static int WORKSPACE_NOT_DEFINED = 1;
-
+
public final static int WORKSPACE_NOT_EXIST = 2;
-
+
public final static int WORKSPACE_NOT_DIRECTORY = 3;
-
+
public final static int WORKSPACE_NOT_VALID = 4;
+ public final static int WORKSPACE_NO_TARGET_FILE = 5;
+
//
// Define class members
//
@@ -41,6 +43,9 @@ public class Workspace { private static String strWorkspaceDatabaseFile = DataType.FILE_SEPARATOR + "Tools" + DataType.FILE_SEPARATOR
+ "Conf" + DataType.FILE_SEPARATOR + "FrameworkDatabase.db";
+ private static String targetFile = DataType.FILE_SEPARATOR + "Tools" + DataType.FILE_SEPARATOR + "Conf"
+ + DataType.FILE_SEPARATOR + "target.txt";
+
/**
@param args
@@ -99,7 +104,7 @@ public class Workspace { if (strWorkspace == null || strWorkspace == "") {
return Workspace.WORKSPACE_NOT_DEFINED;
}
-
+
//
// Check if WORKSPACE Environment exists
//
@@ -107,14 +112,14 @@ public class Workspace { if (!f.exists()) {
return Workspace.WORKSPACE_NOT_EXIST;
}
-
+
//
// Check if WORKSPACE Environment is a directory
//
if (!f.isDirectory()) {
return Workspace.WORKSPACE_NOT_DIRECTORY;
}
-
+
//
// Check if FrameworkDatabase.db exists
//
@@ -123,6 +128,14 @@ public class Workspace { return Workspace.WORKSPACE_NOT_VALID;
}
+ //
+ // Check if Target.txt exists
+ //
+ f = new File(strWorkspace + Workspace.getTargetFile());
+ if (!f.exists()) {
+ return Workspace.WORKSPACE_NO_TARGET_FILE;
+ }
+
return Workspace.WORKSPACE_VALID;
}
@@ -133,4 +146,8 @@ public class Workspace { public static void setStrWorkspaceDatabaseFile(String strWorkspaceDatabaseFile) {
//Workspace.strWorkspaceDatabaseFile = strWorkspaceDatabaseFile;
}
+
+ public static String getTargetFile() {
+ return targetFile;
+ }
}
|