System.out.println(Messages.bind(Messages.CommandLineFormatting, file.getAbsolutePath())); edit.apply(doc); } else { System.err.println(Messages.bind(Messages.FormatProblem, file.getAbsolutePath())); return; String errorMessage = Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.out.println(Messages.bind(Messages.CommandLineFormatting, file.getAbsolutePath())); edit.apply(doc); } else { System.err.println(Messages.bind(Messages.FormatProblem, file.getAbsolutePath())); return; String errorMessage = Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.out.println(Messages.bind(Messages.CommandLineFormatting, file.getAbsolutePath())); edit.apply(doc); } else { System.err.println(Messages.bind(Messages.FormatProblem, file.getAbsolutePath())); return; String errorMessage = Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.out.println(Messages.bind(Messages.CommandLineFormatting, file.getAbsolutePath())); edit.apply(doc); } else { System.err.println(Messages.bind(Messages.FormatProblem, file.getAbsolutePath())); return; String errorMessage = Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.out.println(Messages.bind(Messages.CommandLineFormatting, file.getAbsolutePath())); edit.apply(doc); } else { System.err.println(Messages.bind(Messages.FormatProblem, file.getAbsolutePath())); return; String errorMessage = Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
/** * Runs the Java code formatter application */ public Object start(IApplicationContext context) throws Exception { File[] filesToFormat = processCommandLine((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS)); if (filesToFormat == null) { return IApplication.EXIT_OK; } if (!this.quiet) { if (this.configName != null) { System.out.println(Messages.bind(Messages.CommandLineConfigFile, this.configName)); } System.out.println(Messages.bind(Messages.CommandLineStart)); } final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(this.options); // format the list of files and/or directories for (int i = 0, max = filesToFormat.length; i < max; i++) { final File file = filesToFormat[i]; if (file.isDirectory()) { formatDirTree(file, codeFormatter); } else if (Util.isJavaLikeFileName(file.getPath())) { formatFile(file, codeFormatter); } } if (!this.quiet) { System.out.println(Messages.bind(Messages.CommandLineDone)); } return IApplication.EXIT_OK; } public void stop() {
/** * Runs the Java code formatter application */ public Object start(IApplicationContext context) throws Exception { File[] filesToFormat = processCommandLine((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS)); if (filesToFormat == null) { return IApplication.EXIT_OK; } if (!this.quiet) { if (this.configName != null) { System.out.println(Messages.bind(Messages.CommandLineConfigFile, this.configName)); } System.out.println(Messages.bind(Messages.CommandLineStart)); } final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(this.options); // format the list of files and/or directories for (int i = 0, max = filesToFormat.length; i < max; i++) { final File file = filesToFormat[i]; if (file.isDirectory()) { formatDirTree(file, codeFormatter); } else if (Util.isJavaLikeFileName(file.getPath())) { formatFile(file, codeFormatter); } } if (!this.quiet) { System.out.println(Messages.bind(Messages.CommandLineDone)); } return IApplication.EXIT_OK; } public void stop() {
/** * Runs the Java code formatter application */ public Object start(IApplicationContext context) throws Exception { File[] filesToFormat = processCommandLine((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS)); if (filesToFormat == null) { return IApplication.EXIT_OK; } if (!this.quiet) { if (this.configName != null) { System.out.println(Messages.bind(Messages.CommandLineConfigFile, this.configName)); } System.out.println(Messages.bind(Messages.CommandLineStart)); } final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(this.options); // format the list of files and/or directories for (int i = 0, max = filesToFormat.length; i < max; i++) { final File file = filesToFormat[i]; if (file.isDirectory()) { formatDirTree(file, codeFormatter); } else if (Util.isJavaLikeFileName(file.getPath())) { formatFile(file, codeFormatter); } } if (!this.quiet) { System.out.println(Messages.bind(Messages.CommandLineDone)); } return IApplication.EXIT_OK; } public void stop() {
/** * Bind the given message's substitution locations with the given string * values. * * @param message * the message to be manipulated * @param binding1 * An object to be inserted into the message * @param binding2 * A second object to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object binding1, Object binding2) { return bind(message, new Object[] { binding1, binding2 }); }
/** * Bind the given message's substitution locations with the given string * values. * * @param message * the message to be manipulated * @param binding1 * An object to be inserted into the message * @param binding2 * A second object to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object binding1, Object binding2) { return bind(message, new Object[] { binding1, binding2 }); }
/** * Bind the given message's substitution locations with the given string * values. * * @param message * the message to be manipulated * @param binding1 * An object to be inserted into the message * @param binding2 * A second object to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object binding1, Object binding2) { return bind(message, new Object[] { binding1, binding2 }); }
/** * Bind the given message's substitution locations with the given string * values. * * @param message * the message to be manipulated * @param binding1 * An object to be inserted into the message * @param binding2 * A second object to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object binding1, Object binding2) { return bind(message, new Object[] { binding1, binding2 }); }