Sigasi Eclipse Blog

Sigasi becomes an Eclipse Solutions Member

Sigasi has been building on Eclipse since its earliest days. Today we have taken an extra step as we have been accepted as an Eclipse Solutions Member.

We have long been convinced that a solid framework like Eclipse helps everybody. The application developer can reuse a big portion of the Eclipse framework (standing on the shoulders of giants, so to speak). The end user has a single familiar user interface and can benefit from over a thousand Eclipse-based solutions.

As fresh Eclipse Members, we are proudly listed along some very interesting companies. We will make every effort to be worthy of this.

Key shortcut reminder popups in Eclipse

Using keyboard shortcuts makes you a lot more efficient compared to using your mouse. But how to learn all shortcuts in an unobstructive and efficient way?

The users of our standalone VHDL development environment have certainly noticed the subtle popups with the keyboard shortcut, every time you click a button or menu item. This effect is achieved through the MouseFeed plugin. MouseFeed helps you to form the good habit of using keyboard shortcuts.

How can you enable this feature if you are using a standard Eclipse distribution? You just have to install the MouseFeed plugin.

MouseFeed popup for Open DeclarationMouseFeed popup for Open Declaration

Installation

  • Click Help > Install New Software...
  • Enter http://update.mousefeed.com in the Work with field and press Enter
  • Some plugins should appear
  • Select MouseFeed 1.0.0
  • Click Next (2 times), accept the license and click finish.
  • Restart Eclipse

Note

For die hard keyboard fetishists, MouseFeed offers an interesting option in its preference page to enforce the use of keyboard shortcuts (Preferences > Mousefeed > Action invocation). If you enable this preference, every time you try to start an action with your mouse that has has a keyboard shortcut, the action will not be executed; instead the popup will show you the shortcut. This way you are forced to learn and use the shortcut.

Pictures from last Belgian Eclipse Users Group

I have put the pictures from our recent Belgian Eclipse Users Group meeting on Picasa.

Apparently I forgot to take a picture of Peter (ITelegance). I must have been to impressed by the undersea robots... Sorry Peter.

Job opening for R&D engineer at Sigasi, Ghent Belgium

Sigasi is looking for a motivated software engineer to bring its hardware development toolkit to the next level. To apply for this job, visit our job site.

How to implement "highlight matching brackets" for your custom editor in Eclipse

For our VHDL editor view I wanted to implement highlight matching bracket like it exists in JDT. I had to dig a lot longer in the JDT code than anticipated to find out how JDT implements this functionality. As so often is the case in Eclipse development, in the end this turned out to be really easy. It was again a matter of finding with few lines to add...

The key is to override the configureSourceViewerDecorationSupport method from AbstractDecoratedTextEditor in your editor class and call the setMatchingCharacterPainterPreferenceKeys method. Note that the method name contains character and not bracket, which explains why I had to look so hard to find it.

public final static String EDITOR_MATCHING_BRACKETS = "matchingBrackets";
public final static String EDITOR_MATCHING_BRACKETS_COLOR= "matchingBracketsColor";
 
@Override
protected void configureSourceViewerDecorationSupport (SourceViewerDecorationSupport support) {
	super.configureSourceViewerDecorationSupport(support);		
 
	char[] matchChars = {'(', ')', '[', ']'}; //which brackets to match		
	ICharacterPairMatcher matcher = new DefaultCharacterPairMatcher(matchChars ,
			IDocumentExtension3.DEFAULT_PARTITIONING);
	support.setCharacterPairMatcher(matcher);
	support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS,EDITOR_MATCHING_BRACKETS_COLOR);
 
	//Enable bracket highlighting in the preference store
	IPreferenceStore store = getPreferenceStore();
	store.setDefault(EDITOR_MATCHING_BRACKETS, true);
	store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128");
}

Bracket highlighting is configured by two preference keys in a key store: one for enablement and one for the color of the box around the matched bracket. In the above code fragment I forced matching bracket highlighting with store.setDefault(EDITOR_MATCHING_BRACKETS, true); in neutral gray (store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128");).

I hope this can save you some time,
Hendrik.

Syndicate content