region= finder.find(0, nlsKeyStringLiteral.getLiteralValue(), true, true, false, false);
region= finder.find(buffer.getDocument().getLength() - 1, nlsKeyStringLiteral.getLiteralValue(), false, true, false, false);
		private void openPropertiesFile(StringLiteral nlsKeyStringLiteral) {			IJavaElement input= SelectionConverter.getInput(JavaEditor.this);			if (input == null)				return;			CompilationUnit ast= JavaPlugin.getDefault().getASTProvider().getAST(input, ASTProvider.WAIT_ACTIVE_ONLY, null);			if (ast == null)				return;						IRegion literalRegion= new Region(nlsKeyStringLiteral.getStartPosition(), nlsKeyStringLiteral.getLength());			AccessorClassReference ref= NLSHintHelper.getAccessorClassReference(ast, literalRegion);			if (ref == null)				return;						IFile file= null;			try {				file= NLSHintHelper.getResourceBundleFile(input.getJavaProject(), ref.getBinding());			} catch (JavaModelException e) {				// Don't open the file			}			if (file == null) {				// Can't write to status line because it gets immediately cleared				MessageDialog.openError(						JavaEditor.this.getEditorSite().getShell(),						JavaEditorMessages.getString("Editor.OpenPropertiesFile.error.fileNotFound.dialogTitle"), //$NON-NLS-1$						JavaEditorMessages.getString("Editor.OpenPropertiesFile.error.fileNotFound.dialogMessage")); //$NON-NLS-1$								return;			}						IEditorPart editor;			try {				editor= IDE.openEditor(JavaEditor.this.getEditorSite().getPage(), file);			} catch (PartInitException e1) {				// Can't write to status line because it gets immediately cleared				MessageDialog.openError(						JavaEditor.this.getEditorSite().getShell(),						JavaEditorMessages.getString("Editor.OpenPropertiesFile.error.openEditor.dialogTitle"), //$NON-NLS-1$						JavaEditorMessages.getFormattedString("Editor.OpenPropertiesFile.error.openEditor.dialogMessage", file.getFullPath().toOSString())); //$NON-NLS-1$								return;			}						// Reveal the key in the properties file			if (editor instanceof ITextEditor) {				IRegion region= null;				// Find key in document				ITextFileBuffer buffer= FileBuffersPlugin.getDefault().getFileBufferManager().getTextFileBuffer(file.getFullPath());				if (buffer != null) {					FindReplaceDocumentAdapter finder= new FindReplaceDocumentAdapter(buffer.getDocument());					try {						region= finder.find(0, nlsKeyStringLiteral.getLiteralValue(), true, true, false, false);					} catch (BadLocationException ex) {					}				}				if (region != null)					((ITextEditor)editor).selectAndReveal(region.getOffset(), region.getLength());				else {					((ITextEditor)editor).selectAndReveal(0, 0);					IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class);					if (statusLine != null)						statusLine.setMessage(true, JavaEditorMessages.getFormattedString("Editor.OpenPropertiesFile.error.keyNotFound", nlsKeyStringLiteral.getLiteralValue()), null); //$NON-NLS-1$				}			}		}