public Tree compile(FileEditorInput newInput)
	{		
		//IPath path = input.getPath();
		Tree tree = null;
		Path inputPath = newInput.getPath().toFile().toPath(); //path.toFile().toPath();
		IFile inputIFile = newInput.getFile();
		
		
		
		// delete all of the existing IMarkers.
		int depth = IResource.DEPTH_INFINITE;


		java.lang.reflect.Field logger;
		Object loggerValue;
		Class<?> loggerClassType;
		Object parseErrorReporter;
		Object typeErrorReporter = null;
		Object parseChecker;
		Object typeChecker;
		Object parseCheckerContext;
		Method typeCheckerContexts;
		List<Object> typeErrors;
		
		boolean typeErrorProcessing = false;
		
		this.errorLine = (this.errorColumn = 0);
		this.message = null;
		try
		{
			inputIFile.deleteMarkers(null, true, depth);
			if (this.shadowParserClass != null) {
				try
				{

					logger = loggersClass.getField("PARSER");			    			    

					loggerValue = logger.get(null);

					loggerClassType = logger.getType(); 			    

					parseErrorReporter = this.errorReporterClass.getConstructor(new Class[] { loggerClassType })
							.newInstance(new Object[] { loggerValue }); 

					parseChecker = this.parseCheckerClass.getConstructor(new Class[] { parseErrorReporter.getClass() })
							.newInstance(new Object[] { parseErrorReporter });							  

					parseCheckerContext = null;				

					try
					{
						parseCheckerContext = this.parseCheckerClass.getMethod("getCompilationUnit", new Class[] { Path.class })
								.invoke(parseChecker, new Object[] { inputPath });
						
						tree = buildTree(parseCheckerContext, null);

						
						typeErrorProcessing = true;
						
						String insight = inputPath.toString();
						Object configuration = this.configurationClass.getMethod( "buildConfiguration",new Class[] {String.class, String.class, Boolean.TYPE}).invoke(null, new Object[] { inputPath.toString(), null, new Boolean(true)});
						
						logger = loggersClass.getField("TYPE_CHECKER");
						loggerValue = logger.get(null);
						loggerClassType = logger.getType();
						
						typeErrorReporter = this.errorReporterClass.getConstructor(new Class[] { loggerClassType })
								.newInstance(new Object[] { loggerValue });
						
						//typeChecker = this.typeCheckerClass.getConstructor(null).newInstance(null);
						typeCheckerContexts = this.typeCheckerClass.getMethod("typeCheck", new Class[] { Path.class, Boolean.TYPE, typeErrorReporter.getClass() });
						
						typeErrors = (List<Object>) typeCheckerContexts.invoke(null, new Object[] { inputPath, new Boolean(true), typeErrorReporter });
						
						
					}
					catch (InvocationTargetException ex)
					{
						/*
						 * TODO: There is a problem with setting the parse and type errors. Some parser errors do no show up, such as
						 * as a missing closing brace of a method or class. The appropriate error used to be returned, but it currently
						 * returns null pointer exception. Also, the type check errors tend to only appear upon the first time a file is
						 * brought into scope. The errors that were already highlighted stopped appearing upon being saved reprocessed. 
						 */
						
						String problem = ex.getCause().toString();
						// There are issues with the displaying missing closing parenthesis error 
						
						List<Object> errorList;
						List<Object> warningList;
						
						if(typeErrorProcessing)
						{
							errorList = (List<Object>) this.errorReporterClass.getMethod("getErrorList", null).invoke(typeErrorReporter, new Object[] {});
							warningList = (List<Object>) this.errorReporterClass.getMethod("getWarningList", null).invoke(typeErrorReporter, new Object[] {});
						}else
						{
							errorList = (List<Object>) this.errorReporterClass.getMethod("getErrorList", null).invoke(parseErrorReporter, new Object[] {});
							warningList = (List<Object>) this.errorReporterClass.getMethod("getWarningList", null).invoke(parseErrorReporter, new Object[] {});
						}

						Method lineStartMethod = this.shadowExceptionClass.getMethod("lineStart", null);
						Method lineEndMethod = this.shadowExceptionClass.getMethod("lineEnd", null);
						Method columnStartMethod = this.shadowExceptionClass.getMethod("columnStart", null);
						Method columnEndMethod = this.shadowExceptionClass.getMethod("columnEnd", null);
						Method startCharacterMethod = this.shadowExceptionClass.getMethod("startCharacter", null);
						Method stopCharacterMethod = this.shadowExceptionClass.getMethod("stopCharacter", null);
						
						lineCount = 1; 
						offSet = 0;
						
						for(int i = 0; i < errorList.size(); i++)
						{
							addMarker(inputIFile, IMarker.PROBLEM, errorList.get(i).toString(), 
									(int) lineStartMethod.invoke(errorList.get(i), new Object[] {}),
									(int) lineEndMethod.invoke(errorList.get(i), new Object[] {}),
									(int) columnStartMethod.invoke(errorList.get(i), new Object[] {}),
									(int) columnEndMethod.invoke(errorList.get(i), new Object[] {}),
									IMarker.SEVERITY_ERROR, IMarker.PRIORITY_HIGH,
									(int) startCharacterMethod.invoke(errorList.get(i), new Object[] {}),
									(int) stopCharacterMethod.invoke(errorList.get(i), new Object[] {}));
						}

						lineCount = 1; 
						offSet = 0;
						
						for(int i = 0; i < warningList.size(); i++)
						{
							addMarker(inputIFile, IMarker.PROBLEM, warningList.get(i).toString(),
									(int) lineStartMethod.invoke(warningList.get(i), new Object[] {}),
									(int) lineEndMethod.invoke(warningList.get(i), new Object[] {}),
									(int) columnStartMethod.invoke(warningList.get(i), new Object[] {}),
									(int) columnEndMethod.invoke(warningList.get(i), new Object[] {}),									
									IMarker.SEVERITY_WARNING, IMarker.PRIORITY_NORMAL,
									(int) startCharacterMethod.invoke(warningList.get(i), new Object[] {}),
									(int) stopCharacterMethod.invoke(warningList.get(i), new Object[] {}));
						}
						

						String targetException = ex.getTargetException().getMessage();
						if(targetException != null)
						{
							Scanner scanner = new Scanner(ex.getTargetException().getMessage());
							//Format of error:
							//[15:9] Unexpected uint
							scanner.useDelimiter("(\\[|:|\\])");
							if(errorList.size() > 0)
							{
								this.errorLine = (int) lineStartMethod.invoke(errorList.get(0), new Object[] {}); //scanner.nextInt();
								this.errorColumn = (int) columnStartMethod.invoke(errorList.get(0), new Object[] {}); //scanner.nextInt();
							}
							this.message = scanner.next().trim();
							scanner.close();
						}
					}

					return tree;
				} catch(InvocationTargetException ex)
				{
					
				}
				catch (Exception ex)
				{
					ex.printStackTrace();
				}


			}
		} catch(CoreException ex)
		{}
		
		return null;
	}