C0 code coverage information

Generated on Wed Oct 07 08:34:00 -0700 2009 with rcov 0.8.2.1


Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
Name Total lines Lines of code Total coverage Code coverage
lib/buildr/ide/eclipse/plugin.rb 68 40
64.7%  
50.0%  
 1 # Licensed to the Apache Software Foundation (ASF) under one or more
 2 # contributor license agreements.  See the NOTICE file distributed with this
 3 # work for additional information regarding copyright ownership.  The ASF
 4 # licenses this file to you under the Apache License, Version 2.0 (the
 5 # "License"); you may not use this file except in compliance with the License.
 6 # You may obtain a copy of the License at
 7 #
 8 #    http://www.apache.org/licenses/LICENSE-2.0
 9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
13 # License for the specific language governing permissions and limitations under
14 # the License.
15 
16 
17 require 'buildr/core/project'
18 require 'buildr/core/common'
19 
20 module Buildr
21   module Eclipse
22     module Plugin
23       include Extension
24 
25       NATURE    = 'org.eclipse.pde.PluginNature'
26       CONTAINER = 'org.eclipse.pde.core.requiredPlugins'
27       BUILDERS   = ['org.eclipse.pde.ManifestBuilder', 'org.eclipse.pde.SchemaBuilder']
28 
29       after_define do |project|
30         eclipse = project.eclipse
31 
32         # smart defaults
33         if eclipse.natures.empty? && ((File.exists? project.path_to("plugin.xml")) || (File.exists? project.path_to("OSGI-INF")))
34           eclipse.natures = [NATURE, Buildr::Eclipse::Java::NATURE]
35           eclipse.classpath_containers = [CONTAINER, Buildr::Eclipse::Java::CONTAINER] if eclipse.classpath_containers.empty?
36           eclipse.builders = BUILDERS + [Buildr::Eclipse::Java::BUILDER] if eclipse.builders.empty?
37         end
38 
39         # :plugin nature explicitly set
40         if eclipse.natures.include? :plugin
41           unless eclipse.natures.include? NATURE
42             # plugin nature must be before java nature
43             eclipse.natures += [Buildr::Eclipse::Java::NATURE] unless eclipse.natures.include? Buildr::Eclipse::Java::NATURE
44             index = eclipse.natures.index(Buildr::Eclipse::Java::NATURE) || -1
45             eclipse.natures = eclipse.natures.insert(index, NATURE)
46           end
47           unless eclipse.classpath_containers.include? CONTAINER
48             # plugin container must be before java container
49             index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::CONTAINER) || -1
50             eclipse.classpath_containers = eclipse.classpath_containers.insert(index, CONTAINER)
51           end
52           unless (eclipse.builders.include?(BUILDER[0]) && eclipse.builders.include?(BUILDER[1]))
53             # plugin builder must be before java builder
54             index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::BUILDER) || -1
55             eclipse.builders = eclipse.builders.insert(index, BUILDER[1]) unless eclipse.builders.include? BUILDER[1]
56             index = eclipse.classpath_containers.index(BUILDER[1]) || -1
57             eclipse.builders = eclipse.builders.insert(index, BUILDER[0]) unless eclipse.builders.include? BUILDER[0]
58           end
59         end
60       end
61 
62     end
63   end
64 end
65 
66 class Buildr::Project
67   include Buildr::Eclipse::Plugin
68 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.2.1.

Valid XHTML 1.0! Valid CSS!