| 615 | } |
| 616 | |
| 617 | bool LSPClientPlugin::onMouseClick( UICodeEditor* editor, const Vector2i& pos, |
| 618 | const Uint32& flags ) { |
| 619 | const bool breadcrumbClick = mBreadcrumb && ( flags & EE_BUTTON_LMASK ); |
| 620 | const Vector2f localPos( breadcrumbClick ? editor->convertToNodeSpace( pos.asFloat() ) |
| 621 | : Vector2f::Zero ); |
| 622 | if ( breadcrumbClick && localPos.y >= 0 && localPos.y < mPluginTopSpace && |
| 623 | localPos.x < editor->getTopAreaWidth() ) { |
| 624 | const Vector2f downLocalPos( editor->convertToNodeSpace( |
| 625 | editor->getEventDispatcher()->getMouseDownPos().asFloat() ) ); |
| 626 | if ( downLocalPos.y >= 0 && downLocalPos.y < mPluginTopSpace && |
| 627 | downLocalPos.x < editor->getTopAreaWidth() ) { |
| 628 | editor->getDocument().execute( "lsp-show-document-symbols", editor ); |
| 629 | return true; |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | Input* input = editor->getInput(); |
| 634 | Uint32 mod = input->getSanitizedModState(); |
| 635 | if ( mod != ( KEYMOD_LALT | KeyMod::getDefaultModifier() ) || ( flags & EE_BUTTON_LMASK ) == 0 ) |
| 636 | return false; |
| 637 | |
| 638 | auto docPos = editor->resolveScreenPosition( pos.asFloat() ); |
| 639 | if ( !docPos.isValid() || !editor->getDocument().isValidPosition( docPos ) ) |
| 640 | return false; |
| 641 | |
| 642 | editor->getDocument().execute( "lsp-go-to-definition", editor ); |
| 643 | |
| 644 | return true; |
| 645 | } |
| 646 | |
| 647 | bool LSPClientPlugin::semanticHighlightingEnabled() const { |
| 648 | return mSemanticHighlighting; |
nothing calls this directly
no test coverage detected