[Monodevelop-patches-list] r2128 - in trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding: . Gui Project ProjectTreeBuilder

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Jan 13 19:27:48 EST 2005


Author: lluis
Date: 2005-01-13 19:27:48 -0500 (Thu, 13 Jan 2005)
New Revision: 2128

Removed:
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingExecutionServices.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaProject.cs
Modified:
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBinding.addin.xml
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Makefile.am
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaCompilerParameters.cs
   trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ProjectTreeBuilder/JavaNodeBuilder.cs
Log:
2005-01-11  Lluis Sanchez Gual  <lluis at novell.com>

	* JavaBindingCompilerServices.cs:
	* Gui/ProjectConfigurationPropertyPanel.cs:
	* JavaLanguageBinding.cs:
	* JavaBinding.addin.xml:
	* ProjectTreeBuilder/JavaNodeBuilder.cs: Follow architecture changes.
	
	* JavaCompilerParameters.cs: Moved some parameters and enum
	definitions to DotNetProjectConfiguration.
	
	* Project/JavaProject.cs: Removed. Not needed any more.
	* Makefile.am: Updated.



Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ChangeLog	2005-01-14 00:27:48 UTC (rev 2128)
@@ -1,3 +1,17 @@
+2005-01-11  Lluis Sanchez Gual  <lluis at novell.com>
+
+	* JavaBindingCompilerServices.cs:
+	* Gui/ProjectConfigurationPropertyPanel.cs:
+	* JavaLanguageBinding.cs:
+	* JavaBinding.addin.xml:
+	* ProjectTreeBuilder/JavaNodeBuilder.cs: Follow architecture changes.
+	
+	* JavaCompilerParameters.cs: Moved some parameters and enum
+	definitions to DotNetProjectConfiguration.
+	
+	* Project/JavaProject.cs: Removed. Not needed any more.
+	* Makefile.am: Updated.
+
 2004-12-13  Lluis Sanchez Gual  <lluis at novell.com>
 
 	* JavaBindingCompilerServices.cs: StatusBarService.ProgressMonitor is

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -47,6 +47,7 @@
 		private Entry mainClass = new Entry ();
 		
 		JavaCompilerParameters compilerParameters = null;
