Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.antsupport;
import java.text.MessageFormat// can't use ICU, used by ant

This class exists so that the Ant integration has backwards compatibility with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
	protected void setInputHandler(Project projectString inputHandlerClassname) {
		InputHandler handler = null;
		if (inputHandlerClassname == null) {
			handler = new DefaultInputHandler();
else {
			try {
				handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
catch (ClassCastException e) {
				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.The_specified_input_handler_class_{0}"), new String[]{inputHandlerClassname}); //$NON-NLS-1$
				throw new BuildException(msge);
catch (Exception e) {
				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6"), new String[]{inputHandlerClassnamee.getClass().getName()}); //$NON-NLS-1$
				throw new BuildException(msge);
New to GrepCode? Check out our FAQ X