[done] Adding supported file type to Launch plugin

Request Features and Feature Changes

[done] Adding supported file type to Launch plugin

Postby appliedmath » Sat Nov 07, 2009 4:08 pm

Hello,

I would like to use the Launch plugin for quick C compiling and running. Ideally, the Launch plugin could have user customizable File Type association and user definable commandline (another popular editor Geany has support for C as such.) I was wondering if such a feature could be added.
appliedmath
User
 
Posts: 27
Joined: Mon May 25, 2009 5:19 am

Re: Adding supported file type to Launch plugin

Postby cody » Sat Nov 07, 2009 5:23 pm

Hi,

You can already define your own commands in the Launch config dialog. File type associations can be configured in the main Editra preferences dialog under Document=>Syntax Highlighting.

Perhaps you mean something more/else? If so could you explain the workflow that your looking for in a little more detail?

Cody
User avatar
cody
Site Admin
 
Posts: 1301
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Adding supported file type to Launch plugin

Postby appliedmath » Sat Nov 07, 2009 5:53 pm

Thanks for your reply.

Yes, file type association for the entire editor is configurable like you said for syntax highlighting purposes, but not for Launch plugin (to my knowledge). I don't see C file as an option for the Launch plugin, and I don't know how to add it. Once I add the C file type, then, like you said, I can define a custom commandline through the Launch plugin.

So the question boils down to, I want to add a file type association to the Launch plugin.

Thanks.
appliedmath
User
 
Posts: 27
Joined: Mon May 25, 2009 5:19 am

Re: Adding supported file type to Launch plugin

Postby cody » Sat Nov 07, 2009 6:09 pm

Hi,

Ok, now I see.

Just wait for the next version, I will be adding an xml interface similar to what was added in 0.5.15 for the syntax highlighting, you will then be able to add support for new filetypes by adding a couple lines to an xml file in your config directory. (UI interface for it will also likely be added in future releases.)

Some rough draft docs on the xml interface http://editra.org/syntax_highlighting_customization

The file type associations that are configurable in the syntax highlighting tab of the preference dialog actually apply to everything, launch determines what type a file is by pulling from this configuration, codebrowser does the same.

Will update when the modifications to Launch are complete.


Cody
User avatar
cody
Site Admin
 
Posts: 1301
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Adding supported file type to Launch plugin

Postby appliedmath » Sat Nov 07, 2009 6:19 pm

Thank you very much. Editra is such a great software. Thanks for your hard work.
appliedmath
User
 
Posts: 27
Joined: Mon May 25, 2009 5:19 am

Re: Adding supported file type to Launch plugin

Postby cody » Tue Nov 10, 2009 3:02 am

Done for version 1.5 of the plugin.

I am quite pleased how this turned out so far, it will be possible to add any arbitrary number of new filetype handlers by editing a file in your user config directory.

For example this will be the bare minimum to add support for C

Code: Select all
<launch version="1">
    <handler name="C" id="ID_LANG_C"></handler>
</launch>


It also offers options to add default handlers and optional highlighting of error output in the buffer. So an extended version would look like this.

Code: Select all
<launch version="1">
    <handler name="C" id="ID_LANG_C">
       <commandlist default="make">
          <command name="make" execute="make"/>
          <command name="g++" execute="g++ -c"/>
       </commandlist>
       <!-- If your compiler output errors like
             "line: 22 file: myfile.c"
       -->
       <error pattern="error\: ln ([0-9]+) file\: (.*)"/>
    </handler>
</launch>


Docs and detailed specs will be available on the documentation page by the next release.


Cody
User avatar
cody
Site Admin
 
Posts: 1301
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Adding supported file type to Launch plugin

Postby appliedmath » Tue Nov 10, 2009 3:47 am

Perfect. Thanks a lot.
appliedmath
User
 
Posts: 27
Joined: Mon May 25, 2009 5:19 am


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron