protected String replaceSupers(String aCode)
	{

		// constructors
		int pos = -2;
		while (pos != -1) {
			if (pos != -2) {
				HumboldtJS.showLog("Rewriting call to constructor super", 3);
				String theFirstPart = aCode.substring(0, pos);
				String theSecondPart = aCode.substring(pos + 5);
				if (mRoot.mExtends.equals("")) {
					aCode = theFirstPart + "/* super(); */";
					pos = aCode.length();
				} else {
					aCode = theFirstPart + "__hjs.sup(this, " + replaceClassPackages(mRoot.mExtends) + ")";
					pos = aCode.length();
					aCode += theSecondPart;
				}
			}
			
			pos = HumboldtJSString.indexOfTokenWithPrePost(aCode, "super", " (.{", " (", pos, false, true);
		}

		// super methods
		pos = -2;
		while (pos != -1) {
			if (pos != -2) {
				String theFirstPart = aCode.substring(0, pos);
				String theSecondPart = aCode.substring(pos + 5);
				String theProperty = "";

				boolean hasFinished = theSecondPart.length() == 0;
				String chars = " +-=/*<>!&|;)(,";
				while (!hasFinished) {
					char theChar = theSecondPart.charAt(0);
					if (chars.indexOf(theChar) != -1) hasFinished = true;

					if (!hasFinished) {
						theSecondPart = theSecondPart.substring(1);
						theProperty += theChar;
					}
					if (theSecondPart.length() == 0) hasFinished = true;
				}
				
				HumboldtJS.showLog("Rewriting call to super" + theProperty, 3);
				aCode = theFirstPart + "__hjs.sup(this, " + replaceClassPackages(mRoot.mExtends + theProperty) + ")";

				pos = aCode.length();
				aCode += theSecondPart;
			}
			pos = HumboldtJSString.indexOfTokenWithPrePost(aCode, "super", " (.{", ".", pos, false, true);
		}
		
		return aCode;
	}