if (pattern.indexOf(KEY) == -1) result.addWarning(NLSMessages.getString("NLSrefactoring.pattern_does_not_contain") + KEY); if (pattern.indexOf(KEY) != pattern.lastIndexOf(KEY)) result.addWarning(NLSMessages.getString("NLSrefactoring.Only_the_first_occurrence_of") + KEY + NLSMessages.getString("NLSrefactoring.will_be_substituted"));
if (pattern.indexOf(KEY) == -1){ String msg= NLSMessages.getFormattedString("NLSrefactoring.pattern_does_not_contain", KEY); result.addWarning(msg); } if (pattern.indexOf(KEY) != pattern.lastIndexOf(KEY)){ String msg= NLSMessages.getFormattedString("NLSrefactoring.Only_the_first_occurrence_of", KEY); result.addWarning(msg); }
	private RefactoringStatus checkCodePattern(){		String pattern= getCodePattern();		RefactoringStatus result= new RefactoringStatus();		if ("".equals(pattern.trim())) //$NON-NLS-1$			result.addError(NLSMessages.getString("NLSrefactoring.pattern_empty")); //$NON-NLS-1$		if (pattern.indexOf(KEY) == -1)			result.addWarning(NLSMessages.getString("NLSrefactoring.pattern_does_not_contain") + KEY); //$NON-NLS-1$		if (pattern.indexOf(KEY) != pattern.lastIndexOf(KEY))				result.addWarning(NLSMessages.getString("NLSrefactoring.Only_the_first_occurrence_of") + KEY + NLSMessages.getString("NLSrefactoring.will_be_substituted")); //$NON-NLS-2$ //$NON-NLS-1$		return result;		}