summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-10 04:28:15 +0000
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-10 04:28:15 +0000
commitbc9b370686eb138d013672e4a617113eeaf47afb (patch)
treed113b85fa56c77eccd14e2878f8d8167f857a1c0 /Tools
parent2193b507f0fbd0d4542d9923b2602e31b2dfde4f (diff)
downloadedk2-platforms-bc9b370686eb138d013672e4a617113eeaf47afb.tar.xz
Change FrameworkModules selection to next module in platform after remove one module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1700 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java3
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java8
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java1
3 files changed, 9 insertions, 3 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
index b15e5d28d8..1acb42e991 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
@@ -358,6 +358,9 @@ public class FpdFileContents {
if (!cursor.isText()) {
break;
}
+ if (cursor.getObject() == null) {
+ break;
+ }
String s = cursor.getTextValue();
if (s.matches(regExpNewLineAndSpaces)) {
continue;
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
index 214c56b1e6..2e5bbd7568 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
@@ -727,7 +727,7 @@ public class FpdFrameworkModules extends IInternalFrame {
if (selectedRow < 0) {
return;
}
-
+ int nextSelection = selectedRow;
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
selectedRow = sorter.getModelRowIndex(selectedRow);
@@ -761,7 +761,7 @@ public class FpdFrameworkModules extends IInternalFrame {
ffc.removeModuleSA(selectedRow);
}
catch (Exception exp) {
- JOptionPane.showMessageDialog(frame, exp.getCause() + exp.getMessage());
+ JOptionPane.showMessageDialog(frame, exp.getMessage());
return;
}
@@ -780,6 +780,10 @@ public class FpdFrameworkModules extends IInternalFrame {
}
modelFpdModules.removeRow(selectedRow);
+ if (nextSelection >= jTableFpdModules.getRowCount()) {
+ nextSelection = jTableFpdModules.getRowCount() - 1;
+ }
+ jTableFpdModules.changeSelection(nextSelection, 0, false, false);
docConsole.setSaved(false);
}
});
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
index 6ddf7ccd17..fcb78f3648 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
@@ -4,7 +4,6 @@ import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
-import javax.swing.DefaultCellEditor;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;