Search Unity

Utilities Script Inspector 3

Discussion in 'Tools In Progress' started by Flipbookee, Aug 10, 2013.

  1. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I wish I could, but it's crunch time. :( I used to do that before, and that's how the initial version was born, and also the version 2 when editing was added...
     
  2. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    A short WIP update... A couple of weeks ago I've shared a pre-beta version with some people with intention to get some early feedback and to see if there are any critical bugs while I was still working on fixing those bugs which I was already aware of. It turned out there were a few critical issues which I've fixed after reports, and I've fixed most of the previously known issues. These fixes were all done using the new SI as IDE which was a great way for me to see how it works and how it feels, and this also helped me find some additional imperfections and fix them.

    For example, there was an issue where generic types were resolving to non-generic types with the same name, i.e. List<...> would incorrectly get resolved to System.Collections.List instead of System.Collections.Generic.List<T>. Another bug was fixed where accessing members through an interface was failing because my code didn't find the public modifier on its members (interface members are actually implicitly public). I've fixed a similar bug in user defined enums - enum values were not listed as completions. There was also a bug in listing namespace members for namespaces spanning across different assemblies. There were a couple of mistakes in my C# grammar definitions. Also after some refactoring I've introduced a bug in parser's error recovery algorithm, fixed that too. And there were also other bugs that I don't even recall anymore :p...

    I'm kind of glad I didn't start the beta earlier with so many issues, although I'm feeling sad at the same time. I really wish I could do that earlier, but that wasn't possible unfortunately. I'm pretty sure there will be more issues found once the beta starts, but hey, that's the whole point of having betas! ;)

    Now that so many issues have vanished I think it's time to get wider feedback on this. Once I finish with re-enabling the fancy optimization it will go out...

    EDIT:
    I forgot to mention nested lambda expressions got fixed too - they were causing a crash previously :cool:

    EDIT 2:
    Also forgot to mention completions for conditional keywords were added, and completion lists don't show up automatically anymore while typing the name of a declaration :cool:! These two were the trickiest parts since I've never found any info on how these should be implemented, but I've found a very cool solution that works perfectly :D
     
    Last edited: May 17, 2014
  3. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Great! I really can't more of MonoDevelop! As soon as you release the beta I'll be ready to use it.
    Any bug you could still have will be always less disturbing than the problems that MonoDevelop continues to create on OSX. And I'll be more then happy to report them in details.
     
  4. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    Great indeed! I will be testing and using. Once I can finally be rid of Mono, I will.

    By the way, ctrl+s to save would be fantastic. ;)
     
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks mcmorry, I'll be appreciating your help!

    Yeah, I know... Unfortunately that's still not possible - Unity has Ctrl+S shortcut hard-coded to "Save Scene" and editor extensions cannot override that even while having keyboard focus. The same happens with Undo and Redo shortcuts. But you can use the alternative shortcuts instead, it takes very little to get used to them.
     
  6. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    I never really looked into this enough to realize their were alternatives, I can't handle this without my special auto completion.. haha.
    I knew that some day soon though, with auto completion, this would rock, so I got it almost as an investment.
     
  7. wwboy6

    wwboy6

    Joined:
    Feb 13, 2013
    Posts:
    2
    Nice job~ Looking forward to simple auto indentation~ It would be helpful if there is a shortcut to Unity Scripting Reference too~
    Between why not write a post in your website to show tips and tricks of SI2 like "Play the scene to auto save all the documents"? :)
     
  8. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks wwboy6! :D

    Auto indentation will come eventually, I'm just trying to stay focused on auto-completion first. Recently I read some articles about how this is working in other editors and one of those was shocking - says Emacs had 27000 lines of code only for that feature! But then I found some other ones saying it isn't that complicated, so I hope Emacs folks have just over-complicated the things :p

    I've added the Unity Scripting Reference shortcut already, currently Ctrl+' which is the same one as in MonoDevelop, but I think F1 might be even better? And my implementation works much better than that one in MD - it goes straight to the page describing the symbol without showing the search page! :cool: This was possible since my semantic analysis gives full details about any symbol, so for any member I can find the type it belongs to, the namespace in which that type is defined, and the assembly that implements the type! So in code like this:
    Code (csharp):
    1.  
    2.     var myCamera = UnityEngine.Camera.current;
    3.     Debug.Log( myCamera.depth );
    4.  
    opening Scripting Reference on "depth" from SI goes directly to:
    http://docs.unity3d.com/Documentation/ScriptReference/Camera-depth.html
    while the same from MonoDevelop would run a search for "depth" like this:
    http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=depth
    :cool: :D

    He, he, yeah some more videos would be great to have... if I only had time to do that too... :) I'd rather spend that time on development for now ;) although if anyone is willing to give my a hand and post some youtube videos I'd be glad to add those to the website :)
     
  9. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
  10. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Michael, my friend, that's an awesome and freaking amazing review! :D Great job, thanks a lot! And I hope you'll do a similar one for the new upcoming version too :D
     
  11. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    Thanks. Can't wait to make the second :)
     
  12. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Some feedback if you don't mind:

    One little feature that I'd like to have is a popup that list all the shortcuts? It's a little bit annoying every time to search for the readme and scroll it down. A short reference accessible from the settings gear icon would be perfect.

    Also would be very useful to have shortcuts to delete and to duplicate a single line or multiple selected (also partially) lines. I'm used to Ctrl+E to "erase" and Ctrl+D to "duplicate".

    Some weeks ago I notified you that the saving shortcut on OSX doesn't work (Cmt+Opt+S). Could you check please. Some time is very stressful, especially when working on shaders where is not needed at all to play the game and saving is very frequent?

    Also did you manage to test the Cmd+W that should close only the active tab insted it closes all the tabs grouped in a detached windows (usually on second monitor)? On OSX could be good also to use Ctrl+W if you can't override the default behavior.

    Thanks
     
  13. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    I noticed actually that their is a popup. That's how I found the shortcuts. Check near the top of the window.
     
  14. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I can't find it. here is what I have on top of the window:
    $Screenshot 2014-05-29 18.29.55.jpg

    The only popup I saw is the About that shows just few info.
     
  15. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    Hover over all the buttons: Like So
     
  16. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Oh, but I mean a popup window, similar the "About" one, with the full list of shortcuts. Not just the tooltip over the icons there.
    If you open the readme.txt in the plugin's folder you will see, down down at the end, a long list of shortcut with relative descriptions. I'd like to have a simple fast-accessible reference of them.
     
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yeah, Michael was talking about the tooltips that come on toolbar buttons, and those are only the basic few shortcuts. The list of all shortcuts is quite long and even I don't remember them all :p so, I'll think of something... In meantime you can always copy the the most exotic shortcuts from the readme and paste them in another txt file, with the most commonly needed shortcuts at the top. Turn on word wrap and dock that tab somewhere on the side just next to the code tabs and voila, you have the "popup" you were asking for! ;) ... but yeah, I guess I can think of something better than that...

    Just tested it on Mac now and I see, system's Cmd-W overrides Si2's shortcut and it's closing the whole group. The alternative is Cmd-F4 and that one closes only one tab. :cool:

    I also tested Cmd-Alt-S and it works fine. One related thing I've noticed is that Benchy overrides that, at least on Windows. Benchy adds a menu item in the main window menu with exactly that shortcut, and Unity gives that a higher priority even when a Script Inspector tab has the focus. I don't know how useful is for Benchy to have that shortcut active when the focus is somewhere else, and it's quite unfortunate that Unity has inverted the priorities, not only for these kind of user defined shortcuts but also for built-in shortcuts such as Ctrl+S, Ctrl+Z, etc. :( ... So, check your menus and see is any menu item using that shortcut. I'll contact the author of Benchy, but let me know if there's another extension doing the same in your project.

    Thanks for all the feedback - it's always very welcome :)
     
  18. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Yes it works, but in my case I have to use Cmd-Fn-F4. Is not the best :)

    You are right! A* Pathfinding plugin use that shortcut :(
    Could be possible to customize the shortcuts? For example Ctrl+S on Mac could be very nice. And Ctrl+W to close tabs.

    Thanks for your support!
     
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I see... To switch it to control-W instead of cmd-W open FGCodeWindow.cs and replace lines 556, 557 and 558 with these four lines:
    Code (csharp):
    1.  
    2.                 else if (!Event.current.alt  !Event.current.shift)
    3.                 {
    4.                     if (Event.current.control  Event.current.keyCode == KeyCode.W ||
    5.                         EditorGUI.actionKey  Event.current.keyCode == KeyCode.F4)
    6.  
    To use control-S for saving insert this code at line 3025 in FGTextEditor.cs:
    Code (csharp):
    1.  
    2.         if (current.type == EventType.keyDown  current.keyCode == KeyCode.S  modifiers == EventModifiers.Control)
    3.         {
    4.             current.Use();
    5.             SaveBuffer();
    6.             return;
    7.         }
    8.  
    "Go To Line" functionality would come handy in these cases :p
     
    Last edited: May 30, 2014
  20. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I was fixing my parser for these last two difficult to parse cases:

    1. Short-form Nullable types vs. non-nullable types used in conditional expressions:
    Code (csharp):
    1.  
    2. int answer = myString is string ? 42 : 41; // was parsed as Nullable<string>
    3. int anotherAnswer = threeState is bool? ? 42 : 41; // this was and should be a Nullable<bool>
    4.  
    2. Unbound types used in typeof() expressions:
    Code (csharp):
    1.  
    2. var typeOfGenericList = typeof(List<>);
    3. var typeOfGenericDictionary = typeof(Dictionary<,>);
    4.  
    So, while searching for some difficult to parse C# code I've found this interesting blog post from Eric Lippert:
    http://blogs.msdn.com/b/ericlippert/archive/2010/04/01/somelastminutefeatures.aspx

    It's a short and interesting read, well worth spending 5 minutes to read it. More advanced programmers will laugh before reading the last paragraph :) and the rest of you will learn something new and useful - the "goes to operator" ;)... Have fun!
     
  21. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks Thien!

    Those errors were coming from the pre-beta version - the one that I sent to some of you guys about a month ago. I was hoping that version might be very close to a beta quality, but it turned out it crashes too much and performance were poor... I've been working since then on fixing those crashes, which wasn't that hard, and also on improving the performance, which is a bit more complicated. All the fancy optimizations were turned off in that version since I knew there were issues in semantic analysis code, and one inside the parser related to syntax error recovery. So, once I fixed those issues and enabled the fancy optimizations (which improved the performance dramatically) that introduced some new issues :p which I'm still trying to solve. I'm very close now and once these are fixed I'll be able to announce the all new Script Inspector 3 Beta :cool: which will be fully usable even though it's still in beta, and any newly found issues will be addressed before the final release :)
     
  23. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    FWIW, when I'm working on personal material, I use SI(3?) beta now exclusively, and I don't get any crashes or terminal issues. With two monitors, it's a dream with the scripts on one and the project windows on the other. It's looking really good.

    (The only criticism I have on it is that it's missing the read-me file with the listing of the short cut keys... and that's no real criticism at all!)
     
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    He he, nice :D and great to hear that! I thought you'll delete it after the first try :p he he... Thanks for all your feedback too, reported bugs are fixed now :cool:... And I'm not crunching so much anymore so hopefully I'll get the beta out before the end of this week, with working auto-completion and a couple of surprise goodies on top of that :D (and also with updated readme, he he ;))
     
  25. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Is anyone available right now for a quick smoke test? I need someone to test the beta candidate quickly, and maybe spend some time with me today if possible. I have to release the beta today and it will help me a lot if someone is testing it and report bugs to me while I'm fixing the last bits. Otherwise I'll have to test it all by myself and fix issues at the same time, which would be much slower... Thanks a lot!
     
  26. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    I might be available tonight UK time. Not sure if this helps, but I'll be willing.
     
  27. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Awesome! Thanks man! :D I still have a couple of hours then for testing and polishing =)
     
  28. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    Got an expected release date for auto completion? I am so anxious for it :) o_O
     
  29. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I haven't received any feedback from Adam yet. I wanted someone else other than myself to greenlight the beta candidate, and he was the only brave man to take it, while everyone else was busy watching the World Cup ;).

    In meantime I've been testing it on my side too and fixing minor bugs as I find them... I've found a fat one just now and it's an easy to fix one, so soon the beta candidate 2 will be available. It would be great if more people can join and things will go faster then. :) I think it might be a good idea once I finish the BC2 to send you a copy and maybe you'll make a little pre-beta preview, hehe?
     
  30. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    @Flipbookee can you send me a copy of the current version ? I'm eager to try it out and will surely report bugs if I can find any.

    Thanks a lot, looking forward to trying it out.
     
  31. MichaelHF15

    MichaelHF15

    Joined:
    Mar 25, 2014
    Posts:
    50
    I'll try it out. Absolutely! :D
     
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
  33. SpectralRook

    SpectralRook

    Joined:
    Feb 9, 2014
    Posts:
    112
    Glad to see you are getting close to releasing the Beta. Looking forward to ditching MonoDevelop for good.

    If you would like another, I'd be happy to help test the candidate as well.
     
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
  35. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    I'd be very willing to test this out. I've got my share of MonoDevelop headaches and can't wait to get rid of it!
     
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    You are more than welcome, sending you a PM now... :D
     
  37. The-Spaniard

    The-Spaniard

    Joined:
    Jan 7, 2012
    Posts:
    149
    I'd be up for helping with a beta too. I should have some time this evening for sure, if not sooner. I've been following this WIP for a while, very much looking forward to a release :)
     
  38. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Great! Thanks! I'll send it in a few minutes. It's still pre-beta though but almost there ;)
     
  39. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    602
    I'm also extremely interested in the code-completion facilities. Seems like if SI2/3 works well enough that it can fully replace MonoDevelop/VS, it'll be a massive workflow boost.

    If you'd like, I'd be happy to also test the beta.
     
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @sient :) Beta is still not ready, there's still one pending issue, but I'm pretty sure it will be resolved very soon. The guys who are helping me test the beta candidates are amazing in discovering and reporting issues, so improvements are happening at a very quick rate now. We already reached beta candidate 3, and I think the next one will be accepted as Beta 1. I'll send you the next candidate for testing once it's ready, which will be most likely in two days... By that time you may want to play with the current BC3, so I'll send you that in a few minutes... Thanks! :cool:
     
  41. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    How close is Code Insight?
    Will it be full support with overloads and everything?
     
  42. tobia88

    tobia88

    Joined:
    Aug 1, 2013
    Posts:
    5
    Hi @Flipbookee , I'll like to test your current version also! Since i've already waited for the auto completion for a long time! I wish i can have chance to contribute for boost your progress :)
     
  43. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Some infomation for everyone who are awaited for the news like me ...

    The current BC3 is very good in term of performance and code completion, I can say. Very stable and lots of wonderful small features ... Generics and Extensions not yet supported but other things work flawlessly !!!

    Congratz Flipbookee for your great product !!! Very well built !
     
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Thanks @thienhaflash ! :D Generic methods are not fully supported yet, while generic types should be working in almost all cases, but we still have to verify that...

    Sending invitation PM now to @tobia88 :) Thanks for joining the fun! :cool:
     
  45. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    I'd like to test the beta as well if I could.Been looking forward to testing out the code completion.
     
  46. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Cool! :D It's still not in Beta yet, but it's very very close now, so I'll send you the Beta Candidate 4 in case you are willing to jump in a little bit earlier.
     
  47. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    I would love to test the beta and would do so everyday. Your asset looks so awesome and useful, but unfortunately right now I am completely broke and there is no way I could afford it. Let me know I would love to help out!
     
  48. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Yeah, no problem ;) please join us! I'm sending you a PM now :cool:

    Number 4 is still the latest Si3 beta candidate, and the fifth one is about to be released.
     
  49. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I've sent out the latest fixes and improvements to the brave pre-beta testing team yesterday and I'm eagerly waiting for their feedback. This was the 10th beta candidate and it has very good chances to get approved! Fingers crossed ;)
     
  50. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Could i join to beta? Im strongly c# (but other language isnt a problem) programmer who work on editor ext so i think i could well test some feature ;)