RulerEditPart parent = (RulerEditPart) getFocusEditPart( ).getParent( ); getViewer( ).getEditDomain( ) .getCommandStack( ) .execute( parent.getRulerProvider( ) .getDeleteGuideCommand( getFocusEditPart( ).getModel( ) ) );
EditorRulerEditPart parent = (EditorRulerEditPart) getFocusEditPart( ) .getParent( ); getViewer( ).getEditDomain( ).getCommandStack( ) .execute( parent.getRulerProvider( ) .getDeleteGuideCommand( getFocusEditPart( ) .getModel( ) ) );
			public boolean keyPressed( KeyEvent event )			{				if ( event.keyCode == SWT.DEL )				{					// If a guide has focus, delete it					if ( getFocusEditPart( ) instanceof GuideEditPart )					{						RulerEditPart parent = (RulerEditPart) getFocusEditPart( ).getParent( );						getViewer( ).getEditDomain( )								.getCommandStack( )								.execute( parent.getRulerProvider( )										.getDeleteGuideCommand( getFocusEditPart( ).getModel( ) ) );						event.doit = false;						return true;					}					return false;				}				else if ( ( ( event.stateMask & SWT.ALT ) != 0 )						&& ( event.keyCode == SWT.ARROW_UP ) )				{					// ALT + UP_ARROW pressed					// If a guide has focus, give focus to the ruler					EditPart parent = getFocusEditPart( ).getParent( );					if ( parent instanceof RulerEditPart )						navigateTo( getFocusEditPart( ).getParent( ), event );					return true;				}				return super.keyPressed( event );			}