]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java
1. Fix EDKT193 "Provide a Module tree when platform/package are open"
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / common / ui / IDefaultMutableTreeNode.java
index 4f7b953c81cd024754953b8c7aeecb78900d4d00..4708191ac9d26c4694d9be84e9e59e05310f5344 100644 (file)
@@ -39,9 +39,9 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
     public static final int MSA_HEADER = 100;\r
 \r
     public static final int MSA_LIBRARYCLASSDEFINITIONS = 101;\r
-    \r
+\r
     public static final int MSA_PACKAGEDEPENDENCIES = 102;\r
-    \r
+\r
     public static final int MSA_SOURCEFILES = 103;\r
 \r
     public static final int MSA_PROTOCOLS = 104;\r
@@ -60,8 +60,6 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
 \r
     public static final int MSA_DATAHUBS = 111;\r
 \r
-    //public static final int MSA_FORMSETS = 112;\r
-    \r
     public static final int MSA_HIIPACKAGES = 112;\r
 \r
     public static final int MSA_GUIDS = 113;\r
@@ -69,58 +67,64 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
     public static final int MSA_EXTERNS = 114;\r
 \r
     public static final int MSA_PCDS = 115;\r
-    \r
+\r
     public static final int MSA_BUILDOPTIONS = 117;\r
-    \r
+\r
     public static final int MSA_USEREXTENSIONS = 118;\r
-    \r
+\r
     public static final int MSA_MODULEDEFINITIONS = 119;\r
-    \r
+\r
     public static final int SPD_HEADER = 200;\r
-    \r
+\r
     public static final int SPD_LIBRARYCLASSDECLARATIONS = 201;\r
-    \r
+\r
     public static final int SPD_MSAFILES = 202;\r
-    \r
+\r
     public static final int SPD_PACKAGEHEADERS = 203;\r
-    \r
+\r
     public static final int SPD_GUIDDECLARATIONS = 204;\r
-    \r
+\r
     public static final int SPD_PROTOCOLDECLARATIONS = 205;\r
-    \r
+\r
     public static final int SPD_PPIDECLARATIONS = 206;\r
-    \r
+\r
     public static final int SPD_PCDDECLARATIONS = 207;\r
-    \r
+\r
     public static final int SPD_PACKAGEDEFINITIONS = 208;\r
-    \r
+\r
     public static final int SPD_INDUSTRYSTDINCLUDES = 209;\r
-    \r
+\r
     public static final int FPD_PLATFORMHEADER = 300;\r
-    \r
+\r
     public static final int FPD_FLASH = 301;\r
-    \r
+\r
     public static final int FPD_FRAMEWORKMODULES = 302;\r
-    \r
+\r
     public static final int FPD_PCDDYNAMICBUILDDECLARATIONS = 303;\r
-    \r
+\r
     public static final int FPD_BUILDOPTIONS = 304;\r
-    \r
+\r
     public static final int FPD_PLATFORMDEFINITIONS = 305;\r
-    \r
+\r
     public static final int WORKSPACE = 0;\r
-    \r
-    public static final int MODULE = 1;\r
 \r
-    public static final int PACKAGE = 2;\r
+    public static final int MODULE_DESCRIPTION = 1;\r
 \r
-    public static final int PLATFORM = 3;\r
-    \r
-    public static final int MODULE_PACKAGE = 4;\r
-    \r
-    public static final int MODULE_PACKAGE_LIBRARY = 5;\r
-    \r
-    public static final int MODULE_PACKAGE_MODULE = 6;\r
+    public static final int PACKAGE_DESCRIPTION = 2;\r
+\r
+    public static final int PLATFORM_DESCRIPTION = 3;\r
+\r
+    public static final int MODULE = 4;\r
+\r
+    public static final int PACKAGE = 5;\r
+\r
+    public static final int PLATFORM = 6;\r
+\r
+    public static final int MODULE_PACKAGE = 7;\r
+\r
+    public static final int MODULE_PACKAGE_LIBRARY = 8;\r
+\r
+    public static final int MODULE_PACKAGE_MODULE = 9;\r
 \r
     //\r
     //Static final definitions for operation\r
