Changeset 2179

Show
Ignore:
Timestamp:
05/22/08 14:45:44 (6 months ago)
Author:
dsugar
Message:

not particularly tested, but Anand needs some of these changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework-plugin/src/com/tresys/framework/compiler/Compiler.java

    r2143 r2179  
    547547                } 
    548548 
    549                 policy = new Policy (dictionary, linkage); 
     549                int dot = polOutputFilename.lastIndexOf ('.'); 
     550                int slash = polOutputFilename.lastIndexOf ('/'); 
     551                String moduleName = polOutputFilename; 
     552 
     553                if (dot != -1) 
     554                        moduleName = moduleName.substring (0, dot); 
     555                if (slash != -1) 
     556                        moduleName = moduleName.substring (slash + 1); 
     557 
     558                policy = new Policy (moduleName, dictionary, linkage); 
    550559                errorCount = 0; 
    551560                /* for(String policyFilename : polSourceFilenames) */ 
     
    616625                if (fcFilename != null) 
    617626                        fcFile = new File (fcFilename); 
    618  
    619                 int dot = polOutputFilename.lastIndexOf ('.'); 
    620                 int slash = polOutputFilename.lastIndexOf ('/'); 
    621                 String moduleName = polOutputFilename; 
    622  
    623                 if (dot != -1) 
    624                         moduleName = moduleName.substring (0, dot); 
    625                 if (slash != -1) 
    626                         moduleName = moduleName.substring (slash + 1); 
    627627 
    628628                if (dictionarySupportFile != null) 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/dictionary/Token.java

    r1878 r2179  
    2929        public Token specialToken; 
    3030 
    31         public Token(String image, int beginLine, int endLine, int beginColumn, 
    32                                        int endColumn, ErrorHandler errorHandler)
     31        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     32       
    3333                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
    3434        } 
     
    3939        } 
    4040         
    41         public Token() {} 
     41        protected Token() {} 
    4242 
    43         public static final Token newToken(int ofKind) { 
    44                 switch(ofKind) { 
     43        public static final Token newToken(int ofKind)  
     44        { 
     45                switch(ofKind)  
     46                { 
    4547                        default: 
    4648                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/Token.java

    r1878 r2179  
    88 * 
    99 * DictionaryParser: Lexical analyzer and parser generator source 
    10  * Version: @version@ 
     10 *  
     11 * $Date$ 
     12 * $Rev$ 
    1113 */ 
    1214 
     
    2729        public Token specialToken; 
    2830 
    29         public Token(String image, int beginLine, int endLine, int beginColumn, 
    30                                        int endColumn, ErrorHandler errorHandler)
     31        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     32       
    3133                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
    3234        } 
    3335 
    34         public Token() {} 
     36        protected Token() {} 
    3537 
    36         public Token(String i_sSubName, ErrorHandler errorHandler) { 
     38        public Token(String i_sSubName, ErrorHandler errorHandler)  
     39        { 
    3740                super(i_sSubName, errorHandler); 
    3841        } 
    3942 
    40         public static final Token newToken(int ofKind) { 
    41                 switch(ofKind) { 
     43        public static final Token newToken(int ofKind)  
     44        { 
     45                switch(ofKind)  
     46                { 
    4247                        default: 
    4348                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/flnkage/Token.java

    r1878 r2179  
    2727        public Token specialToken; 
    2828 
    29         public Token(String image, int beginLine, int endLine, int beginColumn, 
    30                                        int endColumn, ErrorHandler errorHandler)
     29        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     30       
    3131                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
    3232        } 
    3333 
    34         public Token() {} 
     34        protected Token() {} 
    3535 
    36         public Token(String i_sSubName, ErrorHandler errorHandler) { 
     36        public Token(String i_sSubName, ErrorHandler errorHandler)  
     37        { 
    3738                super(i_sSubName, errorHandler); 
    3839        } 
    3940 
    40         public static final Token newToken(int ofKind) { 
    41                 switch(ofKind) { 
     41        public static final Token newToken(int ofKind)  
     42        { 
     43                switch(ofKind)  
     44                { 
    4245                        default: 
    4346                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/Endpoint.java

    r2147 r2179  
    6666        } 
    6767                 
     68         
     69        public NetSystem getSystem () 
     70        { 
     71                return m_system; 
     72        } 
     73 
     74         
     75        /* (non-Javadoc) 
     76         * @see com.tresys.framework.compiler.policy.Component#equals(java.lang.Object) 
     77         */ 
     78        public boolean equals (Object obj) 
     79        { 
     80                if (!super.equals (obj)) 
     81                        return false; 
     82                 
     83                if (!(obj instanceof Endpoint)) 
     84                        return false; 
     85                 
     86                Endpoint other = (Endpoint) obj; 
     87                if (!getSystem ().equals (other.getSystem ())) 
     88                        return false; 
     89                 
     90                if (!getNetworkInfo ().equals (other.getNetworkInfo ())) 
     91                        return false; 
     92                 
     93                return true; 
     94        } 
     95         
     96         
    6897        /* (non-Javadoc) 
    6998         * @see java.lang.Object#toString() 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetworkAdder.java

    r2169 r2179  
    1414import com.tresys.framework.compiler.dictionary.SysResourceState; 
    1515import com.tresys.framework.compiler.policy.Policy; 
     16import com.tresys.framework.compiler.policy.NetworkResource; 
    1617import com.tresys.framework.compiler.policy.Resource; 
    17 import com.tresys.framework.compiler.policy.NetworkResource; 
    1818import com.tresys.framework.compiler.policy.Token; 
    1919import com.tresys.framework.compiler.systemResources.LabeledNetworkResource; 
     
    3737        public void Visit (NetResource i_net_resource) 
    3838        { 
    39                 Resource res = m_sysPolicy.GetResource (i_net_resource.getName ()); 
     39                String rdefName = (String) i_net_resource.get (NetResource.KEY_TYPE); 
     40                if (rdefName == null) 
     41                        return; 
    4042                 
    41                 if (res == null) 
     43                // we only care about ipsec network connections 
     44                Rdef rdef = m_sysPolicy.getDictionary ().GetRdef (rdefName); 
     45                if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) == SysResourceState.No) 
     46                        return; 
     47 
     48                NetworkResource netRes = (NetworkResource) m_sysPolicy.GetResource (i_net_resource.getName ()); 
     49                if (netRes == null) 
    4250                { 
    43                         Token token = new Token(i_net_resource.getName (), m_errorHandler); 
    44                         NetworkResource netRes = new NetworkResource(token, i_net_resource, m_sysPolicy); 
    45                         Rdef rdef = m_sysPolicy.getDictionary ().GetRdef ((String)i_net_resource.get (NetResource.KEY_TYPE)); 
     51                        Token token = new Token (i_net_resource.getName (), m_errorHandler); 
     52                        netRes = new NetworkResource(token, i_net_resource, m_sysPolicy); 
    4653                        netRes.Add (rdef, new Token (rdef.GetName(), m_errorHandler)); 
    4754 
    48                         if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) 
    49                         { 
    50                                 NetworkInfo netInfo = new NetworkInfo(null, null, null, null); 
    51                                 LabeledNetworkResource lNetRes = new LabeledNetworkResource(netInfo,rdef); 
    52                                 netRes.AddSystemResource (rdef, lNetRes); 
    53                         } 
     55                        NetworkInfo netInfo = new NetworkInfo (null, null, null, null); 
     56                        LabeledNetworkResource lNetRes = new LabeledNetworkResource (netInfo, rdef); 
     57                        netRes.AddSystemResource (rdef, lNetRes); 
     58                         
    5459                        m_sysPolicy.Add (netRes); 
     60                } 
     61                 
     62                if (netRes != null) 
     63                { 
     64                         
    5565                } 
    5666                 
     
    5969        public void Visit (NetConnection i_net_connection) 
    6070        { 
    61  
     71//              i_net_connection. 
    6272        } 
    6373 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetworkConfig.java

    r2175 r2179  
    1616import java.util.Iterator; 
    1717import java.util.Map; 
     18import java.util.Random; 
     19import java.util.Vector; 
     20 
     21import com.tresys.framework.compiler.dictionary.Rdef; 
     22import com.tresys.framework.compiler.policy.AccessNetwork; 
     23import com.tresys.framework.compiler.policy.IDomain; 
     24import com.tresys.framework.compiler.policy.NetworkResource; 
     25import com.tresys.framework.compiler.systemResources.LabeledNetworkResource; 
     26import com.tresys.framework.compiler.systemResources.NetworkInfo; 
     27import com.tresys.framework.compiler.systemResources.SystemResource; 
    1828 
    1929/** 
     
    2333public class NetworkConfig 
    2434{ 
     35        /** 
     36         * full list of network resources that are defined 
     37         */ 
    2538        private final Map m_netresources = new HashMap (); 
     39         
     40        /** 
     41         * full list of systems that are defined 
     42         */ 
    2643        private final Map m_systems = new HashMap (); 
    27         private final Map m_connections = new HashMap (); 
     44         
     45        /** 
     46         * full list of full connections (source domain to target domain through ipsec net resource) 
     47         */ 
     48        private final Map /* < NetResource, Collection <NetConnection> > */ m_connections = new HashMap (); 
     49         
     50        /** 
     51         * list of accesses (half connections) used to generate connections as found 
     52         */ 
     53        private final Map /* < NetResource, Collection < Endpoint > > */ m_endpoints = new HashMap (); 
    2854 
    2955        public NetworkConfig () 
     
    3965                        m_systems.put (sName, i_item); 
    4066                else if (i_item instanceof NetResource) 
     67                { 
    4168                        m_netresources.put (sName, i_item); 
     69                        m_endpoints.put (i_item, new Vector ()); 
     70                        m_connections.put (i_item, new Vector ()); 
     71                } 
    4272        } 
    4373 
     
    6090        public void RemoveNetResource (String i_sNetResourceName) 
    6191        { 
    62                 m_netresources.remove (i_sNetResourceName); 
     92                Object res = m_netresources.remove (i_sNetResourceName); 
     93                if (res != null) 
     94                { 
     95                        m_endpoints.remove (res); 
     96                        m_connections.remove (res); 
     97                } 
    6398        } 
    6499 
     
    77112                for (Iterator itr = m_connections.values ().iterator (); itr.hasNext ();) 
    78113                { 
    79                         i_visitor.Visit ((NetConnection) itr.next ()); 
     114                        Collection connections = (Collection) itr.next (); 
     115                        for (Iterator itr2 = connections.iterator (); itr2.hasNext (); ) 
     116                        { 
     117                                i_visitor.Visit ((NetConnection) itr2.next ()); 
     118                        } 
    80119                } 
    81120        } 
     
    93132        public Collection getNetworkItems () 
    94133        { 
    95                 Collection coll = m_systems.values (); 
     134                Collection coll = new Vector (m_systems.values ()); 
    96135                coll.addAll (m_netresources.values ()); 
    97136                return coll; 
     
    103142                        throw new IllegalArgumentException (); 
    104143 
    105                 String sName = i_connection.toString (); 
    106                 m_connections.put (sName, i_connection); 
     144                NetResource res = i_connection.getResource (); 
     145                Collection cons = (Collection) m_connections.get (res); 
     146                cons.add (i_connection); 
    107147        } 
    108148 
     
    111151                if (i_connection != null) 
    112152                { 
    113                         String sName = i_connection.toString (); 
    114                         m_connections.remove (sName); 
     153                        NetResource res = i_connection.getResource (); 
     154                        Collection cons = (Collection) m_connections.get (res); 
     155                         
     156                        cons.remove (i_connection); 
    115157                } 
    116158        } 
     
    118160        public Collection getConnections (NetResource i_res) 
    119161        { 
    120                 ArrayList list = new ArrayList (); 
    121                 if (i_res == null) 
    122                         return list; 
    123  
    124                 for (Iterator itr = m_connections.values ().iterator (); itr.hasNext ();) 
    125                 { 
    126                         NetConnection connection = (NetConnection) itr.next (); 
    127                         if (i_res.equals (connection.getResource ())) 
    128                                 list.add (connection); 
    129                 } 
    130  
    131                 return list; 
    132         } 
     162                return (Collection) m_connections.get (i_res); 
     163        } 
     164         
     165        public NetConnection getByESP (int i_nESP) 
     166        { 
     167                //TODO: this should be a simple visitor 
     168                for (Iterator itr = m_connections.values ().iterator (); itr.hasNext (); ) 
     169                { 
     170                        Collection cons = (Collection) itr.next (); 
     171                        for (Iterator itr2 = cons.iterator (); itr2.hasNext (); ) 
     172                        { 
     173                                NetConnection con = (NetConnection) itr2.next (); 
     174                                if (con.getESPNumber () == i_nESP) 
     175                                        return con; 
     176                        } 
     177                } 
     178                 
     179                return null; 
     180        } 
     181         
     182        public void accessAdded (AccessNetwork i_access) 
     183        { 
     184//              m_accesses.add (i_access); 
     185         
     186                System.out.println ("Add network access " + i_access); 
     187                 
     188                NetworkResource netResource = (NetworkResource) i_access.getResource (); 
     189 
     190                Rdef rdef = netResource.getRdef (); 
     191                SystemResource sysRes = netResource.getSystemResource (rdef); 
     192                if (!(sysRes instanceof LabeledNetworkResource)) 
     193                        return; 
     194 
     195                IDomain dom = i_access.getDomain (); 
     196                String sSysName = dom.getPolicy ().getName (); 
     197                NetSystem sys = getSystem (sSysName); 
     198 
     199                NetResource netRes = getResource (netResource.getName ()); 
     200                 
     201                LabeledNetworkResource labRes = (LabeledNetworkResource) sysRes; 
     202                 
     203                if (sys == null) 
     204                        return; 
     205/*               
     206                Collection endpoints = (Collection) m_endpoints.get (netRes); 
     207                { 
     208                        NetworkInfo netInfo = new NetworkInfo (labRes.getNetworkInfo ()); 
     209                        Token domTok = new Token (dom.getToken ()); 
     210                        Endpoint pt1 = new Endpoint (sys, domTok, netInfo);  
     211                         
     212                        endpoints.add (pt1); 
     213                } 
     214                 
     215                // loop through all the endpoints updating all possible connections 
     216                { 
     217                        Collection oldConnections = getConnections (netRes); 
     218                        Collection newConnection = new Vector (); 
     219 
     220                        for (Iterator itr = endpoints.iterator (); itr.hasNext (); ) 
     221                        { 
     222                                Endpoint ep1 = (Endpoint) itr.next (); 
     223                                 
     224                                for (Iterator itr2 = endpoints.iterator (); itr2.hasNext (); ) 
     225                                { 
     226                                        Endpoint ep2 = (Endpoint) itr2.next (); 
     227                                         
     228                                        // bypass equal endpoints 
     229                                        if (ep2.equals (ep1)) 
     230                                                continue; 
     231                                         
     232                                        // don't make SA entries for accesses on the same system 
     233                                        if (ep2.getSystem ().equals (ep1.getSystem ())) 
     234                                                continue; 
     235 
     236                                        // check for existing connection 
     237                                        boolean bFound = false; 
     238                                        for (Iterator itr3 = oldConnections.iterator (); itr3.hasNext (); ) 
     239                                        { 
     240                                                NetConnection con = (NetConnection) itr3.next (); 
     241                                                if (con.getSource ().equals (ep1) 
     242                                                        && con.getTarget ().equals (ep2)) 
     243                                                { 
     244                                                        newConnection.add (con); 
     245                                                        itr3.remove (); 
     246                                                        bFound = true; 
     247                                                } 
     248                                        } 
     249                                         
     250                                        // not found - make new 
     251                                        if (!bFound) 
     252                                        { 
     253                                                Random gen = new Random (); 
     254                                                int nESP = gen.nextInt (); 
     255                                                while (getByESP (nESP) != null) 
     256                                                        nESP = gen.nextInt (); 
     257                                                 
     258                                                NetConnection con = new NetConnection (ep1, ep2, netRes, nESP); 
     259                                                newConnection.add (con); 
     260                                        } 
     261                                } 
     262                        } 
     263                         
     264                        // update connection list 
     265                        m_connections.put (netRes, newConnection); 
     266                         
     267                } 
     268*/ 
     269        } 
     270         
     271        public void accessRemoved (AccessNetwork i_access) 
     272        { 
     273                System.out.println ("Remove network access " + i_access); 
     274         
     275                NetworkResource netResource = (NetworkResource) i_access.getResource (); 
     276 
     277                Rdef rdef = netResource.getRdef (); 
     278                SystemResource sysRes = netResource.getSystemResource (rdef); 
     279                if (!(sysRes instanceof LabeledNetworkResource)) 
     280                        return; 
     281 
     282                IDomain dom = i_access.getDomain (); 
     283                String sSysName = dom.getPolicy ().getName (); 
     284                NetSystem sys = getSystem (sSysName); 
     285 
     286                NetResource netRes = getResource (netResource.getName ()); 
     287                 
     288//              LabeledNetworkResource labRes = (LabeledNetworkResource) sysRes; 
     289                 
     290                if (sys == null) 
     291                        return; 
     292/*               
     293                Collection endpoints = (Collection) m_endpoints.get (netRes); 
     294                if (endpoints == null) 
     295                        return; 
     296                 
     297                for (Iterator itr = endpoints.iterator (); itr.hasNext (); ) 
     298                { 
     299                        Endpoint ep = (Endpoint) itr.next (); 
     300 
     301                        if (!ep.getSystem ().equals (sys)) 
     302                                continue; 
     303                         
     304                        if (!ep.getSubName ().equals (dom.getName ())) 
     305                                continue; 
     306                         
     307                        itr.remove (); 
     308                         
     309                        // remove any connections using this endpoint 
     310                        for (Iterator itr2 = getConnections (netRes).iterator (); itr2.hasNext (); ) 
     311                        { 
     312                                NetConnection con = (NetConnection) itr2.next (); 
     313                                if (con.getSource ().equals (ep) 
     314                                        || con.getTarget ().equals (ep)) 
     315                                { 
     316                                        itr2.remove (); 
     317                                } 
     318                        } 
     319                         
     320                } 
     321*/       
     322        } 
     323 
    133324} 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/Token.java

    r2113 r2179  
    99 * DictionaryParser: Lexical analyzer and parser generator source 
    1010 *  
    11  * $Rev
    12  * $Date
     11 * $Rev:2113
     12 * $Date:2008-05-12 13:08:06 -0400 (Mon, 12 May 2008)
    1313 */ 
    1414 
     
    2929        public Token specialToken; 
    3030 
    31         public Token(String image, int beginLine, int endLine, int beginColumn, 
    32                                        int endColumn, ErrorHandler errorHandler)
     31        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     32       
    3333                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
     34        } 
     35         
     36        public Token (String i_sSubName, ErrorHandler i_errorHandler) 
     37        { 
     38                super (i_sSubName, i_errorHandler); 
    3439        } 
    3540         
     
    3944        } 
    4045         
    41         public Token() {} 
     46        protected Token() {} 
    4247 
    43         public static final Token newToken(int ofKind) { 
    44                 switch(ofKind) { 
     48        public static final Token newToken(int ofKind)  
     49        { 
     50                switch(ofKind)  
     51                { 
    4552                        default: 
    4653                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/policy/Component.java

    r2113 r2179  
    129129        { 
    130130                // if we have the same reference 
    131                 if(obj == this) 
     131                if (obj == this) 
    132132                        return true; 
    133133                 
     
    283283        { 
    284284                m_subName = i_sSubName; 
     285                m_token.image = m_subName; 
    285286        } 
    286287 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/policy/Policy.java

    r2143 r2179  
    5757        private final Vector /*<String>*/ comments; 
    5858 
    59         private final Linkage linkage; 
    60  
    61         private Dictionary dictionary; 
     59        private final Linkage m_linkage; 
     60 
     61        private Dictionary m_dictionary; 
    6262 
    6363        private Map allInterfaces; 
     
    6767        private final Map /*<String, Conditional>*/frameworkBooleans; 
    6868        private String [] m_allBooleans; 
     69        private final String m_sName; 
    6970 
    7071        /** 
     
    7374         * @param _linkage              The linkage to base policy 
    7475         */ 
    75         public Policy(Dictionary dictionary, Linkage linkage)  
    76         { 
    77                 this.dictionary = dictionary; 
    78                 this.linkage = linkage; 
     76        public Policy(String i_sName, Dictionary i_dictionary, Linkage i_linkage)  
     77        { 
     78                m_dictionary = i_dictionary; 
     79                m_linkage = i_linkage; 
     80                m_sName = i_sName; 
    7981 
    8082                // initialize the policy contents 
     
    135137                try  
    136138                { 
    137                         PolicyParser parser = new PolicyParser(this, i_netConfig, dictionary); 
     139                        PolicyParser parser = new PolicyParser(this, i_netConfig, m_dictionary); 
    138140 
    139141                        File polFile = new File(polFilename); 
     
    161163                try  
    162164                { 
    163                         PolicyParser parser = new PolicyParser(this, i_netConfig, dictionary); 
     165                        PolicyParser parser = new PolicyParser(this, i_netConfig, m_dictionary); 
    164166 
    165167                        parser.Parse(polReader, handler); 
     
    533535        public Dictionary getDictionary()  
    534536        { 
    535                 return dictionary; 
     537                return m_dictionary; 
    536538        } 
    537539 
     
    785787        public Linkage getLinkage()  
    786788        { 
    787                 if(linkage == null)  
     789                if(m_linkage == null)  
    788790                { 
    789791                        System.out.println("Policy.getLinkage returns null - framework/compiler/policy/Policy.java"); 
    790792                } 
    791                 return linkage; 
    792         } 
    793  
     793                return m_linkage; 
     794        } 
     795 
     796        public String getName () 
     797        { 
     798                return m_sName; 
     799        } 
     800         
    794801        public boolean Remove(Component i_component)  
    795802        { 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/policy/Token.java

    r1878 r2179  
    2626        public Token specialToken; 
    2727 
    28         public Token(String image, int beginLine, int endLine, int beginColumn, 
    29                                        int endColumn, ErrorHandler errorHandler)
     28        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     29       
    3030                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
    3131        } 
    3232 
    33         public Token() {} 
     33        protected Token() {} 
    3434 
    35         public Token(String i_sSubName, ErrorHandler errorHandler) { 
     35        public Token(String i_sSubName, ErrorHandler errorHandler)  
     36        { 
    3637                super(i_sSubName, errorHandler); 
    3738        } 
    3839 
    39         public static final Token newToken(int ofKind) { 
    40                 switch(ofKind) { 
     40        public static final Token newToken(int ofKind)  
     41        { 
     42                switch(ofKind)  
     43                { 
    4144                        default: 
    4245                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/NetworkInfo.java

    r2135 r2179  
    3131                m_sMask = i_sMask; 
    3232                m_nPorts = i_aPorts; 
     33        } 
     34         
     35        public NetworkInfo (NetworkInfo i_copyMe) 
     36        { 
     37                m_sDevice = i_copyMe.m_sDevice; 
     38                m_sIPAddr = i_copyMe.m_sIPAddr; 
     39                m_sMask = i_copyMe.m_sMask; 
     40 
     41                if (i_copyMe.m_nPorts != null) 
     42                { 
     43                        m_nPorts = new int [i_copyMe.m_nPorts.length]; 
     44                        System.arraycopy (i_copyMe.m_nPorts, 0, m_nPorts, 0, m_nPorts.length); 
     45                } 
    3346        } 
    3447         
  • trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/Token.java

    r1878 r2179  
    2525        public Token specialToken; 
    2626 
    27         public Token(String image, int beginLine, int endLine, int beginColumn, 
    28                                        int endColumn, ErrorHandler errorHandler)
     27        public Token(String image, int beginLine, int endLine, int beginColumn, int endColumn, ErrorHandler errorHandler)  
     28       
    2929                super(image, beginLine, endLine, beginColumn, endColumn, errorHandler); 
    3030        } 
    3131 
    32         public Token() {} 
     32        protected Token() {} 
    3333 
    34         public static final Token newToken(int ofKind) { 
    35                 switch(ofKind) { 
     34        public static final Token newToken(int ofKind)  
     35        { 
     36                switch(ofKind)  
     37                { 
    3638                        default: 
    3739                                return new Token(); 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/builder/FrameworkNature.java

    r2174 r2179  
    341341                        m_networkConfiguration = new NetworkConfig (); 
    342342                        IFile fnet = getFNetFile (); 
     343                         
     344                        FrameworkNature.deleteMarkers (fnet); 
    343345                        //InputStream fnetStream = fnet.getContents (true); 
    344346                        if( fnet.exists () ) 
     
    624626                        systems.add(i_system); 
    625627                        // add the system to netconfing 
    626                         Token tok = new Token(); 
    627                         tok.image = i_system.getName (); 
     628                        Token tok = new Token(i_system.getName (), i_system.getFPOLErrorHandler ()); 
    628629                        NetSystem sys = new NetSystem(tok); 
    629630                        getNetworkConfiguration ().Add (sys); 
  • trunk/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java

    r2165 r2179  
    203203                                if (DEBUG) 
    204204                                        System.out.println("SELinuxSystem.