Code Search for Developers
 
 
  

FixtureSource.java from MASE: Agile Software Engineering at Krugle


Show FixtureSource.java syntax highlighted

package ca.ucalgary.cpsc.ebe.fitClipse.FixtureGenerater;

import java.util.StringTokenizer;



public abstract class FixtureSource {

	private String wikiData;
	public abstract String generateSource(String wikiData, String sourcePath) throws Exception;
	
	public FixtureSource(){
		
	}

	protected static String toCamelCase(String in){
		StringTokenizer tokens = new StringTokenizer(in, " ");
		String cameledResult = "";
		boolean first = true;
		while(tokens.hasMoreTokens()){
			
			String nextWord = tokens.nextToken();
			if(!first){
				char f = Character.toUpperCase(nextWord.charAt(0));
				nextWord = String.valueOf(f) + nextWord.substring(1);
				cameledResult += nextWord;
			}else{
				char f = Character.toLowerCase(nextWord.charAt(0));
				nextWord = String.valueOf(f) + nextWord.substring(1);
				cameledResult += nextWord;
				first = false;
			}
		}
		
		return cameledResult;
	}
	
	protected static String removeWhiteSpace(String in){
		
		return in.replaceAll(" ", "").replaceAll("\\.", "");
		
	}
	
	protected static String removeWikiFormatting(String in){
		String result = in;
		result = result.replaceAll("\\|", "").replaceAll("''", "");
		result = result.replaceAll("'''", "");
		result = result.replaceAll("!-", "").replaceAll("-!", "");
		
		return result;
	}
	
	protected static String[] parseJavaQName(String in) throws Exception{
		String[] result = new String[2];
		int index = in.lastIndexOf(".");
		if(index == -1){
			result[0] = "";
			result[1] = in;
			return result;
		}
		result[0] = in.substring(0, index);
		result[1] = in.substring(index + 1);
		return result;
		
	}
	
	
}




See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  ActionFixtureSource.java
  FixtureSource.java
  FixtureSourceFactory.java
  JavaClass.java
  JavaClassChild.java
  JavaFile.java
  JavaMethod.java
  JavaMethodContent.java
  JavaMethodContentNode.java
  JavaMethodParameter.java
  JavaProperty.java
  JavaSourceUtil.java