Bug 37919 Compiler preferences - should surface optional check for incompatible required binaries
HEAD from JDT/Core (not integrated yet) Added JavaCore optional problem to detect incompatible required binaries, so as to flag situations where some prerequisite binaries are required a JRE level higher than the project target platform; i.e. compiling against 1.4 libraries when deploying for 1.1 platform is likely unwanted. * JAVACORE / Reporting Incompatible JDK Level for Required Binaries * Indicate the severity of the problem reported when a project prerequisites another project * or library with an incompatible target JDK level (e.g. project targeting 1.1 vm, but compiled against 1.4 libraries). * - option id: "org.eclipse.jdt.core.incompatibleJDKLevel" * - possible values: { "error", "warning", "ignore" } * - default: "ignore"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerConfigurationBlock.java
status.setError(PreferencesMessages.getFormattedString("CompilerConfigurationBlock.invalid_input", number)); 
				}
			} catch (NumberFormatException e) {
				status.setError(PreferencesMessages.getFormattedString("CompilerConfigurationBlock.invalid_input", number)); 
			}
		}
		return status;
	}
	
	private IStatus validateResourceFilters() {
		String text= (String) fWorkingValues.get(PREF_RESOURCE_FILTER);
		
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
		String[] filters= getTokens(text, ","); 
		for (int i= 0; i < filters.length; i++) {
			String fileName= filters[i].replace('*', 'x');
			int resourceType= IResource.FILE;
			int lastCharacter= fileName.length() - 1;
			if (lastCharacter >= 0 && fileName.charAt(lastCharacter) == '/') {
				fileName= fileName.substring(0, lastCharacter);
				resourceType= IResource.FOLDER;
			}
			IStatus status= workspace.validateName(fileName, resourceType);
			if (status.matches(IStatus.ERROR)) {
				String message= PreferencesMessages.getFormattedString("CompilerConfigurationBlock.filter.invalidsegment.error", status.getMessage()); 
				return new StatusInfo(IStatus.ERROR, message);
			}
		}
		return new StatusInfo();
	}