Module Order in FV editor enhanced.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1590 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -190,7 +190,7 @@ public class FpdFileContents {
|
|||||||
return fpdFrameworkModules;
|
return fpdFrameworkModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFrameworkModuleGuid (String fvName, Vector<String> vGuid) {
|
public void getFrameworkModuleSAByFvBinding (String fvName, Vector<String[]> vGuid) {
|
||||||
if (getFrameworkModulesCount() == 0){
|
if (getFrameworkModulesCount() == 0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -208,8 +208,15 @@ public class FpdFileContents {
|
|||||||
|
|
||||||
String[] fvNames = fvBinding.split(" ");
|
String[] fvNames = fvBinding.split(" ");
|
||||||
for (int i = 0; i < fvNames.length; ++i) {
|
for (int i = 0; i < fvNames.length; ++i) {
|
||||||
|
//
|
||||||
|
// BugBug : underscore "_" should not be replaced!!!
|
||||||
|
// But Fv name FVMAIN from fdf file not consist with FV_MAIN in fpd file.
|
||||||
|
//
|
||||||
if (fvNames[i].equals(fvName) || fvNames[i].replaceAll("_", "").equals(fvName)) {
|
if (fvNames[i].equals(fvName) || fvNames[i].replaceAll("_", "").equals(fvName)) {
|
||||||
vGuid.add(moduleSa.getModuleGuid());
|
String[] sa = new String[] {moduleSa.getModuleGuid(), moduleSa.getModuleVersion(),
|
||||||
|
moduleSa.getPackageGuid(), moduleSa.getPackageVersion(),
|
||||||
|
listToString(moduleSa.getSupArchList())};
|
||||||
|
vGuid.add(sa);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -964,14 +971,9 @@ public class FpdFileContents {
|
|||||||
setFvBinding (moduleSa, newFvNameList.trim());
|
setFvBinding (moduleSa, newFvNameList.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateFvBindingInModuleSA (ModuleIdentification mi, String fvName) {
|
public void updateFvBindingInModuleSA (String moduleKey, String fvName) {
|
||||||
Vector<Object> vSupArchs = new Vector<Object>();
|
|
||||||
getPlatformDefsSupportedArchs(vSupArchs);
|
appendFvBinding (moduleKey, fvName);
|
||||||
String moduleInfo = mi.getGuid() + " " + mi.getVersion() + " " + mi.getPackageId().getGuid() + " " + mi.getPackageId().getVersion();
|
|
||||||
for (int i = 0; i < vSupArchs.size(); ++i) {
|
|
||||||
String moduleKey = moduleInfo + " " + vSupArchs.get(i);
|
|
||||||
appendFvBinding (moduleKey, fvName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFfsFileNameGuid(String moduleKey){
|
public String getFfsFileNameGuid(String moduleKey){
|
||||||
@ -1759,7 +1761,10 @@ public class FpdFileContents {
|
|||||||
for (int i = 0; i < includeModules.size(); ++i) {
|
for (int i = 0; i < includeModules.size(); ++i) {
|
||||||
cursor.beginElement(elementModule);
|
cursor.beginElement(elementModule);
|
||||||
cursor.insertAttributeWithValue("ModuleGuid", includeModules.get(i)[0]);
|
cursor.insertAttributeWithValue("ModuleGuid", includeModules.get(i)[0]);
|
||||||
cursor.insertAttributeWithValue("BaseName", includeModules.get(i)[1]);
|
cursor.insertAttributeWithValue("ModuleVersion", includeModules.get(i)[1]);
|
||||||
|
cursor.insertAttributeWithValue("PackageGuid", includeModules.get(i)[2]);
|
||||||
|
cursor.insertAttributeWithValue("PackageVersion", includeModules.get(i)[3]);
|
||||||
|
cursor.insertAttributeWithValue("Arch", includeModules.get(i)[4]);
|
||||||
cursor.toEndToken();
|
cursor.toEndToken();
|
||||||
cursor.toNextToken();
|
cursor.toNextToken();
|
||||||
}
|
}
|
||||||
@ -1807,7 +1812,10 @@ public class FpdFileContents {
|
|||||||
QName elementFvName = new QName (xmlNs, "FvName");
|
QName elementFvName = new QName (xmlNs, "FvName");
|
||||||
QName elementIncludeModules = new QName(xmlNs, "IncludeModules");
|
QName elementIncludeModules = new QName(xmlNs, "IncludeModules");
|
||||||
QName attribModuleGuid = new QName("ModuleGuid");
|
QName attribModuleGuid = new QName("ModuleGuid");
|
||||||
QName attribBaseName = new QName("BaseName");
|
QName attribModuleVersion = new QName("ModuleVersion");
|
||||||
|
QName attribPackageGuid = new QName("PackageGuid");
|
||||||
|
QName attribPackageVersion = new QName("PackageVersion");
|
||||||
|
QName attribArch = new QName("Arch");
|
||||||
|
|
||||||
if (cursor.toChild(elementUserExts)) {
|
if (cursor.toChild(elementUserExts)) {
|
||||||
do {
|
do {
|
||||||
@ -1821,7 +1829,10 @@ public class FpdFileContents {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
do {
|
do {
|
||||||
saa[i][0] = cursor.getAttributeText(attribModuleGuid);
|
saa[i][0] = cursor.getAttributeText(attribModuleGuid);
|
||||||
saa[i][1] = cursor.getAttributeText(attribBaseName);
|
saa[i][1] = cursor.getAttributeText(attribModuleVersion);
|
||||||
|
saa[i][2] = cursor.getAttributeText(attribPackageGuid);
|
||||||
|
saa[i][3] = cursor.getAttributeText(attribPackageVersion);
|
||||||
|
saa[i][4] = cursor.getAttributeText(attribArch);
|
||||||
++i;
|
++i;
|
||||||
}while (cursor.toNextSibling());
|
}while (cursor.toNextSibling());
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ import javax.swing.ListSelectionModel;
|
|||||||
|
|
||||||
import org.tianocore.PlatformSurfaceAreaDocument;
|
import org.tianocore.PlatformSurfaceAreaDocument;
|
||||||
import org.tianocore.frameworkwizard.common.DataValidation;
|
import org.tianocore.frameworkwizard.common.DataValidation;
|
||||||
import org.tianocore.frameworkwizard.common.GlobalData;
|
|
||||||
import org.tianocore.frameworkwizard.common.IDefaultTableModel;
|
import org.tianocore.frameworkwizard.common.IDefaultTableModel;
|
||||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
|
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
|
||||||
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
|
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
|
||||||
@ -39,10 +38,11 @@ import java.awt.event.ComponentAdapter;
|
|||||||
import java.awt.event.ComponentEvent;
|
import java.awt.event.ComponentEvent;
|
||||||
import java.awt.event.ItemEvent;
|
import java.awt.event.ItemEvent;
|
||||||
import java.awt.event.ItemListener;
|
import java.awt.event.ItemListener;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@ -2306,6 +2306,107 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class ModuleSAInfo {
|
||||||
|
// private int rowNumber = -1;
|
||||||
|
// private String moduleGuid = null;
|
||||||
|
// private String moduleVersion = null;
|
||||||
|
// private String packageGuid = null;
|
||||||
|
// private String packageVersion = null;
|
||||||
|
// private String arch = null;
|
||||||
|
//
|
||||||
|
// public ModuleSAInfo (String mg, String mv, String pg, String pv, String a) {
|
||||||
|
// moduleGuid = mg;
|
||||||
|
// moduleVersion = mv;
|
||||||
|
// packageGuid = pg;
|
||||||
|
// packageVersion = pv;
|
||||||
|
// arch = a;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the arch.
|
||||||
|
// */
|
||||||
|
// public String getArch() {
|
||||||
|
// return arch;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param arch The arch to set.
|
||||||
|
// */
|
||||||
|
// public void setArch(String arch) {
|
||||||
|
// this.arch = arch;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the moduleGuid.
|
||||||
|
// */
|
||||||
|
// public String getModuleGuid() {
|
||||||
|
// return moduleGuid;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param moduleGuid The moduleGuid to set.
|
||||||
|
// */
|
||||||
|
// public void setModuleGuid(String moduleGuid) {
|
||||||
|
// this.moduleGuid = moduleGuid;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the moduleVersion.
|
||||||
|
// */
|
||||||
|
// public String getModuleVersion() {
|
||||||
|
// return moduleVersion;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param moduleVersion The moduleVersion to set.
|
||||||
|
// */
|
||||||
|
// public void setModuleVersion(String moduleVersion) {
|
||||||
|
// this.moduleVersion = moduleVersion;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the packageGuid.
|
||||||
|
// */
|
||||||
|
// public String getPackageGuid() {
|
||||||
|
// return packageGuid;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param packageGuid The packageGuid to set.
|
||||||
|
// */
|
||||||
|
// public void setPackageGuid(String packageGuid) {
|
||||||
|
// this.packageGuid = packageGuid;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the packageVersion.
|
||||||
|
// */
|
||||||
|
// public String getPackageVersion() {
|
||||||
|
// return packageVersion;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param packageVersion The packageVersion to set.
|
||||||
|
// */
|
||||||
|
// public void setPackageVersion(String packageVersion) {
|
||||||
|
// this.packageVersion = packageVersion;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return Returns the rowNumber.
|
||||||
|
// */
|
||||||
|
// public int getRowNumber() {
|
||||||
|
// return rowNumber;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param rowNumber The rowNumber to set.
|
||||||
|
// */
|
||||||
|
// public void setRowNumber(int rowNumber) {
|
||||||
|
// this.rowNumber = rowNumber;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
private class ModuleOrderPane extends JPanel {
|
private class ModuleOrderPane extends JPanel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2328,8 +2429,8 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
private JButton jButtonCancel = null;
|
private JButton jButtonCancel = null;
|
||||||
private IDefaultTableModel modInFvTableModel = null;
|
private IDefaultTableModel modInFvTableModel = null;
|
||||||
private IDefaultTableModel fpdModTableModel = null;
|
private IDefaultTableModel fpdModTableModel = null;
|
||||||
private HashMap<String, ModuleIdentification> mGuidToModuleId = null;
|
// private ArrayList<ModuleSAInfo> listTableModInFvModuleSAInfo = null;
|
||||||
private ArrayList<String> listModGuidInFv = null;
|
// private ArrayList<ModuleSAInfo> listTableFpdModulesModuleSAInfo = null;
|
||||||
private String title = null;
|
private String title = null;
|
||||||
private String outputFileName = null;
|
private String outputFileName = null;
|
||||||
|
|
||||||
@ -2337,8 +2438,8 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
super(new BorderLayout());
|
super(new BorderLayout());
|
||||||
title = tabTitle;
|
title = tabTitle;
|
||||||
outputFileName = file;
|
outputFileName = file;
|
||||||
mGuidToModuleId = new HashMap<String, ModuleIdentification>();
|
// listTableModInFvModuleSAInfo = new ArrayList<ModuleSAInfo>();
|
||||||
listModGuidInFv = new ArrayList<String>();
|
// listTableFpdModulesModuleSAInfo = new ArrayList<ModuleSAInfo>();
|
||||||
add(getJPanelModOrderN(), java.awt.BorderLayout.NORTH);
|
add(getJPanelModOrderN(), java.awt.BorderLayout.NORTH);
|
||||||
add(getJPanelModOrderS(), java.awt.BorderLayout.SOUTH);
|
add(getJPanelModOrderS(), java.awt.BorderLayout.SOUTH);
|
||||||
add(getJPanelModOrderC(), java.awt.BorderLayout.CENTER);
|
add(getJPanelModOrderC(), java.awt.BorderLayout.CENTER);
|
||||||
@ -2350,34 +2451,40 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
int size = ffc.getUserExtsIncModCount(fvName);
|
int size = ffc.getUserExtsIncModCount(fvName);
|
||||||
|
|
||||||
if (size != -1) {
|
if (size != -1) {
|
||||||
String[][] saa = new String[size][2];
|
String[][] saa = new String[size][5];
|
||||||
ffc.getUserExtsIncMods(fvName, saa);
|
ffc.getUserExtsIncMods(fvName, saa);
|
||||||
|
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
listModGuidInFv.add(saa[i][0].toLowerCase());
|
String moduleKey = saa[i][0] + " " + saa[i][1] + " " + saa[i][2] + " " + saa[i][3];
|
||||||
String name = getModuleName(saa[i][0]);
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);
|
||||||
String[] row = { name };
|
String name = "N/A";
|
||||||
|
if (mi != null) {
|
||||||
|
name = mi.getName();
|
||||||
|
}
|
||||||
|
String[] row = { name, saa[i][0] , saa[i][1], saa[i][2] , saa[i][3], saa[i][4] };
|
||||||
modInFvTableModel.addRow(row);
|
modInFvTableModel.addRow(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// From ModuleSAs, get module guids with FvBinding = fvName.
|
// From ModuleSAs, get module guids with FvBinding = fvName.
|
||||||
//
|
//
|
||||||
Vector<String> vGuid = new Vector<String>();
|
Vector<String[]> vModuleSA = new Vector<String[]>();
|
||||||
ffc.getFrameworkModuleGuid(fvName, vGuid);
|
ffc.getFrameworkModuleSAByFvBinding(fvName, vModuleSA);
|
||||||
//
|
//
|
||||||
// If BuildOptions->UserExtensions already contain these module info,
|
// If BuildOptions->UserExtensions already contain these module info,
|
||||||
// no need to add them into table again.
|
// no need to add them into table again.
|
||||||
//
|
//
|
||||||
Iterator<String> iter = vGuid.iterator();
|
Iterator<String[]> iter = vModuleSA.iterator();
|
||||||
while (iter.hasNext()){
|
while (iter.hasNext()){
|
||||||
String guid = iter.next();
|
String[] sa = iter.next();
|
||||||
// String moduleName = getModuleName(guid);
|
if (!moduleInfoInTable (sa, modInFvTableModel)) {
|
||||||
// if (existedInTable(moduleName, modInFvTableModel)) {
|
String moduleKey = sa[0] + " " + sa[1] + " " + sa[2] + " " + sa[3];
|
||||||
// vGuid.remove(guid);
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);
|
||||||
// }
|
String name = "N/A";
|
||||||
if (!listModGuidInFv.contains(guid.toLowerCase())) {
|
if (mi != null) {
|
||||||
String[] row = {getModuleName(guid)};
|
name = mi.getName();
|
||||||
|
}
|
||||||
|
String[] row = { name, sa[0] , sa[1], sa[2] , sa[3], sa[4] };
|
||||||
modInFvTableModel.addRow(row);
|
modInFvTableModel.addRow(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2390,11 +2497,16 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
ffc.getFrameworkModulesInfo(saa);
|
ffc.getFrameworkModulesInfo(saa);
|
||||||
|
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
String name = getModuleName(saa[i][0]);
|
if (moduleInfoInTable(saa[i], modInFvTableModel) || moduleInfoInTable(saa[i], fpdModTableModel)) {
|
||||||
if (existedInTable(name, modInFvTableModel) || existedInTable(name, fpdModTableModel)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String[] row = {name};
|
String moduleKey = saa[i][0] + " " + saa[i][1] + " " + saa[i][2] + " " + saa[i][3];
|
||||||
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);
|
||||||
|
String name = "N/A";
|
||||||
|
if (mi != null) {
|
||||||
|
name = mi.getName();
|
||||||
|
}
|
||||||
|
String[] row = { name, saa[i][0] , saa[i][1], saa[i][2] , saa[i][3], saa[i][4] };
|
||||||
fpdModTableModel.addRow(row);
|
fpdModTableModel.addRow(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2402,29 +2514,35 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
sorter.setSortState(0, TableSorter.ASCENDING);
|
sorter.setSortState(0, TableSorter.ASCENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getModuleName (String guid) {
|
|
||||||
|
|
||||||
for (int i = 0; i < GlobalData.vModuleList.size(); ++i) {
|
private boolean moduleInfoInTable (String[] moduleInfo, DefaultTableModel model) {
|
||||||
ModuleIdentification mi = GlobalData.vModuleList.get(i);
|
boolean matched = false;
|
||||||
String mg = mi.getGuid();
|
|
||||||
if (mg == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (mg.equalsIgnoreCase(guid)) {
|
|
||||||
mGuidToModuleId.put(guid.toLowerCase(), mi);
|
|
||||||
return mi.getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean existedInTable (String name, DefaultTableModel model) {
|
|
||||||
int size = model.getDataVector().size();
|
int size = model.getDataVector().size();
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
if (((Vector)model.getDataVector().elementAt(i)).contains(name)) {
|
Vector rowData = (Vector)model.getDataVector().elementAt(i);
|
||||||
|
for (int j = 1; j < rowData.size(); ++j) {
|
||||||
|
if (rowData.elementAt(j) == null && moduleInfo[j-1] == null) {
|
||||||
|
matched = true;
|
||||||
|
}
|
||||||
|
else if (rowData.elementAt(j).equals("null") && moduleInfo[j-1] == null) {
|
||||||
|
matched = true;
|
||||||
|
}
|
||||||
|
else if (rowData.elementAt(j) == null && moduleInfo[j-1].equals("null")) {
|
||||||
|
matched = true;
|
||||||
|
}
|
||||||
|
else if (rowData.elementAt(j) != null && rowData.elementAt(j).toString().equalsIgnoreCase(moduleInfo[j-1])) {
|
||||||
|
matched = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
matched = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matched) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2497,11 +2615,77 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
private JTable getJTableModInFv() {
|
private JTable getJTableModInFv() {
|
||||||
if (jTableModInFv == null) {
|
if (jTableModInFv == null) {
|
||||||
modInFvTableModel = new IDefaultTableModel();
|
modInFvTableModel = new IDefaultTableModel();
|
||||||
|
|
||||||
|
jTableModInFv = new JTable(modInFvTableModel){
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 4903583933542581721L;
|
||||||
|
|
||||||
|
public String getToolTipText(MouseEvent e) {
|
||||||
|
String tip = null;
|
||||||
|
java.awt.Point p = e.getPoint();
|
||||||
|
int rowIndex = rowAtPoint(p);
|
||||||
|
// int colIndex = columnAtPoint(p);
|
||||||
|
// int realColumnIndex = convertColumnIndexToModel(colIndex);
|
||||||
|
|
||||||
|
TableModel model = getModel();
|
||||||
|
String mg = (String) model.getValueAt(rowIndex, 1);
|
||||||
|
String mv = (String) model.getValueAt(rowIndex, 2);
|
||||||
|
String pg = (String) model.getValueAt(rowIndex, 3);
|
||||||
|
String pv = (String) model.getValueAt(rowIndex, 4);
|
||||||
|
String arch = (String) model.getValueAt(rowIndex, 5);
|
||||||
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);
|
||||||
|
if (mi != null) {
|
||||||
|
tip = "Path: " + mi.getPath() + "; Arch: " + arch + ";";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tip = "No Module Path Information.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return tip;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
modInFvTableModel.addColumn("Module Orders in FV");
|
modInFvTableModel.addColumn("Module Orders in FV");
|
||||||
jTableModInFv = new JTable(modInFvTableModel);
|
modInFvTableModel.addColumn("mg");
|
||||||
|
modInFvTableModel.addColumn("mv");
|
||||||
|
modInFvTableModel.addColumn("pg");
|
||||||
|
modInFvTableModel.addColumn("pv");
|
||||||
|
modInFvTableModel.addColumn("arch");
|
||||||
|
|
||||||
|
for (int i = 1; i < 6; ++i) {
|
||||||
|
jTableModInFv.removeColumn(jTableModInFv.getColumnModel().getColumn(jTableModInFv.getColumnCount()-1));
|
||||||
|
}
|
||||||
|
|
||||||
jTableModInFv.setRowHeight(20);
|
jTableModInFv.setRowHeight(20);
|
||||||
jTableModInFv.setShowGrid(false);
|
jTableModInFv.setShowGrid(false);
|
||||||
|
// jTableModInFv.setAutoCreateColumnsFromModel(false);
|
||||||
|
jTableModInFv.addMouseListener(new MouseAdapter() {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent arg0) {
|
||||||
|
if (arg0.getButton() == MouseEvent.BUTTON3) {
|
||||||
|
java.awt.Point p = arg0.getPoint();
|
||||||
|
int rowIndex = jTableModInFv.rowAtPoint(p);
|
||||||
|
TableModel model = jTableModInFv.getModel();
|
||||||
|
String mg = (String) model.getValueAt(rowIndex, 1);
|
||||||
|
String mv = (String) model.getValueAt(rowIndex, 2);
|
||||||
|
String pg = (String) model.getValueAt(rowIndex, 3);
|
||||||
|
String pv = (String) model.getValueAt(rowIndex, 4);
|
||||||
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);
|
||||||
|
String details = "PackageGuid: " + pg + "; ModuleVer:" + mv + "; PkgVer:" + pv;
|
||||||
|
if (mi != null) {
|
||||||
|
details = "In Package " + mi.getPackageId().getName() + "; ModuleVer:" + mv + "; PkgVer:" + pv;
|
||||||
|
}
|
||||||
|
JOptionPane.showMessageDialog(frame, details);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return jTableModInFv;
|
return jTableModInFv;
|
||||||
}
|
}
|
||||||
@ -2550,10 +2734,76 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
if (jTableFpdModules == null) {
|
if (jTableFpdModules == null) {
|
||||||
fpdModTableModel = new IDefaultTableModel();
|
fpdModTableModel = new IDefaultTableModel();
|
||||||
TableSorter sorter = new TableSorter(fpdModTableModel);
|
TableSorter sorter = new TableSorter(fpdModTableModel);
|
||||||
jTableFpdModules = new JTable(sorter);
|
jTableFpdModules = new JTable(sorter){
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -4666296888377637808L;
|
||||||
|
|
||||||
|
public String getToolTipText(MouseEvent e) {
|
||||||
|
String tip = null;
|
||||||
|
java.awt.Point p = e.getPoint();
|
||||||
|
int rowIndex = rowAtPoint(p);
|
||||||
|
// int colIndex = columnAtPoint(p);
|
||||||
|
// int realColumnIndex = convertColumnIndexToModel(colIndex);
|
||||||
|
|
||||||
|
TableModel model = getModel();
|
||||||
|
String mg = (String) model.getValueAt(rowIndex, 1);
|
||||||
|
String mv = (String) model.getValueAt(rowIndex, 2);
|
||||||
|
String pg = (String) model.getValueAt(rowIndex, 3);
|
||||||
|
String pv = (String) model.getValueAt(rowIndex, 4);
|
||||||
|
String arch = (String) model.getValueAt(rowIndex, 5);
|
||||||
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);
|
||||||
|
if (mi != null) {
|
||||||
|
tip = "Path: " + mi.getPath() + "; Arch: " + arch + ";";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tip = "No Module Path Information.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return tip;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
fpdModTableModel.addColumn("Modules in Platform");
|
||||||
|
fpdModTableModel.addColumn("mg");
|
||||||
|
fpdModTableModel.addColumn("mv");
|
||||||
|
fpdModTableModel.addColumn("pg");
|
||||||
|
fpdModTableModel.addColumn("pv");
|
||||||
|
fpdModTableModel.addColumn("arch");
|
||||||
|
|
||||||
|
for (int i = 1; i < 6; ++i) {
|
||||||
|
jTableFpdModules.removeColumn(jTableFpdModules.getColumnModel().getColumn(jTableFpdModules.getColumnCount()-1));
|
||||||
|
}
|
||||||
jTableFpdModules.setRowHeight(20);
|
jTableFpdModules.setRowHeight(20);
|
||||||
jTableFpdModules.setShowGrid(false);
|
jTableFpdModules.setShowGrid(false);
|
||||||
fpdModTableModel.addColumn("Modules in Platform");
|
// jTableFpdModules.setAutoCreateColumnsFromModel(false);
|
||||||
|
jTableFpdModules.addMouseListener(new MouseAdapter() {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent arg0) {
|
||||||
|
if (arg0.getButton() == MouseEvent.BUTTON3) {
|
||||||
|
java.awt.Point p = arg0.getPoint();
|
||||||
|
int rowIndex = jTableFpdModules.rowAtPoint(p);
|
||||||
|
TableModel model = jTableFpdModules.getModel();
|
||||||
|
String mg = (String) model.getValueAt(rowIndex, 1);
|
||||||
|
String mv = (String) model.getValueAt(rowIndex, 2);
|
||||||
|
String pg = (String) model.getValueAt(rowIndex, 3);
|
||||||
|
String pv = (String) model.getValueAt(rowIndex, 4);
|
||||||
|
ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);
|
||||||
|
String details = "PackageGuid: " + pg + "; ModuleVer:" + mv + "; PkgVer:" + pv;
|
||||||
|
if (mi != null) {
|
||||||
|
details = "In Package " + mi.getPackageId().getName() + "; ModuleVer:" + mv + "; PkgVer:" + pv;
|
||||||
|
}
|
||||||
|
JOptionPane.showMessageDialog(frame, details);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
return jTableFpdModules;
|
return jTableFpdModules;
|
||||||
@ -2602,8 +2852,17 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int rowInModel = ((TableSorter)jTableFpdModules.getModel()).getModelRowIndex(selectedRowRight);
|
int rowInModel = ((TableSorter)jTableFpdModules.getModel()).getModelRowIndex(selectedRowRight);
|
||||||
|
String name = fpdModTableModel.getValueAt(selectedRowRight, 0)+"";
|
||||||
|
String mg = fpdModTableModel.getValueAt(selectedRowRight, 1)+"";
|
||||||
|
String mv = fpdModTableModel.getValueAt(selectedRowRight, 2)+"";
|
||||||
|
String pg = fpdModTableModel.getValueAt(selectedRowRight, 3)+"";
|
||||||
|
String pv = fpdModTableModel.getValueAt(selectedRowRight, 4)+"";
|
||||||
|
String arch = fpdModTableModel.getValueAt(selectedRowRight, 5)+"";
|
||||||
|
String[] row = {name, mg, mv, pg, pv, arch};
|
||||||
|
if (name.length() == 0 || name.equals("N/A")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String[] row = {jTableFpdModules.getValueAt(selectedRowRight, 0)+""};
|
|
||||||
int selectedRowLeft = jTableModInFv.getSelectedRow();
|
int selectedRowLeft = jTableModInFv.getSelectedRow();
|
||||||
if (selectedRowLeft < 0) {
|
if (selectedRowLeft < 0) {
|
||||||
modInFvTableModel.addRow(row);
|
modInFvTableModel.addRow(row);
|
||||||
@ -2637,7 +2896,17 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] row = {jTableModInFv.getValueAt(selectedRowLeft, 0)+""};
|
String name = modInFvTableModel.getValueAt(selectedRowLeft, 0)+"";
|
||||||
|
String mg = modInFvTableModel.getValueAt(selectedRowLeft, 1)+"";
|
||||||
|
String mv = modInFvTableModel.getValueAt(selectedRowLeft, 2)+"";
|
||||||
|
String pg = modInFvTableModel.getValueAt(selectedRowLeft, 3)+"";
|
||||||
|
String pv = modInFvTableModel.getValueAt(selectedRowLeft, 4)+"";
|
||||||
|
String arch = modInFvTableModel.getValueAt(selectedRowLeft, 5)+"";
|
||||||
|
String[] row = {name, mg, mv, pg, pv, arch};
|
||||||
|
if (name.length() == 0 || name.equals("N/A")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fpdModTableModel.addRow(row);
|
fpdModTableModel.addRow(row);
|
||||||
int viewIndex = ((TableSorter) jTableFpdModules.getModel()).getViewIndexArray()[jTableFpdModules
|
int viewIndex = ((TableSorter) jTableFpdModules.getModel()).getViewIndexArray()[jTableFpdModules
|
||||||
.getRowCount() - 1];
|
.getRowCount() - 1];
|
||||||
@ -2694,23 +2963,22 @@ public class FpdFlash extends IInternalFrame {
|
|||||||
//
|
//
|
||||||
Vector<String[]> vModInFv = new Vector<String[]>();
|
Vector<String[]> vModInFv = new Vector<String[]>();
|
||||||
for (int i = 0; i < jTableModInFv.getRowCount(); ++i) {
|
for (int i = 0; i < jTableModInFv.getRowCount(); ++i) {
|
||||||
String moduleName = jTableModInFv.getValueAt(i, 0)+"";
|
String moduleName = modInFvTableModel.getValueAt(i, 0)+"";
|
||||||
if (moduleName.length() == 0) {
|
if (moduleName.length() == 0 || moduleName.equals("N/A")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ModuleIdentification mi = null;
|
|
||||||
Set<String> key = mGuidToModuleId.keySet();
|
String mg = modInFvTableModel.getValueAt(i, 1)+"";
|
||||||
Iterator<String> iter = key.iterator();
|
String mv = modInFvTableModel.getValueAt(i, 2)+"";
|
||||||
while (iter.hasNext()) {
|
String pg = modInFvTableModel.getValueAt(i, 3)+"";
|
||||||
String guid = iter.next();
|
String pv = modInFvTableModel.getValueAt(i, 4)+"";
|
||||||
mi = mGuidToModuleId.get(guid);
|
String arch = modInFvTableModel.getValueAt(i, 5)+"";
|
||||||
if (mi.getName().equals(moduleName)) {
|
|
||||||
String[] sa = {guid, WorkspaceProfile.getModuleBaseName(mi)};
|
String moduleInfo = mg + " " + mv + " " + pg + " " + pv + " " + arch;
|
||||||
vModInFv.add(sa);
|
|
||||||
ffc.updateFvBindingInModuleSA (mi, title);
|
String[] sa = { mg, mv, pg, pv, arch};
|
||||||
break;
|
vModInFv.add(sa);
|
||||||
}
|
ffc.updateFvBindingInModuleSA(moduleInfo, title);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ffc.removeBuildOptionsUserExtensions(title);
|
ffc.removeBuildOptionsUserExtensions(title);
|
||||||
|
Reference in New Issue
Block a user