Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] core.language extension: getKeywords never called

Hi,

I'm trying to use the org.eclipse.cdt.core.language extension point, see code below. Currently, I just want to highlight some additional keywords.

I can select the new entry in Preferences-Mapping, but nothing happens. While debugging, I can see that getKeywords() is never called.

Any idea what is missing? Thanks for you help.

Best,
Max



<extension
        id="maps.mapsperspective.editors.ADD"
        name="maps.mapsperspective.editors.ADD"
         point="org.eclipse.cdt.core.language">
         <language
              class="maps.mapsperspective.editors.ADD"
              id="ADD"
              name="ADD">
           <contentType id="org.eclipse.cdt.core.cSource"/>
          <contentType id="org.eclipse.cdt.core.cHeader"/>
      </language>
</extension>

public class ADD extends GCCLanguage implements ICLanguageKeywords
{
    @Override
    public String getId() {
        return "maps.mapsperspective.editors.ADD";
    }

    @Override
    public String getName() {
        return "ADD Language Extension";
    }

    public Object getAdapter(ADD extendedLanguage) {

        return this;
    }

    public String[] getKeywords()
    {
        String[] array =new String[1];
        array[0]="__PNchannel";
        return array;
    }
}




Back to the top