consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
106 stars 10 forks source link

Double clicking scripts/console logs doesn't focus Consulo #81

Open Souk21 opened 8 years ago

Souk21 commented 8 years ago

Using OSX 10.11.5, latest consulo build, c# and unity plugins up-to-date. When I try to open a file from Unity, consulo do open the file, but the focus stays on Unity (I have to Cmd+Tab to consulo to see the file).

Souk21 commented 8 years ago

Just in case, I'm using Unity 5.3.4p6

VISTALL commented 8 years ago

I reproduced (at windows, my main OS, it works, no idea why it not work at MacOS)

I will try to fix it (i don't have real MacOS device)

Souk21 commented 8 years ago

Tell me if I can help in any way ?

VISTALL commented 8 years ago

You created issue - that enough

Souk21 commented 8 years ago

An extra info I omitted is that it works if I deselect "Use Consulo as Extern Editor" in Edit menu.

Souk21 commented 8 years ago

FWIW, that's how VSCode plugin is doing it. (Saying that I realize I should have posted this issue in Unity integration plugin)

VISTALL commented 8 years ago

Its ok, no matter where (Unity plugin or Unity plugin :D, better than in consulo)

When Consulo enabled inside Editor - open handler sent via HTTP (consulo <-> unity intergration).

But if you disable - UnityEditor tried to open Consulo via command line (and consulo resend program arguments)

It's a bug of handling 'unityOpenFile/' inside Consulo (rest api)

patrickoshaughnessey commented 6 years ago

I've started seeing this problem again with the latest Consulo + Unity Plugin and Unity 2017.2.0f1. Anyone else have this issue?

parmaia commented 6 years ago

I've having troubles with this, and updated Consulo to 1921 (windows), and in Unity, Edit -> Preferences... -> External Tools, leave External Script Editor Args empty, and check Editor Attaching. Now double clicking on a script or error works fine.

xCISACx commented 3 years ago

This is still an issue in the latest version of Consulo (2649) running on Windows 10 (2004). Setting the External Script Editor Args to empty and checking Editor Attaching doesn't solve the issue. Consulo refuses to focus on double-click. It also does not correctly open the solution automatically if double-clicking a script when Consulo is not running. Couldn't this be implemented somehow?

VISTALL commented 3 years ago

This is still an issue in the latest version of Consulo (2649) running on Windows 10 (2004). Setting the External Script Editor Args to empty and checking Editor Attaching doesn't solve the issue. Consulo refuses to focus on double-click. It also does not correctly open the solution automatically if double-clicking a script when Consulo is not running. Couldn't this be implemented somehow?

There update for Editor plugin (check https://github.com/consulo/UnityEditorConsuloPlugin). But need skip old warning about Editor plugin (due it's old branch - soon i will publish new version).

After using this plugin - files on double click must be opened. But focus is still issue, due OS restriction

xCISACx commented 3 years ago

I placed the Editor folder inside my Assets folder and changed manifest.json so it had the "After 2019.3" lines added to it. image I'm using Unity 2019.4.1f1 but it still does not open the project automatically when double-clicking and Consulo is not running. When double-clicking, it opens Consulo's initial window where you can choose a project and change configurations. It should open the correct solution automatically, right?

VISTALL commented 3 years ago

Consulo set as external editor (point to .exe file or app)?

Also this menu must be like this

image

xCISACx commented 3 years ago

The Unity preferences are pointed to the consulo.exe (64-bit) image And the menu is the way you said it should be: image

This is a project that previously had the Consulo plugin in it, so I'm not sure if I should test it in a new project or not.

VISTALL commented 3 years ago

You file opened inside Consulo?

If not - check please Unity log

xCISACx commented 3 years ago

Opening the project and double clicking on a script opens Consulo, but it's the main project window: image

If I open the project through this window, tab back into Unity and double-click the script again, it opens it in Consulo, but this requires me to manually select the project I want to open when Consulo should know it by searching the current project's directory, no?

It still has the issue where the Consulo icon flashes on the taskbar but the window is not automatically focused. It might be an issue with my current project, I can try it on a new one.

VISTALL commented 3 years ago

If project is not opened(but Welcome window is opened) - Consulo not open on double click?

For flashing as i said - is OS restriction (there a some hacky way for it, but need time)

xCISACx commented 3 years ago

If project is not opened(but Welcome window is opened) - Consulo not open on double click?

It does open on double-click, yes. I was wondering if it would be possible to open the project straight away without going through the Welcome window when double-clicking a script inside Unity.

For flashing as i said - is OS restriction (there a some hacky way for it, but need time)

I see, I will be waiting for the fix then, thank you!

VISTALL commented 3 years ago

It does open on double-click, yes. I was wondering if it would be possible to open the project straight away without going through the Welcome window when double-clicking a script inside Unity.

Consulo not started on 2x click? Without errors? Consulo must open project, even if it's cold start

xCISACx commented 3 years ago

Consulo opens on double-click but it's the Welcome window, not the project. The project only opens if Consulo's welcome window is open and you double-click the script again.

EDIT: The same behaviour occurs in a new project with a freshly imported Consulo plugin by changing the manifest.json. Double-clicking opens only the welcome window, from cold start.

VISTALL commented 3 years ago

EDIT: The same behaviour occurs in a new project with a freshly imported Consulo plugin by changing the manifest.json. Double-clicking opens only the welcome window, from cold start.

and now known - it's a bug)

xCISACx commented 3 years ago

Ah, so it is a bug! You managed to reproduce it? I thought it was my Consulo having issues, but I'm glad to know it can be reproduced.

VISTALL commented 3 years ago

@xCISACx try change UPM version to 2.3.0. It's contains some hack for window focusing. test it

xCISACx commented 3 years ago

I'll try it and let you know.

xCISACx commented 3 years ago

So I changed the version to 2.3.0 and when you try opening a script by double-clicking when the welcome window is open, Consulo is focused. Screenshot_4

I get these errors on the console, not sure why.

EDIT: Socket searching turned itself off, for some reason. Turning it on makes the errors disappear. END EDIT

If Consulo is minimised, trying to double-click the script again after it is already open does not re-focus the window, however, nor does double-clicking a different script. If Consulo is open, we alt-tab to Unity and double-click the script, it does re-focus the window.

I think the issue is Consulo being minimized.

In summary: Consulo is not open + double-clicking on a script: Consulo welcome window opens. Consulo welcome window is open + double-clicking on a script: Consulo is focused. Consulo has the script open + alt-tab to Unity + double-clicking on a script: Consulo is focused. Consulo has the script open + minimising Consulo + double-clicking on a script: Consulo is NOT focused.

I'm having another issue now however where Consulo thinks the file doesn't belong to the project when it does, giving me no syntax highlighting or auto-complete.

Screenshot_3

VISTALL commented 3 years ago

Yeah i found this problem too. It's fixed in nightly. I will test and publish to release. Need some time until current release build come. It will huge, current fixes are delayed until new release

xCISACx commented 3 years ago

I see. I'm glad to know a lot of fixes are coming to release! Should I switch to nightly for the time being then?

xCISACx commented 3 years ago

So I tried out the latest nightly just for the sake of experimentation and immediately got all these errors, which I suppose is normal, but checking for updates does not try to update any of the plugins. image

Syntax highlighting and auto-complete do not work either, which is expected since the plugins have errors. Is it because I exported the release version settings and imported them into the nightly?

Consulo does not open the correct project even if the welcome window is open and a script is double-clicked, so the release version works better in this aspect. Focusing also does not work in the nightly, it seems.

Changing the UPM version back to 2.2.0 does not fix this issue and trying to re-download the plugins by looking for them gives no results. image

VISTALL commented 3 years ago

You ignored error on update about - Some plugins will not updated (do not ignore that error).

Call check for updates again. Some plugins will arrive. My build service is slow (you catch moment when it build new versions of plugins)

xCISACx commented 3 years ago

Checking for updates again gives this result. image

I didn't update my other release of Consulo, I went to the repository and downloaded the latest nightly: https://hub.consulo.io/#!repo/nightly/consulo-win64

You ignored error on update about - Some plugins will not updated (do not ignore that error).

So I'm not sure what this means

VISTALL commented 3 years ago

Change channel inside settings

https://github.com/consulo/Docs/blob/master/Update%20Channels.md

VISTALL commented 3 years ago

So I'm not sure what this means

You can switch to other channels via settings, and call Check for Updates.

but there some cases - when in new channel (or in next update), some plugins are not available. Check for Updates will notify you about that.

If you ignore this error - not updated plugins will not enabled after update (C# or others).

xCISACx commented 3 years ago

Change channel inside settings

https://github.com/consulo/Docs/blob/master/Update%20Channels.md

Oh, I didn't know you could do that, sorry! Yes, it seems changing the channel to nightly lets the plugins be updated correctly.

Syntax highlighting and auto-complete work now. Thank you!

You can switch to other channels via settings, and call Check for Updates.

but there some cases - when in new channel (or in next update), some plugins are not available. Check for Updates will notify you about that.

If you ignore this error - not updated plugins will not enabled after update (C# or others).

I see, thank you for explaining.

Focusing works when using UPM 2.3.0 as well, but focusing from a minimised state still doesn't (I'm not sure if it should or not though).

Consulo complains that the plugin is outdated but attempting to fix it rolls it back to UPM 2.2.0 where the focusing does not work. image So I've chosen to ignore this warning.

VISTALL commented 3 years ago

So I've chosen to ignore this warning.

Yeah. It will update to 2.2.0. I want delay 2.3.0 build until my/your tests

xCISACx commented 3 years ago

I see, that seems like the optimal choice. Could re-focusing from a minimised state be implemented? Or is it an OS limitation?

I don't mind helping test Consulo for errors and bugs since I would like to see it evolve into a great IDE a lot of people can use without paying ridiculous amounts for JetBrains Rider, for example. So if I can help with anything, please do let me know and I'll gladly test it.

VISTALL commented 3 years ago

I see, that seems like the optimal choice. Could re-focusing from a minimised state be implemented? Or is it an OS limitation?

I don't mind helping test Consulo for errors and bugs since I would like to see it evolve into a great IDE a lot of people can use without paying ridiculous amounts for JetBrains Rider, for example. So if I can help with anything, please do let me know and I'll gladly test it.

i will test. Currently I'm working on correct startup with project open

xCISACx commented 3 years ago

Alright, I'm glad to know you're already working on a fix. Thank you for all your hard work!

VISTALL commented 3 years ago

@xCISACx test 2.4.0 version (only nightly)

xCISACx commented 3 years ago

The project opens automatically from cold start now when double-clicking a script!

VISTALL commented 3 years ago

@xCISACx Check for updates - minimized state now must be reset at 2x click

xCISACx commented 3 years ago

Yup! That did it, it now restores the focus even when the window was minimised. Great work!

VISTALL commented 3 years ago

TODO: Still persist on macOS

xCISACx commented 3 years ago

If you fix anything else and need someone to test it, let me know! I do not have MacOS but I can test anything if it's Windows

xCISACx commented 3 years ago

Also, this isn't related to the open issue on this thread but I don't know where to post suggestions. Would it be possible to create a unitypackage or even upload the Consulo plugin to Unity's repository so that we don't need to edit the manifest.json to include it every time we start a new project? I believe Rider installs its plugin globally seeing as opening a new Unity project has the Rider plugin already listed in the package manager. So there must be a way for Consulo to install it automatically, no?

VISTALL commented 3 years ago

Also, this isn't related to the open issue on this thread but I don't know where to post suggestions. Would it be possible to create a unitypackage or even upload the Consulo plugin to Unity's repository so that we don't need to edit the manifest.json to include it every time we start a new project? I believe Rider installs its plugin globally seeing as opening a new Unity project has the Rider plugin already listed in the package manager. So there must be a way for Consulo to install it automatically, no?

I think for now I can't do that. Community too small, count of users too small, code quality maybe low. Also i'm more often update plugin, Unity will make it slower

xCISACx commented 3 years ago

I see, that's true. I suppose we'll have to deal with it for now, unfortunately.

VISTALL commented 3 years ago

I see, that's true. I suppose we'll have to deal with it for now, unfortunately.

For offtopics we can use https://discuss.consulo.io/

xCISACx commented 3 years ago

I see, thank you! I'll write any suggestions I can think of there.

xCISACx commented 3 years ago

I tried to write a suggestion using the link you provided, but I don't think I have the permissions to do so seeing as the "Start Discussion" button is greyed out.

image

VISTALL commented 3 years ago

I tried to write a suggestion using the link you provided, but I don't think I have the permissions to do so seeing as the "Start Discussion" button is greyed out.

image

select category :) But i can post only from second try (bug of beta? oO)