"Editor.Undo.",
"TextAreaContextMenu.Undo.",
	private void createExpressionViewer( Composite parent )	{		IVerticalRuler ruler = null;		expressionViewer = new SourceViewer( parent, ruler, SWT.WRAP				| SWT.MULTI				| SWT.BORDER				| SWT.H_SCROLL				| SWT.V_SCROLL				| SWT.FULL_SELECTION );		expressionViewer.getTextWidget( )				.setLayoutData( new GridData( GridData.FILL_BOTH ) );		treeCommon.setExpressionViewer( expressionViewer );		treeCommon.addDropSupportToViewer( );		expressionViewer.configure( new JSSourceViewerConfiguration( ) );		JSEditorInput editorInput = new JSEditorInput( inputExpression );		JSDocumentProvider documentProvider = new JSDocumentProvider( );		try		{			documentProvider.connect( editorInput );		}		catch ( CoreException e )		{			ExceptionHandler.handle( e );		}		final StyledText text = expressionViewer.getTextWidget( );		IDocument document = documentProvider.getDocument( editorInput );		expressionViewer.setDocument( document );		text.setFont( JFaceResources.getTextFont( ) );		text.addKeyListener(new KeyListener()				{					public void keyPressed( KeyEvent e )					{						if (isUndoKeyPress(e))						{							expressionViewer.doOperation( ITextOperationTarget.UNDO );						}						else if (isRedoKeyPress(e))						{							expressionViewer.doOperation( ITextOperationTarget.REDO );						}					}					public void keyReleased( KeyEvent e )					{						// do nothing					}										private boolean isUndoKeyPress(KeyEvent e)					{						return ((e.stateMask & SWT.CONTROL) > 0 ) && ((e.keyCode == 'z')  || (e.keyCode == 'Z') );					}										private boolean isRedoKeyPress(KeyEvent e)					{						return ((e.stateMask & SWT.CONTROL) > 0 ) && ((e.keyCode == 'y')  || (e.keyCode == 'Y') );					}									});				//create actions for context menu and short cut keys		ResourceBundle bundle = ResourceBundle.getBundle( "org.eclipse.ui.texteditor.EditorMessages" );//$NON-NLS-1$		final TextEditorAction undoAction = new EBTextAction( bundle,				"Editor.Undo.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.UNDO );		final TextEditorAction redoAction = new EBTextAction( bundle,				"Editor.Redo.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.REDO );		final TextEditorAction cutAction = new EBTextAction( bundle,				"Editor.Cut.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.CUT );		final TextEditorAction copyAction = new EBTextAction( bundle,				"Editor.Copy.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.COPY );		final TextEditorAction pasteAction = new EBTextAction( bundle,				"Editor.Paste.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.PASTE );		final TextEditorAction selectAllAction = new EBTextAction( bundle,				"Editor.SelectAll.",//$NON-NLS-1$				expressionViewer,				ITextOperationTarget.SELECT_ALL );		//Create context menu		MenuManager menuMgr = new MenuManager( "#EB Context" );//$NON-NLS-1$		menuMgr.setRemoveAllWhenShown( true );		menuMgr.addMenuListener( new IMenuListener( ) {			public void menuAboutToShow( IMenuManager menuManager )			{				menuManager.add( new Separator( ITextEditorActionConstants.GROUP_UNDO ) );				menuManager.add( new Separator( ITextEditorActionConstants.GROUP_COPY ) );				menuManager.add( new Separator( ITextEditorActionConstants.GROUP_EDIT ) );				undoAction.update( );				redoAction.update( );				copyAction.update( );				cutAction.update( );				pasteAction.update( );				selectAllAction.update( );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_UNDO,						undoAction );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_UNDO,						redoAction );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_COPY,						cutAction );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_COPY,						copyAction );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_COPY,						pasteAction );				menuManager.appendToGroup( ITextEditorActionConstants.GROUP_EDIT,						selectAllAction );			}		} );		text.setMenu( menuMgr.createContextMenu( text ) );		//Create short cut keys for undo and redo, they can be configured in		// preferences		text.addKeyListener( new KeyAdapter( ) {			public void keyPressed( KeyEvent e )			{				KeySequence keySeq = getKeySequenceFromKeyEvent( e );				if ( keySeq == null )				{					return;				}				ICommandManager cmdMgr = PlatformUI.getWorkbench( )						.getCommandSupport( )						.getCommandManager( );				if ( ITextEditorActionDefinitionIds.UNDO.equals( cmdMgr.getPerfectMatch( keySeq ) ) )				{					undoAction.update( );					if ( undoAction.isEnabled( ) )						undoAction.run( );				}				else if ( ITextEditorActionDefinitionIds.REDO.equals( cmdMgr.getPerfectMatch( keySeq ) ) )				{					redoAction.update( );					if ( redoAction.isEnabled( ) )						redoAction.run( );				}			}		} );	}