|| ( this.preprocessor.isInPreprocessQueue( file.getFileName() ) );
|| ( this.preprocessor.isInPreprocessQueue( file.getFilePath() ) );
	private void processSourceDir( File sourceDir, 									TextFile[] files, 									Device device, 									boolean usePolishGui, 									String targetDir, 									long buildXmlLastModified,  									long lastCssModification,									boolean isInPolishPackage)	throws IOException	{		this.preprocessor.addVariable( "polish.source", sourceDir.getAbsolutePath() );		//System.out.println("current source dir: " + sourceDir );		// preprocess each file in that source-dir:		for (int j = 0; j < files.length; j++) {			TextFile file = files[j];			// check if file needs to be preprocessed at all:			long sourceLastModified = file.lastModified();			File targetFile = new File( targetDir					+ File.separatorChar + file.getFileName() );			long targetLastModified = targetFile.lastModified();			// preprocess this file, but only when there can			// be changes at all - this could be when			// 1. The preprocessed file does not yet exists			// 2. The source file has been modified since the last run			// 3. The build.xml has been modified since the last run			// 4. One of the polish.css files has been modified since the last run 			// when only the CSS files have changed			boolean saveInAnyCase =  ( !targetFile.exists() )					 || ( sourceLastModified > targetLastModified )					 || ( buildXmlLastModified > targetLastModified )					 || ( this.preprocessor.isInPreprocessQueue( file.getFileName() ) ); 			boolean preprocess = ( saveInAnyCase )					 || ( lastCssModification > targetLastModified);			if (   preprocess ) {				// preprocess this file:				StringList sourceCode = new StringList( file.getContent() );				// generate the class-name from the file-name:				String className = file.getFileName();				if (className.endsWith(".java")) {					className = className.substring(0, className.length() - 5 );					// in a jarfile the files always have a '/' as a path-seperator:					className = TextUtil.replace(className, '/', '.' );				}				className = TextUtil.replace(className, File.separatorChar, '.' );				// set the StyleSheet.display variable in all MIDlets				if ( (this.midletClassesByName.get( className ) != null) 						&& usePolishGui) {					insertDisplaySetting( className, sourceCode );					sourceCode.reset();				}				int result = this.preprocessor.preprocess( className, sourceCode );				// only think about saving when the file should not be skipped 				// and when it is not the StyleSheet.java file:				if (file == this.styleSheetSourceFile ) {					this.styleSheetCode = sourceCode;				} else if (file == this.localeSourceFile) {					this.localeCode = sourceCode;				} else  if (result != Preprocessor.SKIP_FILE) {					if (!isInPolishPackage) {						sourceCode.reset();						// now replace the import statements:						boolean changed = this.importConverter.processImports(usePolishGui, device.isMidp1(), sourceCode, device, this.preprocessor );						if (changed) {							result = Preprocessor.CHANGED;						}					}					// save modified file:					if ( ( saveInAnyCase ) 					  || (result == Preprocessor.CHANGED) ) 					{						//System.out.println( "preprocessed [" + className + "]." );						file.saveToDir(targetDir, sourceCode.getArray(), false );						this.numberOfChangedFiles++;					//} else {					//	System.out.println("not saving " + file.getFileName() );					}				//} else {				//	System.out.println("Skipping file " + file.getFileName() );				}			} // when preprocessing should be done.		} // for each file			}