Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] addMacro seems to have no effect

Hi Markus,

thanks for the quick reply


The definition of 'ScannerConfig' looks correct.
> Although you claim that 'it' is being called
> I would think that the parser does not use your scanner config.

I derive my own language like this:

public class CPN extends GCCLanguage implements ICLanguageKeywords
{
   .....

    @Override
    public Object getAdapter(Class adapter) {
        if (adapter == ICLanguageKeywords.class)
            return this;
        else
            return super.getAdapter(adapter);
    }

    @Override
    public String[] getKeywords() {
      ....	
    }

    @Override
protected IScannerExtensionConfiguration getScannerExtensionConfiguration() {
        return new ScannerConfig();
    }

SyntaxHighlighting works using getKeywords, and I can see that getScannerExtensionConfiguration is also called using a debugger, so I think the basic "setup" should be correct.

Best,
Max


Back to the top