JetBrains / resharper-unity

Unity support for both ReSharper and Rider
Apache License 2.0
1.21k stars 133 forks source link

Update RootNamespace in Unity settings, when RootNamespace is changed in Rider #578

Open van800 opened 6 years ago

van800 commented 6 years ago

In Unity side set EditorSettings.projectGenerationRootNamespace. I think it should there must be some notice/confirmation for the user on Rider side.

van800 commented 6 years ago

@citizenmatt what do you think?

citizenmatt commented 6 years ago

Sounds good to me 👍

Nufflee commented 6 years ago

Any way I can help? Is the code that is supposed to do that in this repo?

van800 commented 6 years ago

Yeah, if you like. I guess, we should:

  1. Subscribe to listening to ProjectModelChanges or documentTransactionManager.AfterTransactionCommit both can be seen in this example https://github.com/JetBrains/resharper-unity/commit/4a5d16b804be57f5b1573d586fa470e011613e62
  2. filter out RootNamespace change
  3. add new source setRootNamespace to (model/editorPlugin/EditorPluginModel.kt)
  4. Apply new RootNamespace in Unity via EditorSettings.projectGenerationRootNamespace
Nufflee commented 6 years ago

I will try but can't promise anything. Thanks for pointers but I can't seem to find a guide on how to run my version of the plugin in Rider so I can test out my stuff.

van800 commented 6 years ago
  1. Check out branch 182
  2. Run build.sh Multiple things will be downloaded, restored, etc and everything should compile without errors.
  3. Open IDEA. In IDEA open "rider" folder. Give it some time to run gradle scripts
  4. Find "runIDE" task, it will start a experimental instance of Rider with locally compiled plugin. image
Nufflee commented 6 years ago

Okay, thank you, will check it out! @van800

Nufflee commented 6 years ago

It could be useful if you include these instructions somewhere in the readme or something.

Nufflee commented 6 years ago

It might take some time as I'm pretty busy currently so if anyone else wants to take this, go ahead! But please tell me here.

van800 commented 6 years ago

@Nufflee I added initial version of Contributing guide. https://github.com/JetBrains/resharper-unity/blob/182/CONTRIBUTING.md

getupandearn commented 6 years ago

I want to contribute.

van800 commented 6 years ago

@getupandearn you are welcome to try, please follow my updated comment https://github.com/JetBrains/resharper-unity/issues/578#issuecomment-394339330