eclipse

Why use Eclipse for embedded software development?

Sigasi's CTO Hendrik Eeckhaut gives a talk a the DSP-Valley technology seminar on Eclipse. Everybody working on embedded systems should seriously consider Eclipse for an IDE (intelligent development environment).

Eclipse can provide the ideal development environment for tons of different languages, including C/C++, Python, Java and VHDL.

The Seminar will take place on March 30, 2010 in Eindhoven, The Netherlands.

http://www.dspvalley.com/upload/event/eclipse/index.html

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.

EDA Start-up story from the trenches

I just uploaded my slides for my Eclipse Summit Europe presentation "EDA Start-up story from the trenches" to SlideShare. For some reason adding the slides to my session page did not work, I will try that again later.

Dynamic menu items in Eclipse

I wanted to add a dynamic menu contribution item to the popup menu of project explorer. I could not immediately find out how to do this, so I decided to document it here. Eventually it turned out to be quite easy.

Belgian Eclipse Users Group Meeting at Sigasi was a great success!

Yesterday Sigasi hosted the third Belgian Eclipse User Group meeting. For the first time we reached a larger audience (I counted 23 attendees), so maybe we should have renamed it to the first real Belgian Eclipse User Group meeting...

Everybody was well on time and eager to meet other Belgian Eclipse users. I received a lot of compliments for bringing us all together to exchange experiences.

Syndicate content