buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Petrovic <mspetro...@gmail.com>
Subject Re: Intellij Plugin to provide clear view of buildfile
Date Wed, 08 Sep 2010 02:47:54 GMT
I see.

So the existing Ruby plugin, which I'm using and I assume you're using, cannot show a pretty
view of the buildfile in Structure View because it doesn't know anything about the desc and
define methods?


On Sep 7, 2010, at 7:01 PM, Chiaming Hsu wrote:

> The 'desc', 'define', and other similar terms are method names, not language 
> keywords.
> 
> When you run builds, buildr loads itself first, which define these special 
> methods.  And then the buildfile calls these special methods to define project 
> structure.
> 
> For example:
> desc 'a sample project'
> is calling a method named desc with a string argument 'a sample project'
> 
> define 'killer-app' do
>   ...
> end
> is calling a method named define with a string argument 'killer-app' and a block 
> doing something more.
> 
> 
> This is Ruby meta-programming magic...
> 
> Cheers,
> Chiaming Hsu
> 
> 
> ----- Original Message ----
> From: Mark Petrovic <mspetrovic@gmail.com>
> To: users@buildr.apache.org
> Sent: Tue, September 7, 2010 6:39:52 PM
> Subject: Re: Intellij Plugin to provide clear view of buildfile
> 
> I actually started down the path of writing such an IJ plugin, but found while 
> reading the docs that I had to provide an extension for the file, as you found 
> with NB.  I suspect there is a way around this, as when I actually 
> double-clicked my buildfile, IJ prompted me to bind it to a language, which I 
> did (Ruby).  And now I get all the supported-language goodness when I edit the 
> buildfile in IJ.
> 
> The plugin development documentation for a given IDE can be somewhat sketchy and 
> rather decentralized.  I may have missed something.
> 
> Sorry to subject you to this, but if the buildfile is Ruby, how do the 'desc' 
> and 'define' keywords fit into this?
> 
> 
> On Sep 7, 2010, at 6:29 PM, Chiaming Hsu wrote:
> 
>> The buildfile is Ruby code.  Would you be able to make IntelliJ treat the 
>> buildfile as a Ruby source file?  I tell my gEdit that the buildfile is Ruby 
>> and 
>> 
>> it adds the syntax coloring nicely.  I had trouble doing that with NetBeans, 
>> though, since NetBeans insists that file type association must be done through 
> 
>> "file extension" but my buildfile is just named buildfile without any file 
>> extension...
>> 
>> Cheers,
>> Chiaming Hsu
>> 
>> 
>> 
>> ----- Original Message ----
>> From: Mark Petrovic <mspetrovic@gmail.com>
>> To: Buildr Users <users@buildr.apache.org>
>> Sent: Tue, September 7, 2010 6:07:28 PM
>> Subject: Intellij Plugin to provide clear view of buildfile
>> 
>> It would be nice to have an Intellij plugin that provides a nice, clean view of 
>> 
>> a buildfile, with collapse-able handles for each 'define <project>' node and

>> whatever other eye candy one could come up with.  I have some experience 
>> writing 
>> 
>> plugins for NetBeans, and have reviewed a few plugin examples for IJ.
>> 
>> Does anyone have any experience with buildfile parsers, which I assume we'd 
>> need 
>> 
>> to write such a plugin?  The buildfile is not actually Ruby per-se, right?  
>> 
>> 
>> --
>> Mark Petrovic
> 
> 
> --
> Mark Petrovic


--
Mark Petrovic



Mime
View raw message