@@ -146,26 +150,13 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
     //\r
     private int category = 0;\r
 \r
-    private int operation = 0;\r
-\r
-    private int location = 0;\r
-\r
     private String nodeName = "";\r
 \r
     private boolean isOpening = false;\r
 \r
     private Identification id = null;\r
-\r
-    /**\r
-     Main class, reserved for test\r
-     \r
-     @param args\r
-     \r
-     **/\r
-    public static void main(String[] args) {\r
-        // TODO Auto-generated method stub\r
-\r
-    }\r
+    \r
+    private IDefaultMutableTreeNode belongNode = null;\r
 \r
     /**\r
      This is the default constructor\r
@@ -186,46 +177,13 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
      \r
      **/\r
     public IDefaultMutableTreeNode(String strNodeName, int intCategory, boolean bolIsOpening,\r
-                                   Identification identification) {\r
+                                   Identification identification, IDefaultMutableTreeNode idmtBelongNode) {\r
         super(strNodeName);\r
         this.nodeName = strNodeName;\r
         this.category = intCategory;\r
         this.isOpening = bolIsOpening;\r
         this.id = identification;\r
-    }\r
-\r
-    /**\r
-     This is the overrided constructor\r
-     Init clase members with input data\r
-     \r
-     @param strNodeName The name of node\r
-     @param intCategory The category of node\r
-     @param intOperation The operation of node\r
-     \r
-     **/\r
-    public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation) {\r
-        super(strNodeName);\r
-        this.nodeName = strNodeName;\r
-        this.category = intCategory;\r
-        this.operation = intOperation;\r
-    }\r
-\r
-    /**\r
-     This is the overrided constructor\r
-     Init clase members with input data\r
-     \r
-     @param strNodeName The name of node\r
-     @param intCategory The category of node\r
-     @param intOperation The operation of node\r
-     @param intLocation The location of node\r
-     \r
-     **/\r
-    public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation, int intLocation) {\r
-        super(strNodeName);\r
-        this.nodeName = strNodeName;\r
-        this.category = intCategory;\r
-        this.operation = intOperation;\r
-        this.location = intLocation;\r
+        this.belongNode = idmtBelongNode;\r
     }\r
 \r
     /**\r
@@ -268,46 +226,6 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
         this.nodeName = nodeName;\r
     }\r
 \r
-    /**\r
-     Get operation of node\r
-     \r
-     @return The operation of node\r
-     \r
-     **/\r
-    public int getOperation() {\r
-        return operation;\r
-    }\r
-\r
-    /**\r
-     Set operation of node\r
-     \r
-     @param operation The input data of node operation\r
-     \r
-     **/\r
-    public void setOperation(int operation) {\r
-        this.operation = operation;\r
-    }\r
-\r
-    /**\r
-     Get location of node\r
-     \r
-     @return The location of node\r
-     \r
-     **/\r
-    public int getLocation() {\r
-        return location;\r
-    }\r
-\r
-    /**\r
-     Set location of node\r
-     \r
-     @param location The input data of node location\r
-     \r
-     **/\r
-    public void setLocation(int location) {\r
-        this.location = location;\r
-    }\r
-\r
     /**\r
      Get identification of node\r
      \r
@@ -347,4 +265,16 @@ public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
     public void setOpening(boolean isOpening) {\r
         this.isOpening = isOpening;\r
     }\r
+    \r
+    public String toString() {\r
+        return this.nodeName;\r
+    }\r
+\r
+    public IDefaultMutableTreeNode getBelongNode() {\r
+        return belongNode;\r
+    }\r
+\r
+    public void setBelongNode(IDefaultMutableTreeNode belongNode) {\r
+        this.belongNode = belongNode;\r
+    }\r
 }\r