comparison dwtx/jface/text/source/AnnotationRulerColumn.d @ 135:65801ad2b265

Regex fix for anon classes
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 01:52:31 +0200
parents 51e6e63f930e
children b6bad70d540a
comparison
equal deleted inserted replaced
134:51e6e63f930e 135:65801ad2b265
338 338
339 fHitDetectionCursor= new Cursor(parentControl.getDisplay(), DWT.CURSOR_HAND); 339 fHitDetectionCursor= new Cursor(parentControl.getDisplay(), DWT.CURSOR_HAND);
340 340
341 fCanvas= createCanvas(parentControl); 341 fCanvas= createCanvas(parentControl);
342 342
343 fCanvas.addPaintListener(new PaintListener() { 343 fCanvas.addPaintListener(new class() PaintListener {
344 public void paintControl(PaintEvent event) { 344 public void paintControl(PaintEvent event) {
345 if (fCachedTextViewer !is null) 345 if (fCachedTextViewer !is null)
346 doubleBufferPaint(event.gc); 346 doubleBufferPaint(event.gc);
347 } 347 }
348 }); 348 });
349 349
350 fCanvas.addDisposeListener(new DisposeListener() { 350 fCanvas.addDisposeListener(new class() DisposeListener {
351 public void widgetDisposed(DisposeEvent e) { 351 public void widgetDisposed(DisposeEvent e) {
352 handleDispose(); 352 handleDispose();
353 fCachedTextViewer= null; 353 fCachedTextViewer= null;
354 fCachedTextWidget= null; 354 fCachedTextWidget= null;
355 } 355 }
356 }); 356 });
357 357
358 fMouseListener= new MouseListener() { 358 fMouseListener= new class() MouseListener {
359 public void mouseUp(MouseEvent event) { 359 public void mouseUp(MouseEvent event) {
360 int lineNumber; 360 int lineNumber;
361 if (isPropagatingMouseListener()) { 361 if (isPropagatingMouseListener()) {
362 fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y); 362 fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y);
363 lineNumber= fParentRuler.getLineOfLastMouseButtonActivity(); 363 lineNumber= fParentRuler.getLineOfLastMouseButtonActivity();
385 mouseDoubleClicked(lineNumber); 385 mouseDoubleClicked(lineNumber);
386 } 386 }
387 }; 387 };
388 fCanvas.addMouseListener(fMouseListener); 388 fCanvas.addMouseListener(fMouseListener);
389 389
390 fCanvas.addMouseMoveListener(new MouseMoveListener() { 390 fCanvas.addMouseMoveListener(new class() MouseMoveListener {
391 /* 391 /*
392 * @see dwt.events.MouseMoveListener#mouseMove(dwt.events.MouseEvent) 392 * @see dwt.events.MouseMoveListener#mouseMove(dwt.events.MouseEvent)
393 * @since 3.0 393 * @since 3.0
394 */ 394 */
395 public void mouseMove(MouseEvent e) { 395 public void mouseMove(MouseEvent e) {
410 * 410 *
411 * @param parent the parent 411 * @param parent the parent
412 * @return the created canvas 412 * @return the created canvas
413 */ 413 */
414 private Canvas createCanvas(Composite parent) { 414 private Canvas createCanvas(Composite parent) {
415 return new Canvas(parent, DWT.NO_BACKGROUND | DWT.NO_FOCUS) { 415 return new class(parent, DWT.NO_BACKGROUND | DWT.NO_FOCUS) Canvas {
416 /* 416 /*
417 * @see dwt.widgets.Control#addMouseListener(dwt.events.MouseListener) 417 * @see dwt.widgets.Control#addMouseListener(dwt.events.MouseListener)
418 * @since 3.0 418 * @since 3.0
419 */ 419 */
420 public void addMouseListener(MouseListener listener) { 420 public void addMouseListener(MouseListener listener) {
843 */ 843 */
844 private void postRedraw() { 844 private void postRedraw() {
845 if (fCanvas !is null && !fCanvas.isDisposed()) { 845 if (fCanvas !is null && !fCanvas.isDisposed()) {
846 Display d= fCanvas.getDisplay(); 846 Display d= fCanvas.getDisplay();
847 if (d !is null) { 847 if (d !is null) {
848 d.asyncExec(new Runnable() { 848 d.asyncExec(new class() Runnable {
849 public void run() { 849 public void run() {
850 redraw(); 850 redraw();
851 } 851 }
852 }); 852 });
853 } 853 }