Ctrlflow Blog


Recent Posts

Linked Mode: Code Snippets at Your Fingertips


Java Developers using the Eclipse IDE have become accustomed to numerous keyboard shortcuts, context menus, or even complex dialogs to initiate searches for code. But this makes the act of searching a conscious (and often distracting) choice, in particular when you have to wait several seconds for your search results.

Ctrlflow Code Search Professional’s Linked Mode changes that: With Linked Mode enabled, the Code Search view instantly offers you helpful code snippets that fit the current context, i.e., the code you are working on.

Click to Search

If Linked Mode is enabled (which it is by default), all it takes is a click in the Eclipse Java editor: The Code Search view immediately shows you snippets related to whatever you just clicked on.

Suppose you are developing a JavaFX application and are curious how to use the Shape.setStroke(Paint) method. Just click on any reference to it and the Code Search view immediately fills with answers to common questions: Where is this method called in your code? And what arguments do you typically pass to it?

Linked Mode search showing code snippets for method Shape.setStroke(Paint)

Unlike traditional search tools, Ctrlflow Code Search Professional does not only index where something is found, but also what the resulting expression looks like. You thus not only know in what files you called Circle.setStroke(Paint), but also what the most common arguments to the method were and whether anybody has passed null before.

Search as You Type

But you don’t even have to click to initiate Linked Mode searches. With Linked Mode enabled, Ctrlflow Code Search Professional automatically performs suitable searches while you are typing.

For illustration, let’s assume you have just declared a new local variable of type Font and are now pondering how to initialize it. As soon as your cursor sits to the right of the =, Linked Mode will have performed a search for you and display the results in the Code Search view.Linked Mode search showing code snippets for type Font

You can thus quickly glean what expression’s have been used before to obtain an instance of Font. Maybe one of these code snippets is just what you need to initialize your variable.

If you are now curious and want to learn more about what Linked Mode can do, have a look at the user manual.

Ctrlflow Code Search Professional

Learn more about all features