-
Notifications
You must be signed in to change notification settings - Fork 41
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
Tool Window could not be created #86
Comments
Hey! Before I go into detail, could you describe a little what your planning to create? Also, is this specifically for ReSharper, or should it also work in Rider ? |
Hello! Thanks a lot for a reply, Matthias! What I want to doI am upgrading my SharpCoachPlugin github/jetbrains marketplace that does a job of generating mapping code from one class to another. And I want to add a tool window, where i can load logs of how the mapping went (i.e. I want to create a tool window like a DocumentationSo what I am doing - I am following the Create Tool Window ReSharper Dev Guide because it seems like a little bit newer than Tool Windows. My codeTool Window Descriptor
Tool Window Registar \ Accesser
I've created an action that will show that tool window in such a manner. You can see I've undertook several attempts on making it work, so I've even used
Surely, I've registered my action in a
And create a kotlin file for that action.
Handling errors
But no tool window popped up and that's my problem. My requestPlease, can you help me do this:
Sorry for such a long request, however I've tried to describe it as specifically as I could. |
Thanks for the details. I'm preparing something but currently run into an issue that I first need help with from a colleague. One thing that I already can tell is that you can't use WinForms or WPF for the Rider implementation. It's JVM :) |
Thanks for a reply! So if Rider can not show any tool windows, what is the point of that section of documentation? I believe it has to alert user with BIG BOLD FONT that it can not be shown in the Rider instance itself :) Otherwise another guy believing in miracle (me) like showing a tool window with WPF markdown under the JVM implemented application will waste 10 hours straight trying to investigate any possibilities. However, I am very excited about the upcoming ideas from yourself. Can you provide any thoughts about upcoming feature? Or maybe any planning dates of release? If I can help you with that somehow, feel free to keep in touch with me! Thanks a lot in advance! |
It's a minor thing that needs to be investigated. So should be soon. About tool window et al – well, it's the ReSharper dev guide :) Most things will work without much additional effort, but UI components are simply a bit more difficult. |
So just to make sure, is your developed feature about easing the tool window development for Rider? Sorry for disturbing you with these questions, I just want to make sure if I need to try implement it using java\kotlin or wait for your solution to be deployed.
That is the reason I believe it should be documented. A lot of the things easily work for Rider and for ReSharper as well (and I want to take a moment to say a thank you for creating such a API). But there are a couple of places (like this) where there is no possibility to run it and before wasting some time on studying the documentation and trying to run the code I think it is much easier for users to read a single line "This is not working for Rider, only for ReSharper". However, officially you are right - it is a ReSharper dev guide. |
It's not a feature, just a sample that I'm trying to prepare. From my side, the best source to get going is the https://github.com/jetbrains/resharper-rider-plugin repository (last commit is WIP for the sample). We also have a blog post talking about plugin development – https://blog.jetbrains.com/dotnet/2019/02/14/writing-plugins-resharper-rider/ – and the bottom line there is to get in touch once you have the intent to write something. It's just really difficult to document all the – partially moving – parts of the SDK, and some areas are simply very rarely used. So yea, that's mostly it :) Updating the dev guide is definitely on my TODO list, but I'll have to wait for some other reason, unfortunately. |
That would be awesome to see a working example in a resharper-rider-plugin repository! Thanks a lot for helping me and answering very rapidly, that is cool! I have sent an email to you just in case I could be useful for doing some community stuff or contributing to some of JetBrains projects :) |
Rider can show them, but as with the many of UI-related things, it became different than it used to be before Rider. ReSharper/Rider SDK now has special common UI-related APIs that internally use WPF in ReSharper and Swing in Rider. Using these APIs, UI for features like refactorings has to be implemented only once for both cases. These controls are prefixed with There may be other options to consider instead of creating a new tool window: too many of them may degrade UX and there's been a shift in simplifying and combining some of them. For instance, Rider 2021.3 has enabled the reworked If a separate tool window is still preffered, please look at |
Hello, Eugene! Thanks for a reply. Basically, my plugin's users are mostly developers using Rider. So I've decided to implement just a Java.Swing part and that's all. By now I've decided just to make an integration between Java and C# part using basic I think that Can you, please, tell me about |
No, the initial idea of
It's only these demo actions that require the internal mode, the constrols are used in many features during normal ReSharper/Rider operation. The actions could be good as an example of how you can show a tool window using |
Wow, so it is possible to create UI using C# only. Awesome! Thanks a lot for helping me :) |
@matkoch I've viewed your commit and tried to replicate it, however there is a build error for me:
I don't know how to resolve it, because I am not familiar with java API of SDK and really don't understand how I have another question about implementation of my problem. I want to remind what I'm trying to implement - create a tool window, that receives logs for each executed contextAction of specific type. I've created a tool window using Java (following this example) and Spring framework for designing UI. And I wanted to make it work like this:
I've succeeded in showing UI once, but update of UI, after .json file contents have changed, is not working. I've tried to use Java Watch Service, but I believe it is not a right approach, because I can not save a reference to a Tool Window from ToolWindowFactory class:
I've searched for different approaches and have found a Message Infrastructure and Virtual File System. I can find documentation for Java, but there is no info for C# -> i.e. I tried to store logs of context action not in a real |
Also i wanted to ask you how to generate those C# and .kt files (models for page)? |
Hello!
I am following articles Create Tool Window and Tool Windows in a dev guide. First of all, I find it confusing to see several different approaches on creating tool windows.
Also I have a trouble creating a tool window. There are lots of examples in a sample-resharper-plugin repository, however, there is no way to build that samples provided (because only c# source code is published).
Can you please help me with creation of tool windows - to describe it in a single way (and update docs if needed) or (it could be even better) add a real sample example of creating a tool window, not just putting some c# source code into a sample repo.
Thanks a lot in advance.
The text was updated successfully, but these errors were encountered: