Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d @ 192:c3583c6ec027
Added missing default cases for switch statements
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 03 Nov 2008 22:52:26 +0100 |
parents | cef27f663573 |
children |
comparison
equal
deleted
inserted
replaced
191:1ef729510ed6 | 192:c3583c6ec027 |
---|---|
427 if (fContextInfoPopupOrientation is CONTEXT_INFO_BELOW) | 427 if (fContextInfoPopupOrientation is CONTEXT_INFO_BELOW) |
428 layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); | 428 layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); |
429 } | 429 } |
430 fContextType= LAYOUT_CONTEXT_SELECTOR; | 430 fContextType= LAYOUT_CONTEXT_SELECTOR; |
431 break; | 431 break; |
432 default: | |
432 } | 433 } |
433 } | 434 } |
434 | 435 |
435 protected int getShellType(Widget shell) { | 436 protected int getShellType(Widget shell) { |
436 for (int i=0; i<fShells.length; i++) { | 437 for (int i=0; i<fShells.length; i++) { |
449 layoutContextSelector(offset); | 450 layoutContextSelector(offset); |
450 break; | 451 break; |
451 case LAYOUT_CONTEXT_INFO_POPUP: | 452 case LAYOUT_CONTEXT_INFO_POPUP: |
452 layoutContextInfoPopup(offset); | 453 layoutContextInfoPopup(offset); |
453 break; | 454 break; |
455 default: | |
454 } | 456 } |
455 } | 457 } |
456 | 458 |
457 protected void layoutProposalSelector(int offset) { | 459 protected void layoutProposalSelector(int offset) { |
458 if (fContextType is LAYOUT_CONTEXT_INFO_POPUP && | 460 if (fContextType is LAYOUT_CONTEXT_INFO_POPUP && |
489 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 491 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
490 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; | 492 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; |
491 shell.setLocation(getStackedLocation(shell, parent)); | 493 shell.setLocation(getStackedLocation(shell, parent)); |
492 break; | 494 break; |
493 } | 495 } |
496 default: | |
494 } | 497 } |
495 } | 498 } |
496 } | 499 } |
497 | 500 |
498 protected void layoutContextSelector(int offset) { | 501 protected void layoutContextSelector(int offset) { |
516 shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 519 shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
517 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; | 520 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; |
518 shell.setLocation(getStackedLocation(shell, parent)); | 521 shell.setLocation(getStackedLocation(shell, parent)); |
519 break; | 522 break; |
520 } | 523 } |
524 default: | |
521 } | 525 } |
522 } | 526 } |
523 } | 527 } |
524 | 528 |
525 protected void layoutContextInfoPopup(int offset) { | 529 protected void layoutContextInfoPopup(int offset) { |
539 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 543 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
540 shell.setLocation(getStackedLocation(shell, parent)); | 544 shell.setLocation(getStackedLocation(shell, parent)); |
541 } | 545 } |
542 break; | 546 break; |
543 } | 547 } |
548 default: | |
544 } | 549 } |
545 } | 550 } |
546 | 551 |
547 protected void shiftHorizontalLocation(Point location, Rectangle shellBounds, Rectangle displayBounds) { | 552 protected void shiftHorizontalLocation(Point location, Rectangle shellBounds, Rectangle displayBounds) { |
548 if (location.x + shellBounds.width > displayBounds.width) | 553 if (location.x + shellBounds.width > displayBounds.width) |
622 // Disable event notification to the proposal selector. | 627 // Disable event notification to the proposal selector. |
623 removeContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR); | 628 removeContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR); |
624 break; | 629 break; |
625 case LAYOUT_CONTEXT_INFO_POPUP: | 630 case LAYOUT_CONTEXT_INFO_POPUP: |
626 break; | 631 break; |
632 default: | |
627 } | 633 } |
628 } | 634 } |
629 } | 635 } |
630 | 636 |
631 /** | 637 /** |
1138 return owner.requestWidgetToken(this); | 1144 return owner.requestWidgetToken(this); |
1139 } else if ( cast(IWidgetTokenOwnerExtension)fViewer ) { | 1145 } else if ( cast(IWidgetTokenOwnerExtension)fViewer ) { |
1140 IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fViewer; | 1146 IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fViewer; |
1141 return extension.requestWidgetToken(this, WIDGET_PRIORITY); | 1147 return extension.requestWidgetToken(this, WIDGET_PRIORITY); |
1142 } | 1148 } |
1149 default: | |
1143 } | 1150 } |
1144 return true; | 1151 return true; |
1145 } | 1152 } |
1146 | 1153 |
1147 /** | 1154 /** |