-
Notifications
You must be signed in to change notification settings - Fork 13
[#47] Add action to switch between Source/Header #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I added a |
Thanks, @jonahgraham |
Added a second commit to support cdt-lsp editors embedded in |
de85b60
to
fdf1608
Compare
LGTM. @ddscharfe could you please stash the commits and provide a test for this stuff? |
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/services/ClangdLanguageServer.java
Show resolved
Hide resolved
I think you meant squash the commits - did that. I added tests for the property tester. I did not write tests for the command handler, because it consists mostly of calling (static) methods. If we want to test code like this with unit tests we should use DI (which I think would be a good thing). What I'm not sure about if in the case of the handler it would make sense to create integration tests. I also added some more JavaDoc as suggested by @ruspl-afed. |
Seems like the mockito dependency cannot be resolved, I was assuming we are using the cdt target platform? |
I think this has to be changed since we are now part of cdt. |
@ddscharfe what if you add the required bundles to the target here ? Then we can add them to the CDT target. |
Thanks, I overlooked that. I added the latest orbit repository for mockito, because the orbit repository (which is used for Guava and SnakeYAML) doesn't contain mockito-junit-jupiter. |
Maven fails with this error:
I have no idea what this means, probably not using MockitoExtension would solve this problem. Any ideas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Perhaps it was the mix of mockito versions. |
I removed the MockitoExtension and use the
I think we can merge it. |
Forgot to implement |
No problem adding the dependencies - with #51 (thanks @ruspl-afed) it will be easy to check that such new dependencies work well. |
@jonahgraham I think this PR can be rebased and merged. Could you do that please. |
on it |
- add server interface for clangd textDocument/switchSourceHeader extension - add command and menu entry for switch action - add orbit repository to target platform (required for Mockito) Note: In the UI the term "toggle" is used instead of switch in order to be consistent with the CDT editor.
- don't use MockitoExtension as it causes build problems with maven
I missed that on what I just force pushed - I am doing another force push now |
Note: In the UI the term "toggle" is used instead of switch in order to be consistent with the CDT editor.
Fixes #47