|
From: Christopher W. <caw...@us...> - 2005-12-13 20:00:00
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7549/src/org/rubypeople/rdt/internal/core/util Modified Files: Util.java CharOperation.java Added Files: Messages.java Log Message: implement Ticket #46 (Update code folding on current working copy/editor) Index: CharOperation.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CharOperation.java 2 Mar 2005 00:53:59 -0000 1.2 --- CharOperation.java 13 Dec 2005 19:59:47 -0000 1.3 *************** *** 669,671 **** --- 669,735 ---- return -1; } + + /** + * Answers true if the two arrays are identical character by character, otherwise false. + * The equality is case sensitive. + * <br> + * <br> + * For example: + * <ol> + * <li><pre> + * first = null + * second = null + * result => true + * </pre> + * </li> + * <li><pre> + * first = { { } } + * second = null + * result => false + * </pre> + * </li> + * <li><pre> + * first = { { 'a' } } + * second = { { 'a' } } + * result => true + * </pre> + * </li> + * <li><pre> + * first = { { 'A' } } + * second = { { 'a' } } + * result => false + * </pre> + * </li> + * </ol> + * @param first the first array + * @param second the second array + * @return true if the two arrays are identical character by character, otherwise false + */ + public static final boolean equals(char[][] first, char[][] second) { + if (first == second) + return true; + if (first == null || second == null) + return false; + if (first.length != second.length) + return false; + + for (int i = first.length; --i >= 0;) + if (!equals(first[i], second[i])) + return false; + return true; + } + + public static final boolean equals(String[] first, String[] second) { + if (first == second) + return true; + if (first == null || second == null) + return false; + if (first.length != second.length) + return false; + + for (int i = first.length; --i >= 0;) + if (!first[i].equals(second[i])) + return false; + return true; + } } Index: Util.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Util.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Util.java 11 Mar 2005 01:59:47 -0000 1.4 --- Util.java 13 Dec 2005 19:59:47 -0000 1.5 *************** *** 13,17 **** --- 13,20 ---- import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; + import org.eclipse.core.runtime.Status; import org.rubypeople.rdt.core.RubyConventions; + import org.rubypeople.rdt.core.RubyCore; + import org.rubypeople.rdt.core.RubyModelException; /** *************** *** 21,268 **** public class Util { ! /* Bundle containing messages */ ! protected static ResourceBundle bundle; ! private final static String bundleName = "org.rubypeople.rdt.internal.core.util.messages"; //$NON-NLS-1$ ! private final static char[] DOUBLE_QUOTES = "''".toCharArray(); //$NON-NLS-1$ ! private final static char[] SINGLE_QUOTE = "'".toCharArray(); //$NON-NLS-1$ ! static { ! relocalize(); ! } ! private Util() { ! // cannot be instantiated ! } ! /** ! * Creates a NLS catalog for the given locale. ! */ ! public static void relocalize() { ! try { ! bundle = ResourceBundle.getBundle(bundleName, Locale.getDefault()); ! } catch (MissingResourceException e) { ! System.out.println("Missing resource : " + bundleName.replace('.', '/') + ".properties for locale " + Locale.getDefault()); //$NON-NLS-1$//$NON-NLS-2$ ! throw e; ! } ! } ! /** ! * Lookup the message with the given ID in this catalog ! */ ! public static String bind(String id) { ! return bind(id, (String[]) null); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given string values. ! */ ! public static String bind(String id, String[] arguments) { ! if (id == null) return "No message available"; //$NON-NLS-1$ ! String message = null; ! try { ! message = bundle.getString(id); ! } catch (MissingResourceException e) { ! // If we got an exception looking for the message, fail gracefully ! // by just returning ! // the id we were looking for. In most cases this is ! // semi-informative so is not too bad. ! return "Missing message: " + id + " in: " + bundleName; //$NON-NLS-2$ //$NON-NLS-1$ ! } ! // for compatibility with MessageFormat which eliminates double quotes ! // in original message ! char[] messageWithNoDoubleQuotes = CharOperation.replace(message.toCharArray(), DOUBLE_QUOTES, SINGLE_QUOTE); ! if (arguments == null) return new String(messageWithNoDoubleQuotes); ! int length = messageWithNoDoubleQuotes.length; ! int start = 0; ! int end = length; ! StringBuffer output = null; ! while (true) { ! if ((end = CharOperation.indexOf('{', messageWithNoDoubleQuotes, start)) > -1) { ! if (output == null) output = new StringBuffer(length + arguments.length * 20); ! output.append(messageWithNoDoubleQuotes, start, end - start); ! if ((start = CharOperation.indexOf('}', messageWithNoDoubleQuotes, end + 1)) > -1) { ! int index = -1; ! String argId = new String(messageWithNoDoubleQuotes, end + 1, start - end - 1); ! try { ! index = Integer.parseInt(argId); ! if (arguments[index] == null) { ! output.append('{').append(argId).append('}'); // leave ! // parameter ! // in ! // since ! // no ! // better ! // arg ! // '{0}' ! } else { ! output.append(arguments[index]); ! } ! } catch (NumberFormatException nfe) { // could be nested ! // message ID ! // {compiler.name} ! boolean done = false; ! if (!id.equals(argId)) { ! String argMessage = null; ! try { ! argMessage = bundle.getString(argId); ! output.append(argMessage); ! done = true; ! } catch (MissingResourceException e) { ! // unable to bind argument, ignore (will leave ! // argument in) ! } ! } ! if (!done) output.append(messageWithNoDoubleQuotes, end + 1, start - end); ! } catch (ArrayIndexOutOfBoundsException e) { ! output.append("{missing " + Integer.toString(index) + "}"); //$NON-NLS-2$ //$NON-NLS-1$ ! } ! start++; ! } else { ! output.append(messageWithNoDoubleQuotes, end, length); ! break; ! } ! } else { ! if (output == null) return new String(messageWithNoDoubleQuotes); ! output.append(messageWithNoDoubleQuotes, start, length - start); ! break; ! } ! } ! return output.toString(); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given string. ! */ ! public static String bind(String id, String binding) { ! return bind(id, new String[] { binding}); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given strings. ! */ ! public static String bind(String id, String binding1, String binding2) { ! return bind(id, new String[] { binding1, binding2}); ! } ! /* ! * Returns whether the given resource path matches one of the ! * inclusion/exclusion patterns. NOTE: should not be asked directly using ! * pkg root pathes ! * ! * @see IClasspathEntry#getInclusionPatterns ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(IPath resourcePath, char[][] inclusionPatterns, char[][] exclusionPatterns, boolean isFolderPath) { ! if (inclusionPatterns == null && exclusionPatterns == null) return false; ! return isExcluded(resourcePath.toString().toCharArray(), inclusionPatterns, exclusionPatterns, isFolderPath); ! } ! /* ! * Returns whether the given resource matches one of the exclusion patterns. ! * NOTE: should not be asked directly using pkg root pathes ! * ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(IResource resource, char[][] inclusionPatterns, char[][] exclusionPatterns) { ! IPath path = resource.getFullPath(); ! // ensure that folders are only excluded if all of their children are ! // excluded ! return isExcluded(path, inclusionPatterns, exclusionPatterns, resource.getType() == IResource.FOLDER); ! } ! /* ! * TODO (philippe) should consider promoting it to CharOperation Returns ! * whether the given resource path matches one of the inclusion/exclusion ! * patterns. NOTE: should not be asked directly using pkg root pathes ! * ! * @see IClasspathEntry#getInclusionPatterns ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(char[] path, char[][] inclusionPatterns, char[][] exclusionPatterns, boolean isFolderPath) { ! if (inclusionPatterns == null && exclusionPatterns == null) return false; ! inclusionCheck: if (inclusionPatterns != null) { ! for (int i = 0, length = inclusionPatterns.length; i < length; i++) { ! char[] pattern = inclusionPatterns[i]; ! char[] folderPattern = pattern; ! if (isFolderPath) { ! int lastSlash = CharOperation.lastIndexOf('/', pattern); ! if (lastSlash != -1 && lastSlash != pattern.length - 1) { // trailing ! // slash ! // -> ! // adds ! // '**' ! // for ! // free ! // (see ! // http://ant.apache.org/manual/dirtasks.html) ! int star = CharOperation.indexOf('*', pattern, lastSlash); ! if ((star == -1 || star >= pattern.length - 1 || pattern[star + 1] != '*')) { ! folderPattern = CharOperation.subarray(pattern, 0, lastSlash); ! } ! } ! } ! if (CharOperation.pathMatch(folderPattern, path, true, '/')) { ! break inclusionCheck; ! } ! } ! return true; // never included ! } ! if (isFolderPath) { ! path = CharOperation.concat(path, new char[] { '*'}, '/'); ! } ! exclusionCheck: if (exclusionPatterns != null) { ! for (int i = 0, length = exclusionPatterns.length; i < length; i++) { ! if (CharOperation.pathMatch(exclusionPatterns[i], path, true, '/')) { return true; } ! } ! } ! return false; ! } ! public static void verbose(String log) { ! verbose(log, System.out); ! } ! public static synchronized void verbose(String log, PrintStream printStream) { ! int start = 0; ! do { ! int end = log.indexOf('\n', start); ! printStream.print(Thread.currentThread()); ! printStream.print(" "); //$NON-NLS-1$ ! printStream.print(log.substring(start, end == -1 ? log.length() : end + 1)); ! start = end + 1; ! } while (start != 0); ! printStream.println(); ! } ! public static boolean isRubyLikeFileName(String name) { ! return name.endsWith(".rb") || name.endsWith(".rbw"); ! } ! /** ! * Validate the given compilation unit name. A compilation unit name must ! * obey the following rules: ! * <ul> ! * <li> it must not be null ! * <li> it must include the <code>".rb"</code> or <code>".rbw"</code> suffix ! * <li> its prefix must be a valid identifier ! * </ul> ! * </p> ! * ! * @param name ! * the name of a compilation unit ! * @return a status object with code <code>IStatus.OK</code> if the given ! * name is valid as a compilation unit name, otherwise a status ! * object indicating what is wrong with the name ! */ ! public static boolean isValidRubyScriptName(String name) { ! return RubyConventions.validateRubyScriptName(name).getSeverity() != IStatus.ERROR; ! } } --- 24,314 ---- public class Util { ! /* Bundle containing messages */ ! protected static ResourceBundle bundle; ! private final static String bundleName = "org.rubypeople.rdt.internal.core.util.messages"; //$NON-NLS-1$ ! private final static char[] DOUBLE_QUOTES = "''".toCharArray(); //$NON-NLS-1$ ! private final static char[] SINGLE_QUOTE = "'".toCharArray(); //$NON-NLS-1$ ! static { ! relocalize(); ! } ! private Util() { ! // cannot be instantiated ! } ! /** ! * Creates a NLS catalog for the given locale. ! */ ! public static void relocalize() { ! try { ! bundle = ResourceBundle.getBundle(bundleName, Locale.getDefault()); ! } catch (MissingResourceException e) { ! System.out ! .println("Missing resource : " + bundleName.replace('.', '/') + ".properties for locale " + Locale.getDefault()); //$NON-NLS-1$//$NON-NLS-2$ ! throw e; ! } ! } ! /** ! * Lookup the message with the given ID in this catalog ! */ ! public static String bind(String id) { ! return bind(id, (String[]) null); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given string values. ! */ ! public static String bind(String id, String[] arguments) { ! if (id == null) return "No message available"; //$NON-NLS-1$ ! String message = null; ! try { ! message = bundle.getString(id); ! } catch (MissingResourceException e) { ! // If we got an exception looking for the message, fail gracefully ! // by just returning ! // the id we were looking for. In most cases this is ! // semi-informative so is not too bad. ! return "Missing message: " + id + " in: " + bundleName; //$NON-NLS-2$ //$NON-NLS-1$ ! } ! // for compatibility with MessageFormat which eliminates double quotes ! // in original message ! char[] messageWithNoDoubleQuotes = CharOperation.replace(message.toCharArray(), ! DOUBLE_QUOTES, SINGLE_QUOTE); ! if (arguments == null) return new String(messageWithNoDoubleQuotes); ! int length = messageWithNoDoubleQuotes.length; ! int start = 0; ! int end = length; ! StringBuffer output = null; ! while (true) { ! if ((end = CharOperation.indexOf('{', messageWithNoDoubleQuotes, start)) > -1) { ! if (output == null) output = new StringBuffer(length + arguments.length * 20); ! output.append(messageWithNoDoubleQuotes, start, end - start); ! if ((start = CharOperation.indexOf('}', messageWithNoDoubleQuotes, end + 1)) > -1) { ! int index = -1; ! String argId = new String(messageWithNoDoubleQuotes, end + 1, start - end - 1); ! try { ! index = Integer.parseInt(argId); ! if (arguments[index] == null) { ! output.append('{').append(argId).append('}'); // leave ! // parameter ! // in ! // since ! // no ! // better ! // arg ! // '{0}' ! } else { ! output.append(arguments[index]); ! } ! } catch (NumberFormatException nfe) { // could be nested ! // message ID ! // {compiler.name} ! boolean done = false; ! if (!id.equals(argId)) { ! String argMessage = null; ! try { ! argMessage = bundle.getString(argId); ! output.append(argMessage); ! done = true; ! } catch (MissingResourceException e) { ! // unable to bind argument, ignore (will leave ! // argument in) ! } ! } ! if (!done) output.append(messageWithNoDoubleQuotes, end + 1, start - end); ! } catch (ArrayIndexOutOfBoundsException e) { ! output.append("{missing " + Integer.toString(index) + "}"); //$NON-NLS-2$ //$NON-NLS-1$ ! } ! start++; ! } else { ! output.append(messageWithNoDoubleQuotes, end, length); ! break; ! } ! } else { ! if (output == null) return new String(messageWithNoDoubleQuotes); ! output.append(messageWithNoDoubleQuotes, start, length - start); ! break; ! } ! } ! return output.toString(); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given string. ! */ ! public static String bind(String id, String binding) { ! return bind(id, new String[] { binding}); ! } ! /** ! * Lookup the message with the given ID in this catalog and bind its ! * substitution locations with the given strings. ! */ ! public static String bind(String id, String binding1, String binding2) { ! return bind(id, new String[] { binding1, binding2}); ! } ! /* ! * Returns whether the given resource path matches one of the ! * inclusion/exclusion patterns. NOTE: should not be asked directly using ! * pkg root pathes ! * ! * @see IClasspathEntry#getInclusionPatterns ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(IPath resourcePath, char[][] inclusionPatterns, ! char[][] exclusionPatterns, boolean isFolderPath) { ! if (inclusionPatterns == null && exclusionPatterns == null) return false; ! return isExcluded(resourcePath.toString().toCharArray(), inclusionPatterns, ! exclusionPatterns, isFolderPath); ! } ! /* ! * Returns whether the given resource matches one of the exclusion patterns. ! * NOTE: should not be asked directly using pkg root pathes ! * ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(IResource resource, char[][] inclusionPatterns, ! char[][] exclusionPatterns) { ! IPath path = resource.getFullPath(); ! // ensure that folders are only excluded if all of their children are ! // excluded ! return isExcluded(path, inclusionPatterns, exclusionPatterns, ! resource.getType() == IResource.FOLDER); ! } ! /* ! * TODO (philippe) should consider promoting it to CharOperation Returns ! * whether the given resource path matches one of the inclusion/exclusion ! * patterns. NOTE: should not be asked directly using pkg root pathes ! * ! * @see IClasspathEntry#getInclusionPatterns ! * @see IClasspathEntry#getExclusionPatterns ! */ ! public final static boolean isExcluded(char[] path, char[][] inclusionPatterns, ! char[][] exclusionPatterns, boolean isFolderPath) { ! if (inclusionPatterns == null && exclusionPatterns == null) return false; ! inclusionCheck: if (inclusionPatterns != null) { ! for (int i = 0, length = inclusionPatterns.length; i < length; i++) { ! char[] pattern = inclusionPatterns[i]; ! char[] folderPattern = pattern; ! if (isFolderPath) { ! int lastSlash = CharOperation.lastIndexOf('/', pattern); ! if (lastSlash != -1 && lastSlash != pattern.length - 1) { // trailing ! // slash ! // -> ! // adds ! // '**' ! // for ! // free ! // (see ! // http://ant.apache.org/manual/dirtasks.html) ! int star = CharOperation.indexOf('*', pattern, lastSlash); ! if ((star == -1 || star >= pattern.length - 1 || pattern[star + 1] != '*')) { ! folderPattern = CharOperation.subarray(pattern, 0, lastSlash); ! } ! } ! } ! if (CharOperation.pathMatch(folderPattern, path, true, '/')) { ! break inclusionCheck; ! } ! } ! return true; // never included ! } ! if (isFolderPath) { ! path = CharOperation.concat(path, new char[] { '*'}, '/'); ! } ! exclusionCheck: if (exclusionPatterns != null) { ! for (int i = 0, length = exclusionPatterns.length; i < length; i++) { ! if (CharOperation.pathMatch(exclusionPatterns[i], path, true, '/')) { return true; } ! } ! } ! return false; ! } ! public static void verbose(String log) { ! verbose(log, System.out); ! } ! public static synchronized void verbose(String log, PrintStream printStream) { ! int start = 0; ! do { ! int end = log.indexOf('\n', start); ! printStream.print(Thread.currentThread()); ! printStream.print(" "); //$NON-NLS-1$ ! printStream.print(log.substring(start, end == -1 ? log.length() : end + 1)); ! start = end + 1; ! } while (start != 0); ! printStream.println(); ! } ! public static boolean isRubyLikeFileName(String name) { ! return name.endsWith(".rb") || name.endsWith(".rbw"); ! } ! /** ! * Validate the given compilation unit name. A compilation unit name must ! * obey the following rules: ! * <ul> ! * <li> it must not be null ! * <li> it must include the <code>".rb"</code> or <code>".rbw"</code> ! * suffix ! * <li> its prefix must be a valid identifier ! * </ul> ! * </p> ! * ! * @param name ! * the name of a compilation unit ! * @return a status object with code <code>IStatus.OK</code> if the given ! * name is valid as a compilation unit name, otherwise a status ! * object indicating what is wrong with the name ! */ ! public static boolean isValidRubyScriptName(String name) { ! return RubyConventions.validateRubyScriptName(name).getSeverity() != IStatus.ERROR; ! } ! ! /** ! * Compares two arrays using equals() on the elements. Either or both arrays ! * may be null. Returns true if both are null. Returns false if only one is ! * null. If both are arrays, returns true iff they have the same length and ! * all elements compare true with equals. ! */ ! public static boolean equalArraysOrNull(Object[] a, Object[] b) { ! if (a == b) return true; ! if (a == null || b == null) return false; ! ! int len = a.length; ! if (len != b.length) return false; ! for (int i = 0; i < len; ++i) { ! if (a[i] == null) { ! if (b[i] != null) return false; ! } else { ! if (!a[i].equals(b[i])) return false; ! } ! } ! return true; ! } ! ! /* ! * Add a log entry ! */ ! public static void log(Throwable e, String message) { ! Throwable nestedException; ! if (e instanceof RubyModelException ! && (nestedException = ((RubyModelException) e).getException()) != null) { ! e = nestedException; ! } ! IStatus status = new Status(IStatus.ERROR, RubyCore.PLUGIN_ID, IStatus.ERROR, message, e); ! RubyCore.getPlugin().getLog().log(status); ! } } --- NEW FILE: Messages.java --- /******************************************************************************* * Copyright (c) 2000, 2005 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.rubypeople.rdt.internal.core.util; import java.text.MessageFormat; import org.eclipse.osgi.util.NLS; public final class Messages extends NLS { private static final String BUNDLE_NAME = "org.rubypeople.rdt.internal.core.util.messages";//$NON-NLS-1$ private Messages() { // Do not instantiate } public static String hierarchy_nullProject; public static String hierarchy_nullRegion; public static String hierarchy_nullFocusType; public static String hierarchy_creating; public static String hierarchy_creatingOnType; public static String element_doesNotExist; public static String element_notOnClasspath; public static String element_invalidClassFileName; public static String element_reconciling; public static String element_attachingSource; public static String element_invalidResourceForProject; public static String element_nullName; public static String element_nullType; public static String element_illegalParent; public static String sourcetype_invalidName; public static String operation_needElements; public static String operation_needName; public static String operation_needPath; public static String operation_needAbsolutePath; public static String operation_needString; public static String operation_notSupported; public static String operation_cancelled; public static String operation_nullContainer; public static String operation_nullName; public static String operation_copyElementProgress; public static String operation_moveElementProgress; public static String operation_renameElementProgress; public static String operation_copyResourceProgress; public static String operation_moveResourceProgress; public static String operation_renameResourceProgress; public static String operation_createUnitProgress; public static String operation_createFieldProgress; public static String operation_createImportsProgress; public static String operation_createInitializerProgress; public static String operation_createMethodProgress; public static String operation_createPackageProgress; public static String operation_createPackageFragmentProgress; public static String operation_createTypeProgress; public static String operation_deleteElementProgress; public static String operation_deleteResourceProgress; public static String operation_cannotRenameDefaultPackage; public static String operation_pathOutsideProject; public static String operation_sortelements; public static String workingCopy_commit; public static String build_preparingBuild; public static String build_readStateProgress; public static String build_saveStateProgress; public static String build_saveStateComplete; public static String build_readingDelta; public static String build_analyzingDeltas; public static String build_analyzingSources; public static String build_cleaningOutput; public static String build_copyingResources; public static String build_compiling; public static String build_foundHeader; public static String build_fixedHeader; public static String build_oneError; public static String build_oneWarning; public static String build_multipleErrors; public static String build_multipleWarnings; public static String build_done; public static String build_wrongFileFormat; public static String build_cannotSaveState; public static String build_cannotSaveStates; public static String build_initializationError; public static String build_serializationError; public static String build_classFileCollision; public static String build_duplicateClassFile; public static String build_duplicateResource; public static String build_inconsistentClassFile; public static String build_inconsistentProject; public static String build_incompleteClassPath; public static String build_missingSourceFile; public static String build_prereqProjectHasClasspathProblems; public static String build_prereqProjectMustBeRebuilt; public static String build_abortDueToClasspathProblems; public static String status_cannotUseDeviceOnPath; public static String status_coreException; public static String status_defaultPackageReadOnly; public static String status_evaluationError; public static String status_JDOMError; public static String status_IOException; public static String status_indexOutOfBounds; public static String status_invalidContents; public static String status_invalidDestination; public static String status_invalidName; public static String status_invalidPackage; public static String status_invalidPath; public static String status_invalidProject; public static String status_invalidResource; public static String status_invalidResourceType; public static String status_invalidSibling; public static String status_nameCollision; public static String status_noLocalContents; public static String status_OK; public static String status_readOnly; public static String status_targetException; public static String status_updateConflict; public static String classpath_buildPath; public static String classpath_cannotNestEntryInEntry; public static String classpath_cannotNestEntryInLibrary; public static String classpath_cannotNestEntryInOutput; public static String classpath_cannotNestOutputInEntry; public static String classpath_cannotNestOutputInOutput; public static String classpath_cannotReadClasspathFile; public static String classpath_cannotReferToItself; public static String classpath_cannotUseDistinctSourceFolderAsOutput; public static String classpath_cannotUseLibraryAsOutput; public static String classpath_closedProject; public static String classpath_couldNotWriteClasspathFile; public static String classpath_cycle; public static String classpath_duplicateEntryPath; public static String classpath_illegalContainerPath; public static String classpath_illegalEntryInClasspathFile; public static String classpath_illegalLibraryPath; public static String classpath_illegalLibraryArchive; public static String classpath_illegalExternalFolder; public static String classpath_illegalProjectPath; public static String classpath_illegalSourceFolderPath; public static String classpath_illegalVariablePath; public static String classpath_invalidClasspathInClasspathFile; public static String classpath_invalidContainer; public static String classpath_mustEndWithSlash; public static String classpath_unboundContainerPath; public static String classpath_unboundLibrary; public static String classpath_unboundProject; public static String classpath_settingOutputLocationProgress; public static String classpath_settingProgress; public static String classpath_unboundSourceAttachment; public static String classpath_unboundSourceFolder; public static String classpath_unboundVariablePath; public static String classpath_unknownKind; public static String classpath_xmlFormatError; public static String classpath_disabledInclusionExclusionPatterns; public static String classpath_disabledMultipleOutputLocations; public static String classpath_incompatibleLibraryJDKLevel; public static String classpath_duplicateEntryExtraAttribute; public static String file_notFound; public static String file_badFormat; public static String path_nullPath; public static String path_mustBeAbsolute; public static String cache_invalidLoadFactor; public static String savedState_jobName; public static String javamodel_initialization; public static String restrictedAccess_project; public static String restrictedAccess_library; public static String convention_unit_nullName; public static String convention_unit_notJavaName; public static String convention_classFile_nullName; public static String convention_classFile_notClassFileName; public static String convention_illegalIdentifier; public static String convention_import_nullImport; public static String convention_import_unqualifiedImport; public static String convention_type_nullName; public static String convention_type_nameWithBlanks; public static String convention_type_dollarName; public static String convention_type_lowercaseName; public static String convention_type_invalidName; public static String convention_package_nullName; public static String convention_package_emptyName; public static String convention_package_dotName; public static String convention_package_nameWithBlanks; public static String convention_package_consecutiveDotsName; public static String convention_package_uppercaseName; public static String dom_cannotDetail; public static String dom_nullTypeParameter; public static String dom_nullNameParameter; public static String dom_nullReturnType; public static String dom_nullExceptionType; public static String dom_mismatchArgNamesAndTypes; public static String dom_addNullChild; public static String dom_addIncompatibleChild; public static String dom_addChildWithParent; public static String dom_unableAddChild; public static String dom_addAncestorAsChild; public static String dom_addNullSibling; public static String dom_addSiblingBeforeRoot; public static String dom_addIncompatibleSibling; public static String dom_addSiblingWithParent; public static String dom_addAncestorAsSibling; public static String dom_addNullInterface; public static String dom_nullInterfaces; public static String correction_nullRequestor; public static String correction_nullUnit; public static String engine_searching; public static String engine_searching_indexing; public static String engine_searching_matching; public static String exception_wrongFormat; public static String process_name; public static String manager_filesToIndex; public static String manager_indexingInProgress; public static String disassembler_description; public static String disassembler_opentypedeclaration; public static String disassembler_closetypedeclaration; public static String disassembler_parametername; public static String disassembler_localvariablename; public static String disassembler_endofmethodheader; public static String disassembler_begincommentline; public static String disassembler_fieldhasconstant; public static String disassembler_endoffieldheader; public static String disassembler_sourceattributeheader; public static String disassembler_enclosingmethodheader; public static String disassembler_exceptiontableheader; public static String disassembler_linenumberattributeheader; public static String disassembler_localvariabletableattributeheader; public static String disassembler_localvariabletypetableattributeheader; public static String disassembler_arraydimensions; public static String disassembler_innerattributesheader; public static String disassembler_inner_class_info_name; public static String disassembler_outer_class_info_name; public static String disassembler_inner_name; public static String disassembler_inner_accessflags; public static String disassembler_genericattributeheader; public static String disassembler_signatureattributeheader; public static String disassembler_indentation; public static String disassembler_constantpoolindex; public static String disassembler_space; public static String disassembler_comma; public static String disassembler_openinnerclassentry; public static String disassembler_closeinnerclassentry; public static String disassembler_deprecated; public static String disassembler_constantpoolheader; public static String disassembler_constantpool_class; public static String disassembler_constantpool_double; public static String disassembler_constantpool_float; public static String disassembler_constantpool_integer; public static String disassembler_constantpool_long; public static String disassembler_constantpool_string; public static String disassembler_constantpool_fieldref; public static String disassembler_constantpool_interfacemethodref; public static String disassembler_constantpool_methodref; public static String disassembler_constantpool_name_and_type; public static String disassembler_constantpool_utf8; public static String disassembler_annotationdefaultheader; public static String disassembler_annotationdefaultvalue; public static String disassembler_annotationenumvalue; public static String disassembler_annotationclassvalue; public static String disassembler_annotationannotationvalue; public static String disassembler_annotationarrayvaluestart; public static String disassembler_annotationarrayvalueend; public static String disassembler_annotationentrystart; public static String disassembler_annotationentryend; public static String disassembler_annotationcomponent; public static String disassembler_runtimevisibleannotationsattributeheader; public static String disassembler_runtimeinvisibleannotationsattributeheader; public static String disassembler_runtimevisibleparameterannotationsattributeheader; public static String disassembler_runtimeinvisibleparameterannotationsattributeheader; public static String disassembler_parameterannotationentrystart; public static String disassembler_stackmaptableattributeheader; public static String classfileformat_versiondetails; public static String classfileformat_methoddescriptor; public static String classfileformat_fieldddescriptor; public static String classfileformat_stacksAndLocals; public static String classfileformat_superflagisnotset; public static String classfileformat_superflagisset; public static String classfileformat_clinitname; public static String classformat_classformatexception; public static String classformat_anewarray; public static String classformat_checkcast; public static String classformat_instanceof; public static String classformat_ldc_w_class; public static String classformat_ldc_w_float; public static String classformat_ldc_w_integer; public static String classformat_ldc_w_string; public static String classformat_ldc2_w_long; public static String classformat_ldc2_w_double; public static String classformat_multianewarray; public static String classformat_new; public static String classformat_iinc; public static String classformat_invokespecial; public static String classformat_invokeinterface; public static String classformat_invokestatic; public static String classformat_invokevirtual; public static String classformat_getfield; public static String classformat_getstatic; public static String classformat_putstatic; public static String classformat_putfield; public static String classformat_newarray_boolean; public static String classformat_newarray_char; public static String classformat_newarray_float; public static String classformat_newarray_double; public static String classformat_newarray_byte; public static String classformat_newarray_short; public static String classformat_newarray_int; public static String classformat_newarray_long; public static String classformat_store; public static String classformat_load; public static String classfileformat_anyexceptionhandler; public static String classfileformat_exceptiontableentry; public static String classfileformat_linenumbertableentry; public static String classfileformat_localvariabletableentry; public static String classfileformat_versionUnknown; static { NLS.initializeMessages(BUNDLE_NAME, Messages.class); } /** * Bind the given message's substitution locations with the given string values. * * @param message the message to be manipulated * @return the manipulated String */ public static String bind(String message) { return bind(message, null); } /** * Bind the given message's substitution locations with the given string values. * * @param message the message to be manipulated * @param binding the object to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object binding) { return bind(message, new Object[] {binding}); } /** * 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 bindings An array of objects to be inserted into the message * @return the manipulated String */ public static String bind(String message, Object[] bindings) { return MessageFormat.format(message, bindings); } } |