6

I know there is a Ctrl+Space dialog box that show the methods options that I have. But if i have a method that I not fully remember the name of it and I remember only a part of the name.

For example: There is a big static class which contains tons of methods starting with "add"

add1_Buffer, add2_Render, add7_Function and so on.. now I don't remember the fully name but i remember only "Buffer".

so I want to type "buffer" press Ctrl+Space and get the "add1_Buffer" method and all the names that contain the name "buffer" in it.

Edit: By the way, i need it on the OpenGL api where there are tons of functions and i am not familiar with all of them i know only keywords, I was searching for something like in visual studio that is really fast and easy.

Reloder
  • 63
  • 6
  • I am afraid there isn't currently a way to do that, but you can ask this feature in the eclipse community – Leo Aug 14 '14 at 13:44

5 Answers5

3

If you start typing the a in add1_Buffer and then an upper B and then press Ctrl + Space you will find the correct method.

You can then continue writing the word Buffer if there are more methods starting with add and then having an upper B.

enter image description here

enter image description here


This means that you'll have to remember at least the first part of your method but hopefully you do.

maba
  • 47,113
  • 10
  • 108
  • 118
2

Add the CodeRecommenders plugin to your installation. That has a subwords completion, which the normal JDT code completion does not have.

enter image description here

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
  • Did you also downvote all the other answers at the same time that you added your answer? – maba Aug 14 '14 at 15:17
  • @maba Yes. Because I feel they are actually not useful and will even confuse people, given this very simple alternative. You might disagree and downvote my answer, I have no hard feelings about that. – Bananeweizen Aug 14 '14 at 15:24
  • I will remove my part regarding the IntelliJ since I didn't know about the plugin that you recommend. But I strongly disagree that my solution is bad and not useful. I know for a fact that there are places where you may not be allowed to install additional plugins. – maba Aug 14 '14 at 15:28
  • Accepted and changed. – Bananeweizen Aug 14 '14 at 15:32
  • You both very helped me thank you.. i need 1 upvote required to give you mine upvote :) – Reloder Aug 14 '14 at 16:01
  • You downvoted valid answers that work? I don't see how any of them are confusing. That's kind of a jerk move, IMO. – betseyb Aug 19 '14 at 16:36
  • CodeRecommenders is really slow because it sends and retrieves statistics from Internet. Anyone who is really in need of this feature should switch to JetBrains Intellij Idea which has this feature builtin and fast. – Mohamed El-Nakeep Mar 02 '15 at 19:39
0

Use search. From the Search menu at the top of the window, select "Java Search". You can limit your search to methods and use wildcards to search for *Buffer* if you know that Buffer is in the method name.

betseyb
  • 1,302
  • 2
  • 18
  • 37
0

The shortcut Ctrl + O gives an outline of the current source. So you can view and search all your methods in your current class. Use wildcards when needed.

Tom Jonckheere
  • 1,630
  • 3
  • 20
  • 37
-1

This merely meets you req: alt+/, just a replacement for ctrl+space

Currently there is no direct way to do that in eclipse. But i found these are helpful. here

This post resembles your's look at it. Similar one here

Community
  • 1
  • 1
Vignesh Paramasivam
  • 2,360
  • 5
  • 26
  • 57
  • alt-/ is a text-only command (no syntax awareness). It cycles through all words in this editor window that start with the prefix to the left of cursor. For example, " ne|" (where | == cursor) will expand to new, newPrice, next, never - as long as all these words are in your editor window. –  Aug 14 '14 at 14:22