Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] Multiple languages in a single Scriptproject

Hi,

my plugin contributes a content-type which is based on the php content type. It also contributes a Nature and a Language, which refer to that content-type.

My problem is, that when i double click a file of that language, the PHP editor is opened instead of my contributed editor.

It seems it recognizes my content-type, but associates it with the base content-type (PHP) instead of mine.

How does DLTK determine the correct language for a specific file extension?

regards

-robert

ps: here's the relevant parts of the plugin.xml:

   <extension point="org.eclipse.core.contenttype.contentTypes">
      <content-type
            base-type="org.eclipse.php.core.phpsource"
            file-extensions="twig"
            id="twigtemplate"
            name="Twig Template"
            priority="high">
      </content-type>
  </extension>

    <!-- the project nature -->
   <extension
         id="TwigNature"
         name="Twig"
         point="org.eclipse.core.resources.natures">
      <runtime>
         <run class="com.dubture.twig.core.TwigNature"></run>
      </runtime>
      <content-type
            id="com.dubture.twig.core.twigtemplate">
      </content-type>
   </extension>
  
   <extension point="org.eclipse.dltk.core.language">
      <language
            class="com.dubture.twig.core.TwigLanguageToolkit"
            nature="com.dubture.twig.core.TwigNature"
            priority="10">
      </language>
   </extension>
  

Back to the top