Sublime Forum

Display Functions (Java)

#1

Java ONLY

Display Functions is a ST2 Plugin that displays an object’s available methods. pressing period after an Object’s name will activates the autocomplete, preloaded with the object’s methods.

**Available Here: ** https://github.com/BoundInCode/Display-Functions

Questions, comments and criticisms are welcome.


0 Likes

#2

This is awesome! :smile:

Good work.

I have absolutely no reason to use eclipse anymore now, lol. :wink:

0 Likes

#3

really good job.

new to ST2, any idea how to format java code ?

0 Likes

#4

Update

Plugin now supports multiple method calls.

e.g.

obj.method().otherMethod()|

Feel free to report bugs or suggest new features.

0 Likes

#5

I need this for C++! :wink:

0 Likes

#6

gabriev82, that’s what the clang plugin does: github.com/quarnster/SublimeClang

0 Likes

#7

Doesn’t work for me.

Traceback (most recent call last): File ".\sublime_plugin.py", line 282, in run_ File ".\displayfunctions.py", line 45, in run TypeError: argument of type 'NoneType' is not iterable

0 Likes

#8

tretretre,

What OS are you using?
Can you check that you’re using the lastest version of Display-Functions?
And, if you don’t mind, could I see a sample of the code you were trying in on? (You can redact any info that you need to…)

0 Likes

#9

[quote=“C0D312”]tretretre,

What OS are you using?
Can you check that you’re using the lastest version of Display-Functions?
And, if you don’t mind, could I see a sample of the code you were trying in on? (You can redact any info that you need to…)[/quote]

After looking at the example, I realize that I misunderstood the behavior (I thought that it would work when calling static methods without an instance).

I did however find some bugs when removing existing functions:
http://yay.nu/w6ROTY
http://yay.nu/nFmRa2

OS: Windows 7.

0 Likes

#10

Just pushed a fix to github.

The regex for getting the methods is now fixed (it won’t display ‘if’ or ‘return’ anymore). The plugin now removes any methods that were commented out.

@Tretretre, as for the second bug, did you “.” to trigger Display-Functions? It looks as if you triggered the default autocomplete w/ ctrl+space.

0 Likes

#11

No, it was triggered with “.”.

The last commit always have this behavior, even when methods exists.

0 Likes

#12

Hopefully all issues should be resolved.

If not, could you be more descriptive:

  • What is happening?
  • What’s the expected behavior?

BTW, opening an issue through Github is most likely faster and more efficient than posting a bug here on the forum.

0 Likes

#13

Thanks for the fix, works great now!

Found another bug, but I opened an issue on github this time (as well as sent a pull request with a fix).

0 Likes

#14

Ooh, if only this was for PHP :confused:

0 Likes

#15

UPDATE

  • Now supports “super.”
  • Now adds the methods of the parent class to the autocomplete

Please report any bugs or feature requests to the github page: https://github.com/BoundInCode/Display-Functions/issues

0 Likes

#16

Another big update.

  • Now lists the parameters.

  • Parameters come pre-highlighted for easy insertion.

Once again, please let me know if you have a feature request or found a bug.

0 Likes

#17

Can you add PHP support ? :wink:
Just replace the . by -> or ::

0 Likes

#18

[quote=“oxman”]Can you add PHP support ?
Just replace the . by -> or ::[/quote]

Maybe, but it will require a pretty big change. Mostly because Java is strictly typed and PHP is loosely typed. I’ll be working with PHP in the upcoming months, so we’ll see.

0 Likes

#19

[quote=“oxman”]Can you add PHP support ? :wink:
Just replace the . by -> or ::[/quote]

You want SublimeCodeIntel for PHP :smile:

0 Likes

#20

no because SCI need to parse/refresh all your codes, SCI is heavy…

0 Likes