diff options
-rw-r--r-- | extras/JavaBinding/ChangeLog | 9 | ||||
-rw-r--r-- | extras/JavaBinding/IKVMCompilerManager.cs | 18 | ||||
-rw-r--r-- | extras/JavaBinding/JavaLanguageBinding.cs | 4 |
3 files changed, 20 insertions, 11 deletions
diff --git a/extras/JavaBinding/ChangeLog b/extras/JavaBinding/ChangeLog index 8eaf16116f..fee5a9d7ed 100644 --- a/extras/JavaBinding/ChangeLog +++ b/extras/JavaBinding/ChangeLog @@ -1,3 +1,12 @@ +2009-12-01 Lluis Sanchez Gual <lluis@novell.com> + + * IKVMCompilerManager.cs: + * JavaLanguageBinding.cs: Introduced the ConfigurationSelector + class to all methods that previously took a configuration + name as string. This eliminates the ambiguity between + solution configuration names and project configuration + names. + 2009-11-10 Lluis Sanchez Gual <lluis@novell.com> * templates/IkvmLibraryProject.xpt.xml: Removed gtk# diff --git a/extras/JavaBinding/IKVMCompilerManager.cs b/extras/JavaBinding/IKVMCompilerManager.cs index 3a8837e7f6..c51c81107b 100644 --- a/extras/JavaBinding/IKVMCompilerManager.cs +++ b/extras/JavaBinding/IKVMCompilerManager.cs @@ -57,7 +57,7 @@ namespace JavaBinding return result.ToString (); } - public static BuildResult Compile (ProjectItemCollection projectItems, DotNetProjectConfiguration configuration, IProgressMonitor monitor) + public static BuildResult Compile (ProjectItemCollection projectItems, DotNetProjectConfiguration configuration, ConfigurationSelector configurationSelector, IProgressMonitor monitor) { JavaCompilerParameters parameters = (configuration.CompilationParameters as JavaCompilerParameters) ?? new JavaCompilerParameters (); string outdir = configuration.OutputDirectory; @@ -76,8 +76,8 @@ namespace JavaBinding } StringBuilder classpath = new StringBuilder (parameters.ClassPath); - AppendClasspath (classpath, GenerateReferenceStubs (monitor, configuration, parameters, projectItems)); - AppendClasspath (classpath, GenerateReferenceStub (monitor, configuration, new ProjectReference(ReferenceType.Gac, "mscorlib"))); + AppendClasspath (classpath, GenerateReferenceStubs (monitor, configurationSelector, configuration, parameters, projectItems)); + AppendClasspath (classpath, GenerateReferenceStub (monitor, configurationSelector, configuration, new ProjectReference(ReferenceType.Gac, "mscorlib"))); StringBuilder args = new StringBuilder (); args.Append (options.ToString ()); @@ -123,19 +123,19 @@ namespace JavaBinding path.Append (jar); } - static string GenerateReferenceStubs (IProgressMonitor monitor, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectItemCollection projectItems) + static string GenerateReferenceStubs (IProgressMonitor monitor, ConfigurationSelector configurationSelector, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectItemCollection projectItems) { StringBuilder result = new StringBuilder (); foreach (ProjectReference reference in projectItems.GetAll<ProjectReference> ()) { - AppendClasspath (result, GenerateReferenceStub (monitor, configuration, reference)); + AppendClasspath (result, GenerateReferenceStub (monitor, configurationSelector, configuration, reference)); } return result.ToString (); } - static string GenerateReferenceStub (IProgressMonitor monitor,DotNetProjectConfiguration configuration, ProjectReference reference) + static string GenerateReferenceStub (IProgressMonitor monitor, ConfigurationSelector configurationSelector, DotNetProjectConfiguration configuration, ProjectReference reference) { StringBuilder result = new StringBuilder (); - foreach (string fileName in reference.GetReferencedFileNames (configuration.Id)) { + foreach (string fileName in reference.GetReferencedFileNames (configurationSelector)) { string name = Path.GetFileNameWithoutExtension (Path.GetFileName (fileName)); string outputName = Path.Combine (configuration.OutputDirectory, name + ".jar"); if (!System.IO.File.Exists (outputName)) { @@ -194,12 +194,12 @@ namespace JavaBinding args.Append (" -srcpath:"); args.Append (configuration.ParentItem.BaseDirectory); foreach (ProjectReference lib in projectItems.GetAll<ProjectReference> ()) { - foreach (string fileName in lib.GetReferencedFileNames (configuration.Id)) { + foreach (string fileName in lib.GetReferencedFileNames (configuration.Selector)) { args.Append (" -r:"); args.Append (fileName); } } - foreach (string fileName in new ProjectReference(ReferenceType.Gac, "mscorlib").GetReferencedFileNames (configuration.Id)) { + foreach (string fileName in new ProjectReference(ReferenceType.Gac, "mscorlib").GetReferencedFileNames (configuration.Selector)) { args.Append (" -r:"); args.Append (fileName); } diff --git a/extras/JavaBinding/JavaLanguageBinding.cs b/extras/JavaBinding/JavaLanguageBinding.cs index 9f8d372df9..8aa5f2aa04 100644 --- a/extras/JavaBinding/JavaLanguageBinding.cs +++ b/extras/JavaBinding/JavaLanguageBinding.cs @@ -63,9 +63,9 @@ namespace JavaBinding return Path.GetExtension (fileName) == ".java"; } - public BuildResult Compile (ProjectItemCollection projectItems, DotNetProjectConfiguration configuration, IProgressMonitor monitor) + public BuildResult Compile (ProjectItemCollection projectItems, DotNetProjectConfiguration configuration, ConfigurationSelector configurationSelector, IProgressMonitor monitor) { - return IKVMCompilerManager.Compile (projectItems, configuration, monitor); + return IKVMCompilerManager.Compile (projectItems, configuration, configurationSelector, monitor); } public ConfigurationParameters CreateCompilationParameters (XmlElement projectOptions) |