Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] add keywords to Editor

hi all,
We have some testcases, c programs, some keywords like __irq, __asm are considered as syntax errors.
void __irq DMA1_isr_CH0_INT(void)
  /* Clearing of corresponding interrupt request flag needed */


for adding these keywords, I created a plugin, 

class file:
public class gccExtends extends GCCLanguage {
protected static final ExtendCscannerExtensionConfiguration ExtendC_SCANNER_EXTENSION = new ExtendCscannerExtensionConfiguration(); 
private static final gccExtends DEFAULT_INSTANCE = new gccExtends();
public static final String ID = CCorePlugin.PLUGIN_ID + ".extend"; //$NON-NLS-1$ 
public static gccExtends getDefault() {
public String getId() {
return ID; 
protected IScannerExtensionConfiguration getScannerExtensionConfiguration()


public class ExtendCscannerExtensionConfiguration extends GCCScannerExtensionConfiguration {

public static final String IRQ = "__irq";
public static final char[] extendcIRQ = "__irq".toCharArray();

public CharArrayIntMap getAdditionalKeywords() {
CharArrayIntMap additionalCPPKeywords = new CharArrayIntMap(0, 0);
additionalCPPKeywords.put( ExtendCscannerExtensionConfiguration.extendcIRQ,IToken.t_class);
return additionalCPPKeywords;

the keywords are added, but I got the error "the currently displayed page contains invalid values" and the function call like:
go to declaration does not work yet.

Thanks a lot for your help

Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail, c'est gratuit ! Inscrivez-vous

Back to the top