Mercurial > projects > dwt-addons
comparison dwtx/jface/text/contentassist/ContentAssistant.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 |
---|---|
507 if (fContextInfoPopupOrientation is CONTEXT_INFO_BELOW) | 507 if (fContextInfoPopupOrientation is CONTEXT_INFO_BELOW) |
508 layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); | 508 layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); |
509 } | 509 } |
510 fContextType= LAYOUT_CONTEXT_SELECTOR; | 510 fContextType= LAYOUT_CONTEXT_SELECTOR; |
511 break; | 511 break; |
512 default: | |
512 } | 513 } |
513 } | 514 } |
514 | 515 |
515 protected int getShellType(Widget shell) { | 516 protected int getShellType(Widget shell) { |
516 for (int i= 0; i < fShells.length; i++) { | 517 for (int i= 0; i < fShells.length; i++) { |
535 layoutContextSelector(offset); | 536 layoutContextSelector(offset); |
536 break; | 537 break; |
537 case LAYOUT_CONTEXT_INFO_POPUP: | 538 case LAYOUT_CONTEXT_INFO_POPUP: |
538 layoutContextInfoPopup(offset); | 539 layoutContextInfoPopup(offset); |
539 break; | 540 break; |
541 default: | |
540 } | 542 } |
541 } | 543 } |
542 | 544 |
543 protected void layoutProposalSelector(int offset) { | 545 protected void layoutProposalSelector(int offset) { |
544 if (fContextType is LAYOUT_CONTEXT_INFO_POPUP && | 546 if (fContextType is LAYOUT_CONTEXT_INFO_POPUP && |
577 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 579 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
578 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; | 580 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; |
579 shell.setLocation(getStackedLocation(shell, parent)); | 581 shell.setLocation(getStackedLocation(shell, parent)); |
580 break; | 582 break; |
581 } | 583 } |
584 default: | |
582 } | 585 } |
583 } | 586 } |
584 } | 587 } |
585 | 588 |
586 protected void layoutContextSelector(int offset) { | 589 protected void layoutContextSelector(int offset) { |
604 shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 607 shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
605 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; | 608 Shell parent= fShells[LAYOUT_CONTEXT_SELECTOR]; |
606 shell.setLocation(getStackedLocation(shell, parent)); | 609 shell.setLocation(getStackedLocation(shell, parent)); |
607 break; | 610 break; |
608 } | 611 } |
612 default: | |
609 } | 613 } |
610 } | 614 } |
611 } | 615 } |
612 | 616 |
613 protected void layoutContextInfoPopup(int offset) { | 617 protected void layoutContextInfoPopup(int offset) { |
627 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; | 631 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR]; |
628 shell.setLocation(getStackedLocation(shell, parent)); | 632 shell.setLocation(getStackedLocation(shell, parent)); |
629 } | 633 } |
630 break; | 634 break; |
631 } | 635 } |
636 default: | |
632 } | 637 } |
633 } | 638 } |
634 | 639 |
635 /** | 640 /** |
636 * Moves <code>point</code> such that <code>rectangle</code> does not bleed outside of | 641 * Moves <code>point</code> such that <code>rectangle</code> does not bleed outside of |
796 // Disable event notification to the proposal selector. | 801 // Disable event notification to the proposal selector. |
797 removeContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR); | 802 removeContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR); |
798 break; | 803 break; |
799 case LAYOUT_CONTEXT_INFO_POPUP: | 804 case LAYOUT_CONTEXT_INFO_POPUP: |
800 break; | 805 break; |
806 default: | |
801 } | 807 } |
802 } | 808 } |
803 | 809 |
804 /** | 810 /** |
805 * Copied from dwtx.jface.window.Window. | 811 * Copied from dwtx.jface.window.Window. |
1566 return extension.requestWidgetToken(this, WIDGET_PRIORITY); | 1572 return extension.requestWidgetToken(this, WIDGET_PRIORITY); |
1567 } else if ( cast(IWidgetTokenOwner)fViewer ) { | 1573 } else if ( cast(IWidgetTokenOwner)fViewer ) { |
1568 IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fViewer; | 1574 IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fViewer; |
1569 return owner.requestWidgetToken(this); | 1575 return owner.requestWidgetToken(this); |
1570 } | 1576 } |
1577 default: | |
1571 } | 1578 } |
1572 return true; | 1579 return true; |
1573 } | 1580 } |
1574 | 1581 |
1575 /** | 1582 /** |