Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Adding Semantic Highlighting to comments in CEditor in Eclipse
Adding Semantic Highlighting to comments in CEditor in Eclipse [message #1526692] Wed, 24 December 2014 19:07 Go to next message
Gunjan Aggarwal is currently offline Gunjan AggarwalFriend
Messages: 7
Registered: December 2014
Junior Member
I am trying to extend CDT CEditor for adding formal verification specifications for C code. Formal Verification specification is added as comments in C file. So I want to perform semantic highlighting of comments in CEditor.

Can anyone help me how can I proceed to implement semantic highlighting for CEditor? Most of the functions related to semantic highlighting in CEditor.java are either private or protected. I am not sure what is the best approach to add this functionality. Any help will be appreciated.
Re: Adding Semantic Highlighting to comments in CEditor in Eclipse [message #1640876 is a reply to message #1526692] Sat, 28 February 2015 09:16 Go to previous messageGo to next message
Joshua Overturf is currently offline Joshua OverturfFriend
Messages: 6
Registered: February 2015
Junior Member
If you want to highlight keyword start by creating an implementation of ICLanguageKeywords. Then extend the GCCLangauge class and override the getAdapter method to return your implementation. Then register your subclass of GCCLanguage with the ILanguage extension point. Then to see the changes, open the Language Mappings preference page and map the C content type to your language.
Re: Adding Semantic Highlighting to comments in CEditor in Eclipse [message #1666533 is a reply to message #1640876] Wed, 11 March 2015 18:46 Go to previous message
Gunjan Aggarwal is currently offline Gunjan AggarwalFriend
Messages: 7
Registered: December 2014
Junior Member
I have already implemented Syntax highlighting. I want to add functionality for example to highlight a local variable different from global variable.
Previous Topic:Flicker when dragging and dropping a text editor window
Next Topic:Howto set an environment variable for autotools
Goto Forum:
  


Current Time: Thu Apr 25 07:02:30 GMT 2024

Powered by FUDForum. Page generated in 0.02754 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top