Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

UnrealScript IDE for Sublime Text 2 / 3 | Update: Content Assist

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by MonsOlympus View Post

    See how this is showing two auto-complete options for the same thing, one listed as buffer and the other the super-class declaration of the variable?
    I think the problem is that if there is the same function/class/variable/whatever written somewhere, it will bring it up AND the buffer of where it was written.

    Also, the map selection menu that shows up when the build is finished is getting GIGANTIC, it just keeps repeating the 10 maps I have over and over again.

    Comment


      Originally posted by Eliot View Post
      After reading some of the code of this IDE, it seems clearly that zinggi is parsing the files line by line rather than token by token so I suppose that's why MonsOlympus.
      Same trap I almost fell into aye

      Comment


        Originally posted by Crazymb View Post
        (...)
        EDIT: Yes, UnrealScript accepts vectLoc = vect(0, 0, 0) as a parameter with no compile errors
        I wasn't aware of that, but I guess it makes sense, as vect and rot are no functions.
        I'll try to fix it.

        Originally posted by MonsOlympus View Post
        (...)
        See how this is showing two auto-complete options for the same thing, one listed as buffer and the other the super-class declaration of the variable?[/code]
        The buffer means that the word is somewhere in your file and thats why it picked it up. Completions from the buffer are just simple word completions, they do not work the same way as the others. (no dynamic snippet, no documentation, ...). The reason why I added the words from the buffer was to get some sort of local variable support.
        I guess I could hide the words from the buffer that are already in the list to avoid confusion.

        Originally posted by MonsOlympus View Post
        So I did this test and everything is okay here, we could be using a class here but in UScript directly accessing a class'islikeso'.
        (...)
        This is where things got really hairy and would always display auto-complete for classes, it includes the buffer as with the first picture but this just seems so incorrect.
        My plugin doesn't yet know many context specific rules. So here it's just giving you the default completions. It's quite hard to know what should be displayed in which case. So for the time being just don't do this

        [EDIT] I don't get any completions when I type 'BrushComponent.'
        Are you maybe using any other plugins that might interfere with my completions? Can anyone else reproduce this?

        Originally posted by MonsOlympus View Post
        Update: Ive narrowed down this issue to only occuring with classes that have more than a single line class declaration, classes that do work are like so;

        Code:
        class MyPawn extends UDKPawn;
        I don't understand what you mean by they work, what should happen in this case and what happens when you use a class that was declared on multiple lines? Basically I don't see why there should be a difference, as both are represented exactely the same internally

        Originally posted by Eliot View Post
        After reading some of the code of this IDE, it seems clearly that zinggi is parsing the files line by line rather than token by token so I suppose that's why MonsOlympus.
        Sort of, but not exactly. I'm reading the files line by line, but I do still consider multiline declarations. So functions declared on multiple lines are parsed correctly. For class declarations I ignore all class modifier keywords and only look on the class name and the parent name, so that could be the reason. And it's not really flexible, some strange formatted declarations might screw the parsing process.

        Originally posted by Crazymb View Post
        (...)
        Also, the map selection menu that shows up when the build is finished is getting GIGANTIC, it just keeps repeating the 10 maps I have over and over again.
        I can't reproduce this. Are you using a custom map folder or custom map extensions? As I have not really tested those.

        [EDIT] Nevermind, I found the issue.

        [EDIT2] Fixed.

        Comment




          I dont know whats causing this, I thought it was multi-line class declarations but I was wrong. Basically what Im saying though is that ClassNames are not used on their own without a leading keyword and when they are they will be in the buffer as a VariableName.

          Comment


            well yes, sure you can't use a class as is, but you could do a typecast or declare a class object variable or have it as a return type of a function.
            I could find out if it is a class object declaration (by checking if there is a var before it), but I can't think of a way to check if you want to use it for a typecast or not.
            So thats why it shows up, even if it makes no sense in some cases.
            If you or anyone else have an idea how my plugin could know for sure it's no typecast, I could remove them in those cases.

            Comment


              Well I was thinking you could make it the rule rather than the exception, typecasts dont just happen there is always something proceeding like an equals, an if statement or function call, as you say the var or local keywords. I think that would cover most cases

              Comment


                F10 navigation is not working for me. I think it happened after making some changes to the user settings (to change it to F12) but after clearing the user settings it's no longer working with the default F10 which is still located in the default settings file.

                Comment


                  Originally posted by zinggi57 View Post
                  I wasn't aware of that, but I guess it makes sense, as vect and rot are no functions.
                  I'll try to fix it.
                  It also accepts actual functions, well actually anything that works inside the function.

                  Comment


                    Originally posted by Prea View Post
                    F10 navigation is not working for me. I think it happened after making some changes to the user settings (to change it to F12) but after clearing the user settings it's no longer working with the default F10 which is still located in the default settings file.
                    are you sure there's no file that might overwrite the default setting? Maybe you have the key f10 mapped to some other action?
                    or maybe there's a conflict with another plugin that uses this button?

                    Originally posted by Eliot View Post
                    It also accepts actual functions, well actually anything that works inside the function.
                    Oh well then the regex will get really complicated. Are you good with regex? As I truly suck...
                    This is the current one for functions:
                    ([a-zA-Z0-9()\s]*?)function[\s]+([a-zA-z0-9<>_]*?)[\s]*([a-zA-z0-9_-]+)[\s]*\((.*?)\)[\s]*(const)?[\s]*;?[\s]*(\/\/.*)?
                    this "\((.*?)\)" would probably have to be changed, but I can't figure it out -.-

                    Also thanks for the nice theme!
                    https://github.com/Zinggi/UnrealScriptIDE/pull/12

                    Comment


                      Originally posted by zinggi57 View Post
                      are you sure there's no file that might overwrite the default setting? Maybe you have the key f10 mapped to some other action?
                      or maybe there's a conflict with another plugin that uses this button?


                      Oh well then the regex will get really complicated. Are you good with regex? As I truly suck...
                      This is the current one for functions:
                      ([a-zA-Z0-9()\s]*?)function[\s]+([a-zA-z0-9<>_]*?)[\s]*([a-zA-z0-9_-]+)[\s]*\((.*?)\)[\s]*(const)?[\s]*;?[\s]*(\/\/.*)?
                      this "\((.*?)\)" would probably have to be changed, but I can't figure it out -.-

                      Also thanks for the nice theme!
                      https://github.com/Zinggi/UnrealScriptIDE/pull/12

                      Here you go

                      Comment


                        Originally posted by Eliot View Post
                        Thanks you realy mutch for trying, but it still doesn't work with the example posted by Crazymb:
                        http://www.debuggex.com/?re=%28%5Ba-...n+%3D+false%29

                        God I hate regex

                        Comment


                          Originally posted by zinggi57 View Post
                          Thanks you realy mutch for trying, but it still doesn't work with the example posted by Crazymb:
                          http://www.debuggex.com/?re=%28%5Ba-...n+%3D+false%29

                          God I hate regex
                          Enlighten me a little here, does your autocomplete only work with regex? I mean, you are making a snippet (with all the variables) of the function for the autocomplete, couldn't it be possible just to look for commas and apply the snippet TAB jump thingie to any variables before it and copy paste everything between function and "{"?

                          I don't really know how you are doing it so this is just pure speculation

                          Comment


                            Originally posted by zinggi57 View Post
                            Thanks you realy mutch for trying, but it still doesn't work with the example posted by Crazymb:
                            http://www.debuggex.com/?re=%28%5Ba-...n+%3D+false%29

                            God I hate regex
                            ([a-zA-Z0-9()\s]*?)function[\s]+((coerce)\s*)?([a-zA-z0-9<>_]*?)[\s]*([a-zA-z0-9_-]+)([\s]*\(+)(.*)((\s*\))+)[\s]*(const)?[\s]*;?[\s]*(\/\/.*)?

                            Fixed :P

                            Comment


                              Originally posted by Eliot View Post
                              ([a-zA-Z0-9()\s]*?)function[\s]+((coerce)\s*)?([a-zA-z0-9<>_]*?)[\s]*([a-zA-z0-9_-]+)([\s]*\(+)(.*)((\s*\))+)[\s]*(const)?[\s]*;?[\s]*(\/\/.*)?

                              Fixed :P
                              Thank you really mutch! I've uploaded an update, just make sure you rebuild the cache.


                              Originally posted by Crazymb View Post
                              Enlighten me a little here, does your autocomplete only work with regex? I mean, you are making a snippet (with all the variables) of the function for the autocomplete, couldn't it be possible just to look for commas and apply the snippet TAB jump thingie to any variables before it and copy paste everything between function and "{"?

                              I don't really know how you are doing it so this is just pure speculation
                              The parsing of the source files works with regex. I need to get the function name (for finding the function to paste), its return value (for the object oriented completions) and its argument (for the 'dynamic snippets'). I could of course do some string manipulations to get those values as well (which I did in earlier versions), but a regex is just much cleaner and faster.

                              Comment


                                Great work, subscribed.

                                Comment

                                Working...
                                X