Added: dev/buildr/1.5.0/site/rdoc/Buildr/IntellijIdea/IdeaFile.html
==============================================================================
--- dev/buildr/1.5.0/site/rdoc/Buildr/IntellijIdea/IdeaFile.html (added)
+++ dev/buildr/1.5.0/site/rdoc/Buildr/IntellijIdea/IdeaFile.html Sat Sep 17 
06:23:20 2016
@@ -0,0 +1,1075 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<meta charset="UTF-8">
+
+<title>class Buildr::IntellijIdea::IdeaFile - buildr</title>
+
+<script type="text/javascript">
+  var rdoc_rel_prefix = "../../";
+</script>
+
+<script src="../../js/jquery.js"></script>
+<script src="../../js/darkfish.js"></script>
+
+<link href="../../css/fonts.css" rel="stylesheet">
+<link href="../../css/rdoc.css" rel="stylesheet">
+
+
+
+<body id="top" role="document" class="class">
+<nav role="navigation">
+  <div id="project-navigation">
+    <div id="home-section" role="region" title="Quick navigation" 
class="nav-section">
+  <h2>
+    <a href="../../index.html" rel="home">Home</a>
+  </h2>
+
+  <div id="table-of-contents-navigation">
+    <a href="../../table_of_contents.html#pages">Pages</a>
+    <a href="../../table_of_contents.html#classes">Classes</a>
+    <a href="../../table_of_contents.html#methods">Methods</a>
+  </div>
+</div>
+
+    <div id="search-section" role="search" class="project-section 
initially-hidden">
+  <form action="#" method="get" accept-charset="utf-8">
+    <div id="search-field-wrapper">
+      <input id="search-field" role="combobox" aria-label="Search"
+             aria-autocomplete="list" aria-controls="search-results"
+             type="text" name="search" placeholder="Search" spellcheck="false"
+             title="Type to search, Up and Down to navigate, Enter to load">
+    </div>
+
+    <ul id="search-results" aria-label="Search Results"
+        aria-busy="false" aria-expanded="false"
+        aria-atomic="false" class="initially-hidden"></ul>
+  </form>
+</div>
+
+  </div>
+
+  
+
+  <div id="class-metadata">
+    
+    <div id="parent-class-section" class="nav-section">
+  <h3>Parent</h3>
+
+  
+  <p class="link"><a href="../../Object.html">Object</a>
+  
+</div>
+
+    
+    
+    <!-- Method Quickref -->
+<div id="method-list-section" class="nav-section">
+  <h3>Methods</h3>
+
+  <ul class="link-list" role="directory">
+    
+    <li ><a href="#method-c-new">::new</a>
+    
+    <li ><a href="#method-i-add_component">#add_component</a>
+    
+    <li ><a 
href="#method-i-add_component_from_artifact">#add_component_from_artifact</a>
+    
+    <li ><a 
href="#method-i-add_component_from_file">#add_component_from_file</a>
+    
+    <li ><a 
href="#method-i-add_to_composite_component">#add_to_composite_component</a>
+    
+    <li ><a href="#method-i-base_directory">#base_directory</a>
+    
+    <li ><a href="#method-i-components">#components</a>
+    
+    <li ><a href="#method-i-create_component">#create_component</a>
+    
+    <li ><a 
href="#method-i-create_composite_component">#create_composite_component</a>
+    
+    <li ><a href="#method-i-document">#document</a>
+    
+    <li ><a href="#method-i-file_path">#file_path</a>
+    
+    <li ><a href="#method-i-filename">#filename</a>
+    
+    <li ><a href="#method-i-id">#id</a>
+    
+    <li ><a href="#method-i-inject_component">#inject_component</a>
+    
+    <li ><a href="#method-i-inject_components">#inject_components</a>
+    
+    <li ><a href="#method-i-load_document">#load_document</a>
+    
+    <li ><a href="#method-i-name">#name</a>
+    
+    <li ><a href="#method-i-prefix">#prefix</a>
+    
+    <li ><a href="#method-i-relative">#relative</a>
+    
+    <li ><a href="#method-i-resolve_path_from_base">#resolve_path_from_base</a>
+    
+    <li ><a href="#method-i-suffix">#suffix</a>
+    
+    <li ><a href="#method-i-write">#write</a>
+    
+  </ul>
+</div>
+
+  </div>
+</nav>
+
+<main role="main" aria-labelledby="class-Buildr::IntellijIdea::IdeaFile">
+  <h1 id="class-Buildr::IntellijIdea::IdeaFile" class="class">
+    class Buildr::IntellijIdea::IdeaFile
+  </h1>
+
+  <section class="description">
+    
+<p>Abstract base class for <a href="IdeaModule.html">IdeaModule</a> and <a
+href="IdeaProject.html">IdeaProject</a></p>
+
+  </section>
+
+  
+  
+  
+  <section id="5Buntitled-5D" class="documentation-section">
+    
+
+    
+
+    
+    <section class="constants-list">
+      <header>
+        <h3>Constants</h3>
+      </header>
+      <dl>
+      
+        <dt 
id="DEFAULT_LOCAL_REPOSITORY_ENV_OVERRIDE">DEFAULT_LOCAL_REPOSITORY_ENV_OVERRIDE
+        
+        <dd>
+        
+      
+        <dt id="DEFAULT_PREFIX">DEFAULT_PREFIX
+        
+        <dd>
+        
+      
+        <dt id="DEFAULT_SUFFIX">DEFAULT_SUFFIX
+        
+        <dd>
+        
+      
+      </dl>
+    </section>
+    
+
+    
+    <section class="attribute-method-details" class="method-section">
+      <header>
+        <h3>Attributes</h3>
+      </header>
+
+      
+      <div id="attribute-i-buildr_project" class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">buildr_project</span><span
+            class="attribute-access-type">[R]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+      <div id="attribute-i-id" class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">id</span><span
+            class="attribute-access-type">[W]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+      <div id="attribute-i-local_repository_env_override" 
class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">local_repository_env_override</span><span
+            class="attribute-access-type">[RW]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+      <div id="attribute-i-prefix" class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">prefix</span><span
+            class="attribute-access-type">[W]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+      <div id="attribute-i-suffix" class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">suffix</span><span
+            class="attribute-access-type">[W]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+      <div id="attribute-i-template" class="method-detail">
+        <div class="method-heading attribute-method-heading">
+          <span class="method-name">template</span><span
+            class="attribute-access-type">[RW]</span>
+        </div>
+
+        <div class="method-description">
+        
+        
+        
+        </div>
+      </div>
+      
+    </section>
+    
+
+    
+     <section id="public-class-5Buntitled-5D-method-details" 
class="method-section">
+       <header>
+         <h3>Public Class Methods</h3>
+       </header>
+
+    
+      <div id="method-c-new" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">new</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="new-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 35</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">initialize</span>
+  <span class="ruby-ivar">@local_repository_env_override</span> = <span 
class="ruby-constant">DEFAULT_LOCAL_REPOSITORY_ENV_OVERRIDE</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+    </section>
+  
+     <section id="public-instance-5Buntitled-5D-method-details" 
class="method-section">
+       <header>
+         <h3>Public Instance Methods</h3>
+       </header>
+
+    
+      <div id="method-i-add_component" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">add_component</span><span
+            class="method-args">(name, attrs = {}, &xml)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="add_component-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 55</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">add_component</span>(<span 
class="ruby-identifier">name</span>, <span class="ruby-identifier">attrs</span> 
= {}, <span class="ruby-operator">&amp;</span><span 
class="ruby-identifier">xml</span>)
+  <span class="ruby-keyword">self</span>.<span 
class="ruby-identifier">components</span> <span 
class="ruby-operator">&lt;&lt;</span> <span 
class="ruby-identifier">create_component</span>(<span 
class="ruby-identifier">name</span>, <span 
class="ruby-identifier">attrs</span>, <span 
class="ruby-operator">&amp;</span><span class="ruby-identifier">xml</span>)
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-add_component_from_artifact" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">add_component_from_artifact</span><span
+            class="method-args">(artifact)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" 
id="add_component_from_artifact-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 66</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">add_component_from_artifact</span>(<span 
class="ruby-identifier">artifact</span>)
+  <span class="ruby-keyword">self</span>.<span 
class="ruby-identifier">components</span> <span 
class="ruby-operator">&lt;&lt;</span> <span 
class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span>
+    <span class="ruby-identifier">a</span> = <span 
class="ruby-constant">Buildr</span>.<span 
class="ruby-identifier">artifact</span>(<span 
class="ruby-identifier">artifact</span>)
+    <span class="ruby-identifier">a</span>.<span 
class="ruby-identifier">invoke</span>
+    <span class="ruby-constant">Buildr</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">IntellijIdea</span>.<span 
class="ruby-identifier">new_document</span>(<span 
class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span 
class="ruby-identifier">a</span>.<span 
class="ruby-identifier">to_s</span>)).<span class="ruby-identifier">root</span>
+  <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-add_component_from_file" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">add_component_from_file</span><span
+            class="method-args">(filename)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="add_component_from_file-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 59</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">add_component_from_file</span>(<span 
class="ruby-identifier">filename</span>)
+  <span class="ruby-keyword">self</span>.<span 
class="ruby-identifier">components</span> <span 
class="ruby-operator">&lt;&lt;</span> <span 
class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span>
+    <span class="ruby-identifier">raise</span> <span 
class="ruby-node">&quot;Unable to locate file #{filename} adding component to 
idea file&quot;</span> <span class="ruby-keyword">unless</span> <span 
class="ruby-constant">File</span>.<span 
class="ruby-identifier">exist?</span>(<span 
class="ruby-identifier">filename</span>)
+    <span class="ruby-constant">Buildr</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">IntellijIdea</span>.<span 
class="ruby-identifier">new_document</span>(<span 
class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span 
class="ruby-identifier">filename</span>)).<span 
class="ruby-identifier">root</span>
+  <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-filename" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">filename</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="filename-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 47</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">filename</span>
+  <span class="ruby-identifier">buildr_project</span>.<span 
class="ruby-identifier">path_to</span>(<span 
class="ruby-node">&quot;#{name}.#{extension}&quot;</span>)
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-id" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">id</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="id-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 51</span>
+<span class="ruby-keyword">def</span> <span class="ruby-identifier">id</span>
+  <span class="ruby-ivar">@id</span> <span class="ruby-operator">||=</span> 
<span class="ruby-identifier">buildr_project</span>.<span 
class="ruby-identifier">name</span>.<span 
class="ruby-identifier">split</span>(<span 
class="ruby-string">&#39;:&#39;</span>).<span 
class="ruby-identifier">last</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-name" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">name</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="name-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 80</span>
+<span class="ruby-keyword">def</span> <span class="ruby-identifier">name</span>
+  <span class="ruby-node">&quot;#{prefix}#{self.id}#{suffix}&quot;</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-prefix" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">prefix</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="prefix-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 39</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">prefix</span>
+  <span class="ruby-ivar">@prefix</span> <span 
class="ruby-operator">||=</span> <span 
class="ruby-constant">DEFAULT_PREFIX</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-suffix" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">suffix</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="suffix-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 43</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">suffix</span>
+  <span class="ruby-ivar">@suffix</span> <span 
class="ruby-operator">||=</span> <span 
class="ruby-constant">DEFAULT_SUFFIX</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-write" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">write</span><span
+            class="method-args">(f)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          <p>IDEA can not handle text content with indents so need to removing 
indenting
+Can not pass true as third argument as the ruby library seems broken</p>
+          
+          
+
+          
+          <div class="method-source-code" id="write-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 76</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">write</span>(<span class="ruby-identifier">f</span>)
+  <span class="ruby-identifier">document</span>.<span 
class="ruby-identifier">write</span>(<span class="ruby-identifier">f</span>, 
<span class="ruby-value">-1</span>, <span class="ruby-keyword">false</span>, 
<span class="ruby-keyword">true</span>)
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+    </section>
+  
+     <section id="protected-instance-5Buntitled-5D-method-details" 
class="method-section">
+       <header>
+         <h3>Protected Instance Methods</h3>
+       </header>
+
+    
+      <div id="method-i-add_to_composite_component" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">add_to_composite_component</span><span
+            class="method-args">(components) { |xml_markup(:target => target, 
:indent => 2)| ... }</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" 
id="add_to_composite_component-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 134</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">add_to_composite_component</span>(<span 
class="ruby-identifier">components</span>)
+  <span class="ruby-identifier">components</span> <span 
class="ruby-operator">&lt;&lt;</span> <span 
class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span>
+    <span class="ruby-identifier">target</span> = <span 
class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
+    <span class="ruby-keyword">yield</span> <span 
class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span 
class="ruby-constant">XmlMarkup</span>.<span 
class="ruby-identifier">new</span>(<span class="ruby-value">:target</span> 
=<span class="ruby-operator">&gt;</span> <span 
class="ruby-identifier">target</span>, <span class="ruby-value">:indent</span> 
=<span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span>)
+    <span class="ruby-constant">Buildr</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">IntellijIdea</span>.<span 
class="ruby-identifier">new_document</span>(<span 
class="ruby-identifier">target</span>.<span 
class="ruby-identifier">string</span>).<span class="ruby-identifier">root</span>
+  <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-base_directory" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">base_directory</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="base_directory-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 90</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">base_directory</span>
+  <span class="ruby-identifier">buildr_project</span>.<span 
class="ruby-identifier">path_to</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-components" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">components</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="components-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 120</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">components</span>
+  <span class="ruby-ivar">@components</span> <span 
class="ruby-operator">||=</span> []
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-create_component" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">create_component</span><span
+            class="method-args">(name, attrs = {}) { |xml| ... }</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="create_component-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 112</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">create_component</span>(<span 
class="ruby-identifier">name</span>, <span class="ruby-identifier">attrs</span> 
= {})
+  <span class="ruby-identifier">target</span> = <span 
class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
+  <span class="ruby-constant">Builder</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">XmlMarkup</span>.<span 
class="ruby-identifier">new</span>(<span class="ruby-value">:target</span> 
=<span class="ruby-operator">&gt;</span> <span 
class="ruby-identifier">target</span>, <span class="ruby-value">:indent</span> 
=<span class="ruby-operator">&gt;</span> <span 
class="ruby-value">2</span>).<span 
class="ruby-identifier">component</span>({<span class="ruby-value">:name</span> 
=<span class="ruby-operator">&gt;</span> <span 
class="ruby-identifier">name</span>}.<span 
class="ruby-identifier">merge</span>(<span 
class="ruby-identifier">attrs</span>)) <span class="ruby-keyword">do</span> 
<span class="ruby-operator">|</span><span 
class="ruby-identifier">xml</span><span class="ruby-operator">|</span>
+    <span class="ruby-keyword">yield</span> <span 
class="ruby-identifier">xml</span> <span class="ruby-keyword">if</span> <span 
class="ruby-identifier">block_given?</span>
+  <span class="ruby-keyword">end</span>
+  <span class="ruby-constant">Buildr</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">IntellijIdea</span>.<span 
class="ruby-identifier">new_document</span>(<span 
class="ruby-identifier">target</span>.<span 
class="ruby-identifier">string</span>).<span class="ruby-identifier">root</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-create_composite_component" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">create_composite_component</span><span
+            class="method-args">(name, attrs, components)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" 
id="create_composite_component-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 124</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">create_composite_component</span>(<span 
class="ruby-identifier">name</span>, <span 
class="ruby-identifier">attrs</span>, <span 
class="ruby-identifier">components</span>)
+  <span class="ruby-keyword">return</span> <span 
class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span 
class="ruby-identifier">components</span>.<span 
class="ruby-identifier">empty?</span>
+  <span class="ruby-identifier">component</span> = <span 
class="ruby-keyword">self</span>.<span 
class="ruby-identifier">create_component</span>(<span 
class="ruby-identifier">name</span>, <span class="ruby-identifier">attrs</span>)
+  <span class="ruby-identifier">components</span>.<span 
class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span 
class="ruby-operator">|</span><span class="ruby-identifier">element</span><span 
class="ruby-operator">|</span>
+    <span class="ruby-identifier">element</span> = <span 
class="ruby-identifier">element</span>.<span 
class="ruby-identifier">call</span> <span class="ruby-keyword">if</span> <span 
class="ruby-identifier">element</span>.<span 
class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>)
+    <span class="ruby-identifier">component</span>.<span 
class="ruby-identifier">add_element</span> <span 
class="ruby-identifier">element</span>
+  <span class="ruby-keyword">end</span>
+  <span class="ruby-identifier">component</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-document" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">document</span><span
+            class="method-args">()</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="document-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 146</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">document</span>
+  <span class="ruby-keyword">if</span> <span 
class="ruby-constant">File</span>.<span 
class="ruby-identifier">exist?</span>(<span 
class="ruby-keyword">self</span>.<span class="ruby-identifier">filename</span>)
+    <span class="ruby-identifier">doc</span> = <span 
class="ruby-identifier">load_document</span>(<span 
class="ruby-keyword">self</span>.<span class="ruby-identifier">filename</span>)
+  <span class="ruby-keyword">else</span>
+    <span class="ruby-identifier">doc</span> = <span 
class="ruby-identifier">base_document</span>
+    <span class="ruby-identifier">inject_components</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-keyword">self</span>.<span 
class="ruby-identifier">initial_components</span>)
+  <span class="ruby-keyword">end</span>
+  <span class="ruby-keyword">if</span> <span 
class="ruby-keyword">self</span>.<span class="ruby-identifier">template</span>
+    <span class="ruby-identifier">template_doc</span> = <span 
class="ruby-identifier">load_document</span>(<span 
class="ruby-keyword">self</span>.<span class="ruby-identifier">template</span>)
+    <span class="ruby-constant">REXML</span><span 
class="ruby-operator">::</span><span class="ruby-constant">XPath</span>.<span 
class="ruby-identifier">each</span>(<span 
class="ruby-identifier">template_doc</span>, <span 
class="ruby-string">&#39;//component&#39;</span>) <span 
class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span 
class="ruby-identifier">element</span><span class="ruby-operator">|</span>
+      <span class="ruby-identifier">inject_component</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-identifier">element</span>)
+    <span class="ruby-keyword">end</span>
+  <span class="ruby-keyword">end</span>
+  <span class="ruby-identifier">inject_components</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-keyword">self</span>.<span 
class="ruby-identifier">default_components</span>.<span 
class="ruby-identifier">compact</span> <span class="ruby-operator">+</span> 
<span class="ruby-keyword">self</span>.<span 
class="ruby-identifier">components</span>)
+
+  <span class="ruby-comment"># Sort the components in the same order the idea 
sorts them</span>
+  <span class="ruby-identifier">sorted</span> = <span 
class="ruby-identifier">doc</span>.<span 
class="ruby-identifier">root</span>.<span 
class="ruby-identifier">get_elements</span>(<span 
class="ruby-string">&#39;//component&#39;</span>).<span 
class="ruby-identifier">sort</span> { <span class="ruby-operator">|</span><span 
class="ruby-identifier">s1</span>, <span class="ruby-identifier">s2</span><span 
class="ruby-operator">|</span> <span class="ruby-identifier">s1</span>.<span 
class="ruby-identifier">attribute</span>(<span 
class="ruby-string">&#39;name&#39;</span>).<span 
class="ruby-identifier">value</span> <span 
class="ruby-operator">&lt;=&gt;</span> <span 
class="ruby-identifier">s2</span>.<span 
class="ruby-identifier">attribute</span>(<span 
class="ruby-string">&#39;name&#39;</span>).<span 
class="ruby-identifier">value</span> }
+  <span class="ruby-identifier">doc</span> = <span 
class="ruby-identifier">base_document</span>
+  <span class="ruby-identifier">sorted</span>.<span 
class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span 
class="ruby-operator">|</span><span class="ruby-identifier">element</span><span 
class="ruby-operator">|</span>
+    <span class="ruby-identifier">doc</span>.<span 
class="ruby-identifier">root</span>.<span 
class="ruby-identifier">add_element</span> <span 
class="ruby-identifier">element</span>
+  <span class="ruby-keyword">end</span>
+
+  <span class="ruby-identifier">doc</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-file_path" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">file_path</span><span
+            class="method-args">(path)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="file_path-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 108</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">file_path</span>(<span 
class="ruby-identifier">path</span>)
+  <span class="ruby-node">&quot;file://#{resolve_path(path)}&quot;</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-inject_component" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">inject_component</span><span
+            class="method-args">(doc, component)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          <p>replace overridden component (if any) with specified component</p>
+          
+          
+
+          
+          <div class="method-source-code" id="inject_component-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 180</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">inject_component</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-identifier">component</span>)
+  <span class="ruby-identifier">doc</span>.<span 
class="ruby-identifier">root</span>.<span 
class="ruby-identifier">delete_element</span>(<span 
class="ruby-node">&quot;//component[@name=&#39;#{component.attributes[&#39;name&#39;]}&#39;]&quot;</span>)
+  <span class="ruby-identifier">doc</span>.<span 
class="ruby-identifier">root</span>.<span 
class="ruby-identifier">add_element</span> <span 
class="ruby-identifier">component</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-inject_components" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">inject_components</span><span
+            class="method-args">(doc, components)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="inject_components-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 171</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">inject_components</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-identifier">components</span>)
+  <span class="ruby-identifier">components</span>.<span 
class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span 
class="ruby-operator">|</span><span 
class="ruby-identifier">component</span><span class="ruby-operator">|</span>
+    <span class="ruby-comment"># execute deferred components</span>
+    <span class="ruby-identifier">component</span> = <span 
class="ruby-identifier">component</span>.<span 
class="ruby-identifier">call</span> <span class="ruby-keyword">if</span> <span 
class="ruby-constant">Proc</span> <span class="ruby-operator">===</span> <span 
class="ruby-identifier">component</span>
+    <span class="ruby-identifier">inject_component</span>(<span 
class="ruby-identifier">doc</span>, <span 
class="ruby-identifier">component</span>) <span class="ruby-keyword">if</span> 
<span class="ruby-identifier">component</span>
+  <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-load_document" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">load_document</span><span
+            class="method-args">(filename)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="load_document-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 142</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">load_document</span>(<span 
class="ruby-identifier">filename</span>)
+  <span class="ruby-constant">Buildr</span><span 
class="ruby-operator">::</span><span 
class="ruby-constant">IntellijIdea</span>.<span 
class="ruby-identifier">new_document</span>(<span 
class="ruby-constant">File</span>.<span 
class="ruby-identifier">read</span>(<span 
class="ruby-identifier">filename</span>))
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-relative" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">relative</span><span
+            class="method-args">(path)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="relative-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 86</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">relative</span>(<span 
class="ruby-identifier">path</span>)
+  <span class="ruby-operator">::</span><span 
class="ruby-constant">Buildr</span><span class="ruby-operator">::</span><span 
class="ruby-constant">Util</span>.<span 
class="ruby-identifier">relative_path</span>(<span 
class="ruby-constant">File</span>.<span 
class="ruby-identifier">expand_path</span>(<span 
class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>), 
<span class="ruby-keyword">self</span>.<span 
class="ruby-identifier">base_directory</span>)
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+      <div id="method-i-resolve_path_from_base" class="method-detail ">
+        
+        <div class="method-heading">
+          <span class="method-name">resolve_path_from_base</span><span
+            class="method-args">(path, base_variable)</span>
+          
+          <span class="method-click-advice">click to toggle source</span>
+          
+        </div>
+        
+
+        <div class="method-description">
+          
+          
+          
+          
+
+          
+          <div class="method-source-code" id="resolve_path_from_base-source">
+            <pre><span class="ruby-comment"># File lib/buildr/ide/idea.rb, 
line 94</span>
+<span class="ruby-keyword">def</span> <span 
class="ruby-identifier">resolve_path_from_base</span>(<span 
class="ruby-identifier">path</span>, <span 
class="ruby-identifier">base_variable</span>)
+  <span class="ruby-identifier">m2repo</span> = <span 
class="ruby-constant">Buildr</span><span class="ruby-operator">::</span><span 
class="ruby-constant">Repositories</span>.<span 
class="ruby-identifier">instance</span>.<span 
class="ruby-identifier">local</span>
+  <span class="ruby-keyword">if</span> <span 
class="ruby-identifier">path</span>.<span 
class="ruby-identifier">to_s</span>.<span 
class="ruby-identifier">index</span>(<span 
class="ruby-identifier">m2repo</span>) <span class="ruby-operator">==</span> 
<span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> 
<span class="ruby-operator">!</span><span 
class="ruby-keyword">self</span>.<span 
class="ruby-identifier">local_repository_env_override</span>.<span 
class="ruby-identifier">nil?</span>
+    <span class="ruby-keyword">return</span> <span 
class="ruby-identifier">path</span>.<span 
class="ruby-identifier">sub</span>(<span class="ruby-identifier">m2repo</span>, 
<span 
class="ruby-node">&quot;$#{self.local_repository_env_override}$&quot;</span>)
+  <span class="ruby-keyword">else</span>
+    <span class="ruby-keyword">begin</span>
+      <span class="ruby-keyword">return</span> <span 
class="ruby-node">&quot;#{base_variable}/#{relative(path)}&quot;</span>
+    <span class="ruby-keyword">rescue</span> <span 
class="ruby-constant">ArgumentError</span>
+      <span class="ruby-comment"># ArgumentError happens on windows when 
self.base_directory and path are on different drives</span>
+      <span class="ruby-keyword">return</span> <span 
class="ruby-identifier">path</span>
+    <span class="ruby-keyword">end</span>
+  <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span></pre>
+          </div>
+          
+        </div>
+
+        
+
+        
+      </div>
+
+    
+    </section>
+  
+  </section>
+</main>
+
+
+<footer id="validator-badges" role="contentinfo">
+  <p><a href="http://validator.w3.org/check/referer";>Validate</a>
+  <p>Generated by <a href="http://docs.seattlerb.org/rdoc/";>RDoc</a> 4.2.2.
+  <p>Based on <a 
href="http://deveiate.org/projects/Darkfish-RDoc/";>Darkfish</a> by <a 
href="http://deveiate.org";>Michael Granger</a>.
+</footer>
+



Reply via email to