Module: Buildr::AS3::IDE::FDT4::Tasks

Includes:
Extension
Included in:
Project
Defined in:
lib/buildr/as3/ide/fdt4.rb

Instance Method Summary (collapse)

Instance Method Details



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/buildr/as3/ide/fdt4.rb', line 95

def create_fdt4_dependency_symlink(project, dependency)
  case dependency
    when Buildr::Artifact then
      path = dependency.name
    else
      path = dependency.to_s
  end
  target = project.path_to(:lib, :main, :as3) + "/" + File.basename(path)
  if target != path
    unless File.exists?(target) && !File.symlink?(target)
      puts "Creating symlink: #{target}"
      File.delete(target) if File.exists?(target)
      File.symlink path, target
    end
  end
  target
end

- (Object) get_eclipse_relative_path(project, source)



113
114
115
116
117
118
119
120
121
# File 'lib/buildr/as3/ide/fdt4.rb', line 113

def get_eclipse_relative_path(project, source)
  case source
    when Buildr::Artifact then
      path = source.name
    else
      path = source.to_s
  end
  Util.relative_path(File.expand_path(path), project.base_dir)
end

- (Object) get_fdt4_classpath_type(source)



123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/buildr/as3/ide/fdt4.rb', line 123

def get_fdt4_classpath_type(source)
  case source
    when Buildr::Artifact then
      return "source" if File.directory?(source.name)
      return "lib" if File.extname(source.name) == ".swc"
    else

      return "source" if File.directory?(source.to_s)
      return "lib" if File.extname(source.to_s) == ".swc"
  end
  "Could not guess type!"
end