Ignore:
Timestamp:
12/07/11 00:34:32 (13 years ago)
Author:
phdmakk
Message:

+ added functionality for the specification of resources to be ignored during processing

Location:
trunk/org.etsi.common/src/org/etsi/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.etsi.common/src/org/etsi/common/MiscTools.java

    r29 r43  
    1111import java.io.Writer; 
    1212import java.text.DecimalFormat; 
     13import java.util.regex.Matcher; 
     14import java.util.regex.Pattern; 
    1315 
    1416import org.etsi.common.exceptions.TerminationException; 
     
    170172        } 
    171173 
    172  
     174        //TODO: cloned from NamingConventionsChecker => needs to be unified and reused 
     175        public static boolean regExpMatch(String regExp, String subject) { 
     176                boolean matches = false; 
     177                Pattern pattern = Pattern.compile(regExp); 
     178                Matcher matcher = pattern.matcher(subject); 
     179//              System.out.println(regExp + " : " + subject); 
     180                if (matcher.matches()) { 
     181                        matches = true; 
     182                } 
     183                return matches; 
     184        } 
    173185} 
  • trunk/org.etsi.common/src/org/etsi/common/configuration/ConfigurationProfile.java

    r7 r43  
    88        protected String profileVersion; 
    99        protected String resourceExtensionsRegExp = "ttcn|ttcn3|3mp"; 
     10        protected String ignoredResourceRegExp = ".*IGNORED.*"; 
    1011        protected String projectExtension = "t3p"; 
    1112        protected boolean settingRecursiveProcessing = true; 
     
    9192        } 
    9293 
     94        public void setIgnoredResourceRegExt(String ignoredResourceRegExp) { 
     95                this.ignoredResourceRegExp = ignoredResourceRegExp; 
     96        } 
     97 
     98        public String getIgnoredResourceRegExp() { 
     99                return ignoredResourceRegExp; 
     100        } 
     101 
    93102} 
Note: See TracChangeset for help on using the changeset viewer.