+		DotNetProjectConfiguration configuration;
 		
 		public override bool ReceiveDialogMessage(DialogMessage message)
 		{
@@ -61,10 +62,10 @@
 
 				compilerParameters.GenWarnings = checkWarnings.Active;			
 				compilerParameters.Deprecation = checkDeprecation.Active;			
-				compilerParameters.Debugmode = checkDebug.Active;			
+				configuration.DebugMode = checkDebug.Active;			
 				compilerParameters.Optimize = checkOptimize.Active;						
-				compilerParameters.OutputAssembly = outputAssembly.Text;
-				compilerParameters.OutputDirectory = outputDirectory.Text;
+				configuration.OutputAssembly = outputAssembly.Text;
+				configuration.OutputDirectory = outputDirectory.Text;
 				
 				compilerParameters.CompilerPath = compilerPath.Text;
 				compilerParameters.ClassPath = classPath.Text;
@@ -75,7 +76,8 @@
 		
 		void SetValues(object sender, EventArgs e)
 		{
-			this.compilerParameters = (JavaCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
+			compilerParameters = (JavaCompilerParameters) configuration.CompilationParameters;
 			
 			if (compilerParameters.Compiler == JavaCompiler.Javac)
 				javac.Active = true;
@@ -83,11 +85,11 @@
 				gcj.Active = true;
 
 			checkOptimize.Active = compilerParameters.Optimize;
-			checkDebug.Active = compilerParameters.Debugmode;
+			checkDebug.Active = configuration.DebugMode;
 			checkDeprecation.Active = compilerParameters.Deprecation;
 			checkWarnings.Active = compilerParameters.GenWarnings;
-			outputAssembly.Text = compilerParameters.OutputAssembly;
-			outputDirectory.Text = compilerParameters.OutputDirectory;
+			outputAssembly.Text = configuration.OutputAssembly;
+			outputDirectory.Text = configuration.OutputDirectory;
 			
 			compilerPath.Text = compilerParameters.CompilerPath;
 			classPath.Text = compilerParameters.ClassPath;				

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBinding.addin.xml	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBinding.addin.xml	2005-01-14 00:27:48 UTC (rev 2128)
@@ -51,7 +51,7 @@
   </Extension>
 
   <Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
-    <Conditional activeproject = "Java">
+    <Conditional activelanguage = "Java">
       <DialogPanel id = "JavaProjectPanel"
                    _label = "Code Generation"
                    class = "JavaBinding.ProjectConfigurationPropertyPanel"/>

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -19,34 +19,13 @@
 {
 	public class JavaBindingCompilerServices
 	{
-		JavaProject project;
-			
 		public bool CanCompile (string fileName)
 		{
 			return Path.GetExtension(fileName) == ".java";
 		}
 		
-		public ICompilerResult CompileFile (string filename)
-		{
-			// we really dont support compiling single files
-			throw new NotImplementedException ();	
-		}
-		
-		public string GetCompiledOutputName (string fileName)
-		{
-			return Path.ChangeExtension (fileName, ".class");
-		}
-
 		FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService(typeof(FileUtilityService));
 
-		public string GetCompiledOutputName (IProject project)
-		{
-			JavaProject p = (JavaProject) project;
-			JavaCompilerParameters compilerparameters = (JavaCompilerParameters) p.ActiveConfiguration;
-			
-			return fileUtilityService.GetDirectoryNameWithSeparator (compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + ".class";
-		}
-
 		string GetCompilerName (JavaCompilerParameters cp)
 		{
 			if (cp.Compiler == JavaCompiler.Gcj)
@@ -57,18 +36,18 @@
 			return "javac";
 		}
 		
-		public ICompilerResult CompileProject (IProject project)
+		public ICompilerResult Compile (ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration)
 		{
-			this.project = (JavaProject) project;
-			JavaCompilerParameters compilerparameters = (JavaCompilerParameters) project.ActiveConfiguration;
+			JavaCompilerParameters compilerparameters = (JavaCompilerParameters) configuration.CompilationParameters;
+			if (compilerparameters == null) compilerparameters = new JavaCompilerParameters ();
 			
-			string outdir = compilerparameters.OutputDirectory;
-			string exe = Path.Combine (outdir, compilerparameters.OutputAssembly + ".class");
+			string outdir = configuration.OutputDirectory;
+			string exe = Path.Combine (outdir, configuration.OutputAssembly + ".class");
 			string options = "";
 
 			string compiler = GetCompilerName (compilerparameters);
 			
-			if (compilerparameters.Debugmode) 
+			if (configuration.DebugMode) 
 				options += " -g ";
 			else
 				options += " -g:none ";
@@ -89,7 +68,7 @@
 			
 			string files  = "";
 			
-			foreach (ProjectFile finfo in project.ProjectFiles) {
+			foreach (ProjectFile finfo in projectFiles) {
 				if (finfo.Subtype != Subtype.Directory) {
 					switch (finfo.BuildAction) {
 						case BuildAction.Compile:
@@ -116,13 +95,13 @@
 
 			StreamReader output;
 			StreamReader error;
-			DoCompilation (compiler, args, tf, out output, out error);
+			DoCompilation (compiler, args, tf, configuration, compilerparameters, out output, out error);
 			ICompilerResult cr = ParseOutput (tf, error);			
 			
 			return cr;
 		}
 
-		private void DoCompilation (string compiler, string args, TempFileCollection tf, out StreamReader output, out StreamReader error)
+		private void DoCompilation (string compiler, string args, TempFileCollection tf, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, out StreamReader output, out StreamReader error)
 		{
             ProcessStartInfo si = new ProcessStartInfo (compiler, args);
 			si.RedirectStandardOutput = true;
@@ -142,7 +121,7 @@
 				System.Threading.Thread.Sleep (100);
 			}
 			
-			CompileToAssembly ();
+			CompileToAssembly (configuration, compilerparameters);
 			((SdStatusBar) sbs.Control).Done ();
 		
 			// FIXME: avoid having a full buffer
@@ -152,11 +131,10 @@
 			error = p.StandardError;
         }
 
-		void CompileToAssembly ()
+		void CompileToAssembly (DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters)
 		{
-			JavaCompilerParameters compilerparameters = (JavaCompilerParameters) project.ActiveConfiguration;
-			string outdir = compilerparameters.OutputDirectory;
-			string outclass = Path.Combine (outdir, compilerparameters.OutputAssembly + ".class");
+			string outdir = configuration.OutputDirectory;
+			string outclass = Path.Combine (outdir, configuration.OutputAssembly + ".class");
 			string asm = Path.GetFileNameWithoutExtension (outclass);
 		
 			// sadly I dont think we can specify the output .class name

Deleted: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingExecutionServices.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingExecutionServices.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaBindingExecutionServices.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -1,60 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Reflection;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Pads;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-
-namespace JavaBinding
-{
-	public class JavaBindingExecutionServices
-	{	
-		public void Execute (string filename)
-		{
-			throw new ApplicationException ("Cannot execute a file.");
-		}
-		
-		public void Execute (IProject project)
-		{
-			JavaCompilerParameters parameters = (JavaCompilerParameters) project.ActiveConfiguration;
-			string exe = ((JavaCompilerParameters) project.ActiveConfiguration).OutputAssembly;
-			exe = Path.ChangeExtension (exe, ".exe");
-			exe = Path.Combine (parameters.OutputDirectory, exe);
-	
-			if (!File.Exists (exe))
-			{
-				IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-				messageService.ShowError (String.Format (GettextCatalog.GetString ("Error running {0}"), exe));
-				return;
-			}
-			
-			string javaExec = String.Format ("-e \"mono {0}; echo; read -p 'press any key to continue...' -n1\"", exe);
-			ProcessStartInfo psi = new ProcessStartInfo ("xterm", javaExec);
-
-            try
-            {
-                psi.UseShellExecute = false;
-
-                Process p = new Process ();
-                p.StartInfo = psi;
-                p.Start ();
-                p.WaitForExit ();
-            }
-            catch
-            {
-                throw new ApplicationException (String.Format ("Cannot execute: {0}", exe));
-            }
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -16,6 +16,7 @@
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Internal.Templates;
 using MonoDevelop.Gui;
+using MonoDevelop.Services;
 
 namespace JavaBinding
 {
@@ -27,76 +28,49 @@
 		public const string LanguageName = "Java";
 		
 		JavaBindingCompilerServices   compilerServices  = new JavaBindingCompilerServices();
-		JavaBindingExecutionServices  executionServices = new JavaBindingExecutionServices();
 		
+		public JavaLanguageBinding ()
+		{
+			Runtime.ProjectService.DataContext.IncludeType (typeof(JavaCompilerParameters));
+		}
+		
 		public string Language {
 			get {
 				return LanguageName;
 			}
 		}
 		
-		public void Execute (string filename)
-		{
-			Debug.Assert(executionServices != null);
-			executionServices.Execute(filename);
-		}
-		
-		public void Execute (IProject project)
-		{
-			Debug.Assert (executionServices != null);
-			executionServices.Execute (project);
-		}
-		
-		public string GetCompiledOutputName(string fileName)
-		{
-			Debug.Assert(compilerServices != null);
-			return compilerServices.GetCompiledOutputName(fileName);
-		}
-		
-		public string GetCompiledOutputName(IProject project)
-		{
-			Debug.Assert(compilerServices != null);
-			return compilerServices.GetCompiledOutputName(project);
-		}
-		
 		public bool CanCompile(string fileName)
 		{
 			Debug.Assert(compilerServices != null);
 			return compilerServices.CanCompile(fileName);
 		}
 		
-		public ICompilerResult CompileFile(string fileName)
+		public ICompilerResult Compile (ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration)
 		{
 			Debug.Assert(compilerServices != null);
-			return compilerServices.CompileFile(fileName);
+			return compilerServices.Compile (projectFiles, references, configuration);
 		}
 		
-		public ICompilerResult CompileProject(IProject project)
+		public void GenerateMakefile (Project project, Combine parentCombine)
 		{
-			Debug.Assert(compilerServices != null);
-			return compilerServices.CompileProject(project);
+			throw new NotImplementedException ();
 		}
 		
-		public ICompilerResult RecompileProject(IProject project)
+		public object CreateCompilationParameters (XmlElement projectOptions)
 		{
-			return CompileProject(project);
+			JavaCompilerParameters parameters = new JavaCompilerParameters ();
+			if (projectOptions != null) {
+				if (projectOptions.Attributes["MainClass"] != null) {
+					parameters.MainClass = projectOptions.GetAttribute ("MainClass");
+				}
+				if (projectOptions.Attributes["ClassPath"] != null) {
+					parameters.ClassPath = projectOptions.GetAttribute ("ClassPath");
+				}
+			}
+			return parameters;
 		}
 		
-		public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
-		{
-			return new JavaProject(info, projectOptions);
-		}
-
-		public void DebugProject (IProject project)
-		{
-			//executionManager.Debug (project);
-		}
-
-		public void GenerateMakefile (IProject project, Combine parentCombine)
-		{
-			throw new NotImplementedException ();
-		}
-		
 		// http://www.nbirn.net/Resources/Developers/Conventions/Commenting/Java_Comments.htm#CommentBlock
 		public string CommentTag
 		{

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Makefile.am	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Makefile.am	2005-01-14 00:27:48 UTC (rev 2128)
@@ -11,12 +11,10 @@
 FILES = \
 Gui/ProjectConfigurationPropertyPanel.cs \
 Project/JavaCompilerParameters.cs \
-Project/JavaProject.cs \
 JavaBindingCompilerServices.cs \
 JavaCompiler.cs \
 JavaLanguageBinding.cs \
 FormatingStrategy/JavaFormattingStrategy.cs \
-JavaBindingExecutionServices.cs \
 ProjectTreeBuilder/JavaNodeBuilder.cs
 
 TEMPLATES = \

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaCompilerParameters.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaCompilerParameters.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaCompilerParameters.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -10,143 +10,100 @@
 using System.Diagnostics;
 
 using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Serialization;
 
 namespace JavaBinding
 {
 	/// <summary>
 	/// This class handles project specific compiler parameters
 	/// </summary>
-	public class JavaCompilerParameters : AbstractProjectConfiguration
+	public class JavaCompilerParameters
 	{
-		[XmlNodeName("CodeGeneration")]
-		class CodeGeneration 
-		{
-			[XmlAttribute("includedebuginformation")]
-			public bool debugmode = true;
-			
-			[XmlAttribute("deprecation")]
-			public bool deprecation = true;
-			
-			[XmlAttribute("optimize")]
-			public bool optimize = true;
-			
-			[XmlAttribute("mainclass")]
-			public string  mainclass = null;
-			
-			[XmlAttribute("definesymbols")]
-			public string definesymbols = String.Empty;
-			
-			[XmlAttribute("classpath")]
-			public string classpath = String.Empty;
-			
-			[XmlAttribute ("compiler")]
-			public JavaCompiler compiler = JavaCompiler.Gcj;		
-			[XmlAttribute("compilerpath")]
-			public string compilerpath = "gcj";		
-			
-			[XmlAttribute("genwarnings")]
-			public bool genwarnings = false;
-		}
+		[ItemProperty("deprecation")]
+		bool deprecation = true;
 		
-		[XmlNodeName("Execution")]
-		class Execution
-		{
-			[XmlAttribute("consolepause")]
-			public bool pauseconsoleoutput = true;
-		}
+		[ItemProperty("optimize")]
+		bool optimize = true;
 		
-		CodeGeneration codeGeneration = new CodeGeneration ();
+		[ItemProperty("mainclass")]
+		string  mainclass = null;
 		
-		Execution execution = new Execution ();
+		[ItemProperty("definesymbols")]
+		string definesymbols = String.Empty;
+		
+		[ItemProperty("classpath")]
+		string classpath = String.Empty;
+		
+		[ItemProperty ("compiler")]
+		JavaCompiler compiler = JavaCompiler.Gcj;
 
+		[ItemProperty("compilerpath")]
+		string compilerpath = "gcj";		
+		
+		[ItemProperty("genwarnings")]
+		bool genwarnings = false;
+		
 		public bool GenWarnings {
 			get {
-				return codeGeneration.genwarnings;
+				return genwarnings;
 			}
 			set {
-				codeGeneration.genwarnings = value;
+				genwarnings = value;
 			}
 		}
 		
 		public string ClassPath {
 			get {
-				return codeGeneration.classpath;
+				return classpath;
 			}
 			set {
-				codeGeneration.classpath = value;
+				classpath = value;
 			}
 		}
 
 		public JavaCompiler Compiler {
 			get {
-				return codeGeneration.compiler;
+				return compiler;
 			}
 			set {
-				codeGeneration.compiler = value;
+				compiler = value;
 			}
 		}
 		
 		public string CompilerPath {
 			get {
-				return codeGeneration.compilerpath;
+				return compilerpath;
 			}
 			set {
-				codeGeneration.compilerpath = value;
+				compilerpath = value;
 			}
 		}
 		
-		public bool Debugmode {
-			get {
-				return codeGeneration.debugmode;
-			}
-			set {
-				codeGeneration.debugmode = value;
-			}
-		}
-		
 		public bool Deprecation {
 			get {
-				return codeGeneration.deprecation;
+				return deprecation;
 			}
 			set {
-				codeGeneration.deprecation = value;
+				deprecation = value;
 			}
 		}
 		
 		public bool Optimize {
 			get {
-				return codeGeneration.optimize;
+				return optimize;
 			}
 			set {
-				codeGeneration.optimize = value;
+				optimize = value;
 			}
 		}
 		
 		public string MainClass {
 			get {
-				return codeGeneration.mainclass;
+				return mainclass;
 			}
 			set {
-				codeGeneration.mainclass = value;
+				mainclass = value;
 			}
 		}
-		
-		public bool PauseConsoleOutput {
-			get {
-				return execution.pauseconsoleoutput;
-			}
-			set {
-				execution.pauseconsoleoutput = value;
-			}
-		}
-		
-		public JavaCompilerParameters()
-		{
-		}
-
-		public JavaCompilerParameters(string name)
-		{
-			this.name = name;
-		}
 	}
 }

Deleted: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaProject.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaProject.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/Project/JavaProject.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -1,70 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Collections;
-using System.Diagnostics;
-using System.ComponentModel;
-using System.Xml;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Internal.Templates;
-
-namespace JavaBinding
-{
-	
-	/// <summary>
-	/// This class describes a Java project and it compilation options.
-	/// </summary>
-	public class JavaProject : AbstractProject
-	{		
-		public override string ProjectType {
-			get {
-				return JavaLanguageBinding.LanguageName;
-			}
-		}
-		
-		public override IConfiguration CreateConfiguration()
-		{
-			return new JavaCompilerParameters();
-		}
-		
-		public JavaProject()
-		{
-		}
-		
-		public JavaProject(ProjectCreateInformation info, XmlElement projectOptions)
-		{
-			if (info != null) {
-				Name = info.ProjectName;
-				
-				Configurations.Add(CreateConfiguration("Debug"));
-				Configurations.Add(CreateConfiguration("Release"));
-				
-				XmlElement el = projectOptions;
-				
-				foreach (JavaCompilerParameters parameter in Configurations) {
-					parameter.OutputDirectory = info.BinPath;
-					parameter.OutputAssembly  = Name;
-					
-					if (el != null) {
-						if (el.Attributes["MainClass"] != null) {
-							parameter.MainClass = el.Attributes["MainClass"].InnerText;
-						}
-						if (el.Attributes["PauseConsoleOutput"] != null) {
-							parameter.PauseConsoleOutput = Boolean.Parse(el.Attributes["PauseConsoleOutput"].InnerText);
-						}
-						if (el.Attributes["ClassPath"] != null) {
-							parameter.ClassPath = el.Attributes["ClassPath"].InnerText;
-						}
-					}
-				}
-			}
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ProjectTreeBuilder/JavaNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ProjectTreeBuilder/JavaNodeBuilder.cs	2005-01-14 00:27:29 UTC (rev 2127)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/JavaBinding/ProjectTreeBuilder/JavaNodeBuilder.cs	2005-01-14 00:27:48 UTC (rev 2128)
@@ -1,4 +1,4 @@
-// <file>
+// <file>
 //     <copyright see="prj:///doc/copyright.txt"/>
 //     <license see="prj:///doc/license.txt"/>
 //     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
@@ -27,12 +27,13 @@
 		FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 		IconService iconService = (IconService)ServiceManager.GetService(typeof(IconService));
 		
-		public bool CanBuildProjectTree(IProject project)
+		public bool CanBuildProjectTree(Project project)
 		{
-			return project.ProjectType == JavaLanguageBinding.LanguageName;
+			DotNetProject dp = project as DotNetProject; 
+			return dp != null && dp.LanguageName == JavaLanguageBinding.LanguageName;
 		}
 		
-		public AbstractBrowserNode BuildProjectTreeNode(IProject project)
+		public AbstractBrowserNode BuildProjectTreeNode(Project project)
 		{
 			ProjectBrowserNode projectNode = new ProjectBrowserNode(project);
 			




More information about the Monodevelop-patches-list mailing list