Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Utilities Script Inspector 3

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

  1. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    hello my friend ! any news about unityscript auto completion ?

    Many thanks

    ** its impossible to life to keep on without script inspector, with this will be even better! Many thanks !
     
    Flipbookee likes this.
  2. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Hey @angelodelvecchio, no news yet. I'm still trying to finish Find All References and Rename first which will get Si3 to version 3.1, a point at which I will have a little more space to breath ;) because then Si3 will be fulfilling all of the everyday needs for C# programming! This may be ready in as soon as two weeks (but no promises yet ;)) and only then I can think about adding support for other languages.
     
    angelodelvecchio likes this.
  3. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Hi Flipbookee,
    Strange issue with SI 3.09. In a custom inspector editor script I wrote (inheriting from Editor), DestroyImmediate is showing a red squiggly underline. It also doesn't show up in the auto complete. In further investigation, none of the Destroy methods are showing up in Autocomplete unless I prefix them with GameObject.. Works fine in classes inheriting from Monobehaviour. Compiles fine, but SI shows it as error.

    Here is what C# script definition looks like.
    Code (CSharp):
    1.  
    2. using System;
    3. using UnityEngine;
    4. using UnityEditor;
    5. using UnityEditorInternal;
    6. using System.Collections.Generic;
    7.  
    8. [CustomEditor(typeof(SpawnWave))]
    9. public class SpawnWaveEditor : Editor
    10. {
    11.  
     
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Yes, I see... :confused: I'm investigating...
     
  5. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    I've found the bug and I fixed it. I have to test the fix a little bit, then it will be released... Thanks for the great find!
     
    FireMutant likes this.
  6. s1m0n1stv4n

    s1m0n1stv4n

    Joined:
    Sep 14, 2012
    Posts:
    16
    Hi! Does si3 have a "move line" shortcut?
    I mean a function like holding Alt + Up/Down in other IDEs, which basically moves the line that holds the caret up or down in the code.
     
    Flipbookee likes this.
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Ah, good that you reminded me! That will be only a few lines of code, so I'll add that just now ;)

    I'm trying to finish the Find All References for this weekend, so Alt+Up/Down will be available in a few days in version 3.0.10 :cool:
     
  8. s1m0n1stv4n

    s1m0n1stv4n

    Joined:
    Sep 14, 2012
    Posts:
    16
    Wow, you were reading my mind. I was just wondering about Finding All References as it might the last missing piece.
    Thank you very much! Si3 seems to be evolving into a very very strong and useful IDE. I mean it is already.
    I have some further question tough:
    Do you have any plans on adding git support later?
    Do you think after unity introduces communication with editors through a rest api, debugging could be accomplished using script inspector?
     
    Flipbookee likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Well, that and at least Rename refactoring is what I'm still missing. But then I'm pretty sure once we get the Rename there will be requests for other refactorings too, so this is kind of a never ending task :)

    Si3 supports the natively integrated VCS' and for now also P4Connect. If you know of any nicely working git plugin for Unity already I will be very happy to integrate that with Si3, but otherwise I didn't plan to roll in my own code for supporting git. I have never used git actually, so I might be missing something here - for example it might be ridiculously easy to use git from Unity and I don't know about that? :p

    The rest api is not going to help Si3 anyhow because that's only intended to be used for connecting Unity and MonoDevelop more tightly. Si3 runs inside Unity and it has full and direct access to everything within that same process.

    I've spent a little more time in the last few days researching different approaches for adding debugging support to Si3. As it stands now, debugging will initially be supported for builds running outside of the Editor since this is the easiest part and pretty straightforward. The next step which is also easy and straightforward - debugging code that runs in the Unity Editor using another instance of the Editor :p which doesn't sound that cool, but I'm sure we'll still find that kind of useful until we get to the third step. The third step is the really cool one - it will allow in-process debugging inside the Editor, but unfortunately this will require much more work, it isn't straightforward and may need some additional research. But we'll get there as well! :cool:
     
  10. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    @Flipbookee

    Hey, please do not forget to add support and auto-complete for the preprocessor directives and Platform Dependent Compilation.

    Also, I'm getting errors in SI3 for these lines:

    Code (CSharp):
    1. int a = (int)(System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, System.DateTimeKind.Utc)).TotalSeconds;
    2.  
    Code (CSharp):
    1. XmlNodeList bannerinfo = new XmlDocument().SelectNodes("foobar");
    2.  
     
    Flipbookee likes this.
  11. s1m0n1stv4n

    s1m0n1stv4n

    Joined:
    Sep 14, 2012
    Posts:
    16
    You bet! Nothing is enough... ever :)

    A full blown Git support is not that important, what I could imagine is a convenient button to commit changes( and maybe a compare), so you don't have to leave unity to make that happen all time. But it is not something that people can't live without, I think.

    If you go down the road of implementing a debugger of any kind (which is so good to see you do), I'm absolutely sure that switching to si3 would become a no brainer to many many devs. Only the idea of not leaving Unity for such tasks is so attractive, that I can't imagine anyone could return some other half working IDEs (especially on osx), after having a taste of si3.
     
    Flipbookee likes this.
  12. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Yes, you're right! :)

    The first one is a known issue and it will be fixed. The second one just works fine for me. Have you added a "using System.XML;"? :confused:
     
  13. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    I was thinking a little bit more today about the third step (the cool one) and it doesn't actually sound that difficult as I thought at first. It isn't trivial, of course, but also it isn't that hard. The biggest task I see in this is the conversion of Mono.Soft.Debugger library from C# to C++. One of the approaches which currently sounds as the most promising one is to make that part run as a native thread instead of a managed thread so that the managed debugger will not suspend its execution on hitting a breakpoint. There's a lot of code in that library but the nice thing is that it's written very clearly so understanding what it's supposed to do is not an issue. Also the syntax of C# is kind of close to C++ which will reduce the amount of typing, hehe ;)

    It will be great if someone is willing to give me a hand with that! :) If not, then I'll have to do all that by myself. But hey, working on something as cool as that is just amazing, challenging, and totally worth all the efforts in exchange for some prestige and glory! Especially because this is something that hasn't been done before (well, at least not in Unity) and because many people wouldn't even think it's possible (including Unity staff, hehe) :cool:

    Switching to Si3 is a no brainer even now ;) and it was since a while actually! Debugging feature will definitely strengthen that thought, but I don't think it will change much about making Si3 more popular than what it is now or what Si2 used to be, mainly due to the lack of support from UT side. That would go against their new strategic partnership with M$ :p
     
  14. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Hi Flipbookee,
    I know you get tons of requests for features ;), but I'm going to push my luck and request bookmarks again. I don't know if a lot of people use them, but they sure make jumping around source files much more efficient.

    Thanks for your consideration! :rolleyes:
     
    Flipbookee likes this.
  15. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    @FireMutant, to be honest I've never used the bookmarks in any editor :p so it's difficult for me to understand their importance. I'll also have to learn how that works in other IDE's first, or you could just explain me what's so special about that, how do you use them, and the most important thing - if you'd be redesigning that feature from scratch what would you do differently to make it more useful and better fit your needs?
     
  16. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    @Flipbookee, the way they usually work is that you use a hot key to place a limited number of temporary anchors in your code files that you want to come back too quickly and frequently. You can toggle them on/off and then you can usually use hotkeys to cycle forwards/backwards through the bookmarks and/or use hotkeys such as Ctrl-1, Ctrl-2, etc. to jump directly to the specific bookmarks (cycling is usually adequate). Also, there is usually a clear all bookmarks command. I find them extremely useful when I am jumping back and forth between the declaration area of a source file and different functions and when I am referencing more than 1 source file and need to jump back and forth between sections of the different files. It saves a lot of mouse clicks and scrolling, especially for people who don't like to leave the keyboard too much during coding. I like the way Visual Studio does it, but the hotkeys in VS are terrible (although they can be redefined). They also provide a lot of unnecessary options, IMO. All you really need is toggle, clear, next, previous

    Maybe I'm the only one who uses this feature, but being old :oops:, my memory is not as good as it used to be, so I have to refer back to class and property definitions often while coding functions, and bookmarks make that rather simple. :p It's one of those things that you don't miss until you've used it and are used to it, and then it's not there anymore, like using 2 monitors.

    I know SI3 has Alt Left/Right arrow to go prev/next breadcrumb, but that is not really the same, although helpful.

    If you do not feel there is value in adding this feature, it is all good. I use SI3 90% of the time when I code and it is still the best asset I ever purchased from the Asset Store.

    Sorry for the essay. :D Thanks for following up!
     
    Last edited: Nov 28, 2015
    Flipbookee likes this.
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Hey @FireMutant, thanks for the explanation! :)

    Ctrl+Shift Up/Down in Si3 currently finds the previous/next occurrence of a word. Alt+Left/Right goes backward and forward through cursor history and this works much better in Si3 than in VS! In Si3 you can go for example back a couple of steps, do some changes there, then go forwards again to get back to where you started, but in VS you can't do that. In Si3 when you go to definition you can go back with Alt-Left, do some changes there, then go forward again to see that same definition, and then go back to continue. You can't do that in VS, hehe :cool:

    I'm curious, if the choice of hotkeys in VS is not the best, what would be a better option?
     
  18. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    @Flipbookee, yeah, I noticed I used the wrong keys in my explanation, and I must have edited after you already saw it, sorry. :oops: Anyway, I just always hated the double key sequence Ctrl-B, T, Ctrl-B, N, & Ctrl-B, P that VS uses (Reminds me of the word processors from the 80s). Seems awkward. But, if those are the only key combinations available, it is a very minor inconvenience.
     
    Flipbookee likes this.
  19. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,818
    Is this something like the Region code feature?

    Thanks,
    jrDev
     
    Flipbookee likes this.
  20. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    @jrDev yes, very similar but without need to alter the code, across all the files in a project and with keyboard shortcuts. But then also without names as we have for regions... Or maybe that's something to be considered - "Named Bookmarks"?
     
    crafTDev and FireMutant like this.
  21. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    @Flipbookee, Name Bookmarks!?! Wow, you always do everything 110%, don't you? I never thought of that until you mentioned it. It could be cool if you implemented it like the Ctrl-Tab change tab feature, with the popup window, although "naming" the bookmarks might slow down the marking process. I've always used bookmarks as very temporary markers, and no more than 2 to 6 at a time, but I must admit, Named Bookmarks do sound interesting! :)
     
    Flipbookee likes this.
  22. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Hey @Flipbookee, sorry took me so long! Been busy! Short version: New Job, playing with quad copters, learning different micro controllers and FPGA coding for the quad copter, Setting up new computer (was doing all the coding for that KeyboardHook I made on my old work computer, no more of that, so had to set up a new one before I could even get back to it)... life, etc...

    Anyway... so you know: The hook I made only gets event's on keydown, no bug on your part or anyone else's (except mine :p) - More so just "not complete". I'll try and get to it this weekend, I'm pretty settled now finally.

    On a plus side though, my new job has me using Unity basically full time atm (least for this project). So, I use SI every day now! :D


    Here's my evolving wish list I've been silently adding to! :p - Oh, and love the find and replace in all files btw. I only just upgraded, so haven't used it much yet, but I don't care if that's bad practice, call me evil, but I love it! :D

    Feature Requests :p:
    1. Box selection like in VS (big on my mind) - ie hold alt while selecting to drag a box across multiple lines. - I never knew it until I started working with VS more (had to before I got SI at work) but if you select a box across multiple lines, and type (or paste), it will actually act on all selected lines! VERY useful when your doing a lot of semi repeating code like a bunch of property setters or something.
    2. Simple one I thought of while brain-farting late at night. Alt+Cmd+Drag moves the code window like you would in the scene view (not just up and down either)! :cool: Maybe with inertia, if you want to get fancy. - Just one of the little things us Apple users get stuck with when we sit down on one of those darn PCs! - Scrolling SUCKS! :p
    3. Show auto complete anytime you start typing at a new place. I can't count the number of times I've deleted what I had up until the '.' just to get completions back, I'm sure you have a keycombo for this, but like @mcmorry, god if I can remember them all! (Especially now between 2 OSs!)
    4. Simple one, probably could do it my self since you have the fancy size change on mouse over as an example, but: Tabs with widths the width of the name - padded left and right - Plain and simple, no mouse over fancy-ness (lots of long names in my code :p)
    5. Support for user defined XML documentation on mouse over, and completion for the comments to generate it. - Fairly lower priority for me as I've never actually used it, but would be really nice now that I'm finally working in Unity collaboratively! :)
    6. Oh, and a little one, now that you're working on the show all references :D:D****THANK YOU BTW!!!!!!!****:D:D Show the number of references above method declarations (optionally of course), and red it out or something if there is 0 references. Would LOVE that! :D

    Also, few bugs I've noticed, sorry, all of these notes I've been keeping on my work computer, only just got to a point where my personal one is set up enough to confirm and log in to show you. - Trying to keep my worlds totally separate this time!
    1. .normalized is marked as an unknown symbol in this example (falsely):
      Code (CSharp):
      1. startPlane = new Plane((transform.rotation*Vector3.back + inputConveyor.transform.rotation*Vector3.back).normalized, startPoint);
    2. Auto completion popup occasionally displays on the wrong display when using multiple displays. - I'll have to play with that again to remember, but, try coding on one screen, then move the window to another and continue, pretty sure thats when it happens.
    3. No underlining of generics on incorrect initializations: list<thing> aThingList = new list<ADifferntThing>(); is somehow ok :confused:
    4. Not a bug of your's, but would be really cool if at least you fixed it! Multiple displays, leave a SI window on one, then remove the display, it stays there (on a non existent screen) but because it's not a normal window... The usual tricks (that at least I'm aware of) don't bring it back. - Especially annoying as every new SI window opened docks with the previous, which is on a display that no longer exists! ("Menu>>SI>>Pull windows to mouse pos" Plz! :D)
    Note, all of that was on SI 3.0.8 (something). - So, take with grain of salt, but might want to check. - Sorry again for the delay...

    WOT!!!!!! :p

    Smiley! :D
     
    Last edited: Dec 3, 2015
    mcmorry and Flipbookee like this.
  23. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    SI3 is really stable for me, not found any major problems during intense daily usage :) Congrats man !

    And a bad news since a long time :) I was trying to close other SI tabs, can not reproduce, suspectedly unity's part :D ...
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.EditorWindow.Close () (at C:/buildslave/unity/build/artifacts/EditorGenerated/EditorWindow.cs:638)
    3. ScriptInspector.FGCodeWindow.CloseOtherTabs () (at Assets/Plugins/Editor/ScriptInspector3/Scripts/FGCodeWindow.cs:1403)
    4. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/buildslave/unity/build/artifacts/EditorGenerated/GenericMenu.cs:115)
    5.  
     
    Flipbookee likes this.
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Hehe @thienhaflash you know, I'd never do that without you reporting all the bugs. ;) Thanks!

    That one looks like a Unity thingy, but I'll check and see if I can repro it... Was that on Mac?
     
  25. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Welcome back @inventor2010! :)

    Thanks for all the suggestions and reports! I used to like box selections until I discovered multiple cursors/selections like in Sublime Text - this is much more powerful feature! One day Si3 will do the same ;)

    I've tried this, there's no way to do that in Unity currently because mouse clicks on tab titles are handled by Unity. I'm overdrawing the tabs to make them expand or shrink, but I can't handle mouse clicks so the size has to match the original or otherwise clicking one tab will open another tab. Expanding on mouse over is a very fancy trick that always ensures that the tab under the mouse pointer is the same one as the original to mask out the clicking limitation. It's only a visual effect, an illusion, and I'm glad if I made you think I can actually change the tab size :p but unfortunately I can't.

    I know about the bugs number 1 and 3, and I'll check if I can do something about 2 and 4...

    A few important things you may have missed in meanwhile:
    - I managed to use the debugging library from Si3! :D I can attach it to players or editors, but not yet to the same editor itself.
    - I'm pretty sure I can modify the debugging library to allow Si3 to attach to itself too! In the beginning I thought I'd have to rewrite the whole library but it turns out rewriting only the sockets thread with its communication protocol should be enough. The rewritten part cannot use any managed code, so it has to be all a native library.
    - UT and MS have teamed up. They created a more tightly integrated debugging from VS and recently also added support for Editor debugging from VS Code! Which is great, except that I have to compete with two huge software giants now, using only my two hands :eek: so a second pair of hands will be more than welcome! :D Let me know if you get tired of playing with quadcopters and want to work on something waaaay more exciting! :cool:
     
    inventor2010 and mcmorry like this.
  26. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    :p!

    Too many interesting things for me to work on! - Need to trash them all and finish the cloning machine! - Then I'd be good! :cool:

    To be honest though, (cause I did read back and see about MD and your progress on debugging), I'd almost rather go with just attaching a second Unity process for the moment like we talked about. Simpler, prove out the UI, get usefulness, use a debugging library in a release, and get as much connection with it as possible to pull out all the 'cool' stuff, and then go into making it work in-process if possible. I think just having the debug in Unity and SI would beat MD or VS, even if you needed a second instance... Maybe that's just me?

    Not to take away the fun (cause you can't, I mean, mention it again, and I'll go right back into it :p), but from an end user stand point. I'd personally rather have some simpler things like more powerful find and replace (regex), one that I forgot to bring back up: parameter completions ala Xcode *really miss that* :( - or - at least fill in the body of override methods, not just the name. I try to minimize the need for debugging, and stick to coding, so coding features really are a bit more useful to me... Maybe thats just cause I'm in Unity (with a poor debugging workflow).

    I am very happy to see work on the show all references though! :D - I almost want to wait for that now before I dig into your code! :p



    'Weird' on the tabs btw! - Tricky devil! :p - Must of missed that... I actually hate tabs and would rather see a window similar to the project window, but with 'bookmarks' like you and @FireMutant were talking about, only, it would only show code *with* the normal directory tree, not like when you search by type in project. - I just couldn't ask for that, seems like you have enough! - Thought the tabs would be easier. :(

    If I'd like to help improve anything in SI at this point though, it would be adding regex's to Find & Replace, tying the same window's background code into the current find field in the code editor window, adding a replace field, and then making that project window. Theres a few other things I'd *like* to play with, but at this point... I want that find references! :D - Might need a beta tester if you want help sooner! :p
     
    Flipbookee likes this.
  27. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Yes, the coding part is more important also for me than debug. I use MD for debug very very rarely. And I don't really mind to keep using it if needed. But I still have to use MD for the daily coding job because I still feel somehow uncomfortable with Si3 for missing (or hidden) shortcut, or not enough informative autocomplete, and refactoring.

    Also another feature that I use continuously is the CMD+. in MD that focus on the search box on the top-right where I can search by type, function names and filenames. I don't rely at all on the tree view when the project is very big.
    I use it only when I know that a file that I need is in the same folder of the one opened. In MD the tree automatically select the opened file and it's easy to search for sibling files. In Si3 there are two steps, I have to right click on the tab and ping the file. Maybe small icon in the Si3 topbar (after //...) could help.
     
    Flipbookee and inventor2010 like this.
  28. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    @mcmorry, you can do that much faster with Shift-Cmd-O (Shift+Ctrl+O on Windows) - this opens a file open dialog in the same folder as the last script you worked with. There's no need to ping. ;)

    Also if you know the filename or only part of it there's a very useful Open Any File command on Alt-Cmd-O (Alt+Shift+O on Windows).

    Both commands are listed in the main Si3 menu, if you ever need to see the shortcuts.
     
    mcmorry likes this.
  29. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Oh, and yes, some shortcuts are different on Windows and OS X because there's no way to make them all same. Alt-key or Alt-Shift-key shortcuts on OS X cannot be used because these are bound to exotic characters, while on Windows that's not the case and tools like Visual Assist X and ReSharper actually use those kind of shortcuts, so many users know them by heart (including me). Also on Windows there's no Cmd modifier, which automatically forces the shortcuts to be different. The Win key on Windows is same as the Cmd key on OS X, but many such key combos already do some global OS actions on Windows and can't be used. It's same with the Unity Editor, most of the shortcuts are already different even with Cmd/Ctrl substitution, which limits the availability of remaining equivalent shortcuts across both OS's.

    I will include the cheat sheet made by @Sarper Soher, one for OS X and one for Windows with all the shortcuts listed on one page. Then maybe you can print it and keep it on your desk ;)

    My keyboard customization code is still not ready, but I'm not even sure how helpful will that be. There are so many shortcuts in Si3 and Unity has already taken many other combinations, so there's no much space left for alternatives. :-\
     
    mcmorry and SarperS like this.
  30. Victor_Kallai

    Victor_Kallai

    Joined:
    Mar 5, 2014
    Posts:
    123
    No, I have added System.XML, otherwise I would have got a compile error. The problem is that SI3 do not seem to recognize SelectNodes method from XmlDocument class. Whenever I type:
    Code (CSharp):
    1. new  System.Xml.XmlDocument().SelectNodes("foobar");
    I get this:

    Hope this helps.

    On another topic, please make the trello page with upcoming features, so we can all vote on them. This way you'll know which are the most wanted ones. Cheers! :)
     
    Flipbookee likes this.
  31. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    @Victor_Kallai: Ah, I see! This is fixed and it works in my current unreleased version :) it's the same bug as the one reported by @FireMutant. I just reverted that fix and I see, SelectNodes is not recognized :p so please wait until tomorrow for 3.0.10 ;)

    Yes, the idea of adding a Trello page was mainly for collecting your votes, because often it's difficult for me to decide what to do next. :p But I won't have time to do that before Christmas because I have to finish the Rename feature too in the next 10 days or so. Over the holidays I will not be able to release any new update for Si3, so that will be the best time for adding it to Trello :)
     
    Victor_Kallai and mcmorry like this.
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    @inventor2010, I've spent a couple of days testing my Find All References and I found at least two big bugs in it already! I've been using it since then for almost two days and now it seems like it's fully working, so it will be released by tomorrow at latest :cool:
     
    inventor2010 likes this.
  33. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Very eagerly awaiting! :p

    By the way, I like the idea of the 'non-aggressive auto-complete', but can I suggest that when it's enabled, the top hit is still fully selected, that you just have to click enter to get it? Currently you have to click the up or down arrow (or click it) first, which seems rather non-intuitive.
     
    Flipbookee likes this.
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Oh sorry, delayed again - I had to do a few more fixes, but I think it's done now. And it's so cool now :D

    I'll have to expand the readme, bump the version up, and prepare all for upload, but it's getting too late here. I don't think I'll be able to finish it tonight, so I'll send you a copy in a minute if you want to give it a try :)

    Even when the top hit is not fully selected it can still be accepted with a Tab, no need to press up or down keys. This can be changed, of course, but the idea was that you'd almost never press a Tab at that place, which makes it a valid key for accepting even non-fully selected completions. Enter doesn't meet that criteria... Or, wait... Maybe it does?

    You can easily change this, in FGListPopup.cs find this line:
    Code (csharp):
    1. var acceptWith = currentItem < 0 ? "\t" : "\t\n {}[]().,:;+-*/%&|^!~=<>?@#\'\"\\";
    and add a \n next to that lone \t
     
    inventor2010 likes this.
  35. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Ok, that makes sense.

    Enter actually does make sense too though I think, in-fact thats what Xcode uses. Xcode actually uses tab to autocomplete up to the next capital letter of the selected completion.

    Example:
    Let's say you have some class names as such:
    SomeClassBase
    SomeClassChild1
    SomeClassChild2

    If you type 'S', lets say you get a completion list of:
    SavyClass
    SomeThing
    SomeAstonishingClass
    SomeClassBase
    SomeClassChild1
    SomeClassChild2
    SomeOtherClass
    SomeUniqueClass

    So, let's say you want all completions that start with 'SomeClass', rather than typing 'SomeClass', or trying to filter the others out in your head (especially difficult when scrolling through them is required):

    Having typed S, lets say you get 'SavyClass'
    Move down 1, then click tab: Now you have 'Some' typed
    Down and tab again: Now you have 'SomeClass' :)

    Not sure about Xcode, but Shift+Tab could then walk back up again :cool:


    Off to bed my self! :p
     
    Flipbookee and mcmorry like this.
  36. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
  37. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hello,

    I just bought SI3 yesterday and I'm a bit lost her ;-) i precise I'm running it on Mac OS

    I didn't find out how to manually open the auto-completion window - when I start writing a variable or class name it opens automatically but now way to open it manually when for example I'm changing a variable name and want auto-completion.

    Thanks
     
    Flipbookee likes this.
  38. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Hey @Kiupe, to manually open the auto-completion window first make sure the "Show Auto-Complete on 'Esc' key" option in Si3 preferences is turned on, then you can toggle show/hide the popup with Esc:
    upload_2015-12-8_11-27-18.png
    I just noticed this option is off by default on OS X and it's turned on on Windows, which is not what I meant, it should be the opposite. So please turn it on manually, and I'll fix the default settings...

    On OS X Ctrl-Space and Cmd-Space are both taken by the OS, so I couldn't use any of these, that's why it's on the Escape key. But let me know if you have any better suggestion, I'll add that too as an alternative shortcut :)
     
  39. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Thanks, I just turned that option on !
     
    Flipbookee likes this.
  40. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Is true that they are used on OS X but what is the XCode shortcut? Esc is very very weird. Also when I started using MD I changed completely these OSX shortcuts to allow me to code easly.
    So even if some shortcuts are already taken by OSX this doesn't stop us to customize them. So for me it is still valuable the feature of shortcuts customization. :)
     
    Flipbookee likes this.
  41. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Actually, Xcode uses esc for open and close completions, just like SI (just checked with Xcode 7.1)... So, not so weird.

    I think I'm in heaven!!! - I honestly don't know how I lived without this! :D - I just used it all day at work. I had to tie some of my work together with a colleague's, and I was breezing through their code as easy as mine! :cool:
     
    Last edited: Dec 9, 2015
    Flipbookee likes this.
  42. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Oh. And @Flipbookee, noticed a problem with events:

    Code (CSharp):
    1. public delegate void myDel(int anInt);
    2. public event myDel myEvent;
    Try typing:
    Code (CSharp):
    1. int someInt;
    2. myEvent.Invoke(someInt);
    Invoke won't autocomplete, and it's underlined if you type it manually.

    (3.0.10 pre-release - and 3.0.9)
     
    Flipbookee likes this.
  43. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Yeah, I see... Nice find, but the fix will not come in 3.0.10 - I just submitted that now and it should be available in a few minutes ;)

    In C# there's no need to use Invoke method and we can invoke the delegates and events with myEvent(someInt); which is exactly the same as doing that with the Invoke method... But yeah, Si3 must understand the Invoke syntax as well, so I'll fix that. I also noticed BeginInvoke and EndInvoke are also missing and not recognized for delegates and events, these need to be fixed as well.
     
  44. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Oh, that was quick now! :)

    Script Inspector 3, version 3.0.10
    is waiting for you in the Asset Store!!! :D
    Release notes:
    - Find All References feature with results filtering
    - Alt+Up/Down keys now move and re-indent line(s) - thanks @s1m0n1stv4n
    - New search box behavior:
    * Enter/Shift+Enter finds next/previous occurrence and keeps keyboard focus on search box
    * Escape moves keyboard focus back to code editor
    - Popup windows will close on any keyboard modifier and up/down arrows
    - Resolving anonymous method expressions
    - Updated for obsolete API in Unity 5.3
    - "Show auto-complete on Esc" is now turned on by default on OS X instead on Windows - thanks @Kiupe
    - Fixed Go To Definition in some cases
    - Fixed resolving method overloads
    - Fixed base type references in some reflected types - thanks @FireMutant & @Victor_Kallai

    Enjoy! :cool:
     
    mcmorry and inventor2010 like this.
  45. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Mac + SI users:

    Updated keyboard hook! - Now (finally:p) supports key repeat. :)

    I'll go back and update my posts at some point, and finally make an asset or wiki item for this (know I said that before - but life happens :p). - Too tiered now. - @Flipbookee, again, please feel free to simply include it - You don't need to worry about including the Xcode source or anything, just saying thanks inventor and pointing here in the C# file would be nice!

    Note, I'm using a newer Xcode, and OS, so, would be good if people can tell me if it's still working for them. @mcmorry @schplurg @SpectralRook @mStep @jrDev (just to name some who commented before)... ??
     

    Attached Files:

    Shyft, petey, Xeir and 6 others like this.
  46. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Yay! Great and thanks! :D

    Are we also going to get a 32-bit version? The 64-bit didn't work for me and for someone else too but I can't remember who. This was also the main reason why I was hesitating to include the plugin with Si3 because there are two versions and I'm not sure which one of the two will work for some people and not work for some others... If for example the 32-bit version works for everyone then I could include that without problems :)
     
  47. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Suposedly, I compiled this one as a universal 32bit/64bit library, but thats kind of why I dumped it here again and wanted people to try it. Like I said, I'm on a much newer Xcode version now because I needed it for other things, and un-fortunatly, Apple has been slowly removing support for 32bit compilation. I actually tried compiling as 32bit and it didn't work for me.

    So, if it doesn't work for anyone, I'll just have to go back and compile the 32bit version on an older Xcode+OS (I'm just kinda running out of HD space! :p). - I seem to remmember that just the 32bit version worked for everyone, so either unity dropped 32bit support, or the new Xcode compiler settings are just messed up for 32bit).

    I thought you were holding back for the 4.x free users or something. - Was going to suggest just including the unitypackage it self.
     
    Last edited: Dec 9, 2015
    Flipbookee likes this.
  48. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    on OS X Yosemite 64 bit is working. Thank you very much!
    It seems that the repetition speed is slower than the one that I have when typing (I set it to the fastest possible). Do you know why? Also I have to press CMZ+SHIFT+Z for very long time before to have any response.
     
    Flipbookee likes this.
  49. inventor2010

    inventor2010

    Joined:
    Nov 3, 2010
    Posts:
    124
    Oh da picky picky! :p - I should talk right @Flipbookee?

    Yeah, I know why. - I #defined the rate and the delay in the framework... I didn't even know you could set them. I just experimentally determined what they are in OSX. - Ideally I'd get a keyCombo repeat message from the Carbon frameworks I'm using, but un-fortunatly, they only include key repeat for individual key's, not combos, so without watching every key and deciphering combos on my own... I just get the up/down, and do the delay and auto re-fire events on my own.

    Also thought that only certain combos should repeat (currently they all do), so... Got a todo list going... Really want to finish this soon though, other things I want to work on.

    I'll fix it when I know others don't have trouble. - So @Flipbookee can include it! :D -
     
    Flipbookee and mcmorry like this.
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    Yeah people, your feedback is needed! I'm going to include it in Si3 for Unity 5.0.0+ version, unless there's a way to include it in the 4.0.0+ version too but without breaking something for non-pro users.