diff options
author | Lluis Sanchez <lluis@novell.com> | 2007-12-04 13:57:01 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2007-12-04 13:57:01 +0300 |
commit | 3693ff8d3f9ad1ab442a0bf8042017129bede938 (patch) | |
tree | 474e1d6f11f368f9b70489821343dd621c326f67 /main | |
parent | ee48143fa7ee41b73972e586bf0ef8609d8b3039 (diff) |
Directory reorganization
svn path=/branches/monodevelop/reorg/; revision=90646
Diffstat (limited to 'main')
50 files changed, 0 insertions, 6507 deletions
diff --git a/main/src/addins/JavaBinding/ChangeLog b/main/src/addins/JavaBinding/ChangeLog deleted file mode 100644 index 6cfd1f32dd..0000000000 --- a/main/src/addins/JavaBinding/ChangeLog +++ /dev/null @@ -1,392 +0,0 @@ -2007-12-03 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp, Makefile.am, Java.glade: Remove unused glade file. - -2007-11-20 Lluis Sanchez Gual <lluis@novell.com> - - * gtk-gui, gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs, - gtk-gui/generated.cs, gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs, - gtk-gui/gui.stetic: Added missing files. - -2007-11-20 Lluis Sanchez Gual <lluis@novell.com> - - * Gui/GlobalOptionsPanel.cs, Gui/ProjectConfigurationPropertyPanel.cs, - JavaBinding.mdp, Makefile.am: Migrated to Stetic. - -2007-11-15 Mike Krüger <mkrueger@novell.com> - - * JavaBindingCompilerServices.cs, JavaLanguageBinding.cs, - JavaBinding.addin.xml, JavaBinding.mdp, IKVMCompilerManager.cs, - Makefile.am: Worked on the java binding (compile & run of all sample - projects work). - - Removed the gnome sample project, because there seems to be something - wrong with the generated *.jar (no symbol for Modules.UI). - -2007-10-29 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Bump MD version. - -2007-10-29 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Track changes in the Icon extension node. - -2007-10-25 Lluis Sanchez Gual <lluis@novell.com> - - * icons/Java.File.EmptyFile, icons/Java.File.Form, icons/Java.File.FullFile, - icons/Java.File.NewClass, icons/Java.File.WebFile, JavaBinding.mdp, - Makefile.am, templates/EmptyJavaFile.xft.xml, - templates/JavaApplet.xft.xml, templates/JavaApplication.xft.xml, - templates/JavaDialog.xft.xml, templates/JavaFrame.xft.xml, - templates/JavaOKDialog.xft.xml, templates/JavaPanel.xft.xml: Use tango - file icons. Removed obsolete icons. - -2007-10-24 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp, templates/IkvmGnomeApplicationProject.xpt.xml, - templates/IkvmGladeApplicationProject.xpt.xml, - templates/JavaConsoleApplicationProject.xpt.xml, - templates/IkvmLibraryProject.xpt.xml, - templates/EmptyJavaProject.xpt.xml, - templates/IkvmGtkApplicationProject.xpt.xml, - templates/JavaApplicationProject.xpt.xml, - templates/IkvmConsoleApplicationProject.xpt.xml, Makefile.am, - icons/Java.Project.Form, icons/Java.Project.Library, - icons/Java.Project.WebProject, icons/Java.ProjectIcon, - icons/Java.Project.DOSProject, icons/Java.Project.UserControl, - icons/Java.Project.EmptyProject, icons/Java.Project.ServiceProject, - icons/java-icon-32.png, icons/Java.Project.FullProject: Updated project - icons. Use the base project icon with an overlay to show the type. - -2007-10-23 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp: Project file names updated by change in MD path - functions. - -2007-09-21 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Bump MD version. - -2007-09-20 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Added an Other section in the MD property dialog - and moved some options there to avoid too many branches. - -2007-09-04 Michael Hutchinson <MHutchinson@novell.com> - - * JavaLanguageBinding.cs, Gui/GlobalOptionsPanel.cs, - Gui/ProjectConfigurationPropertyPanel.cs: Fix some compiler warnings. - -2007-08-31 Mike Krüger <mkrueger@novell.com> - - * JavaLanguageBinding.cs, Gui/GlobalOptionsPanel.cs, - Gui/ProjectConfigurationPropertyPanel.cs: Changes due to new property - infrastructure. - -2007-08-09 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml, JavaBinding.mdp, Makefile.am: Reorganized the - extension point hierarchy. Embedded all add-in manifests as resources. - -2007-07-25 Lluis Sanchez Gual <lluis@novell.com> - - * Parser/Resolver.cs, Parser/TypeVisitor.cs: Remove debug code. - -2007-05-11 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp: Copy the .addins.xml file to the output dir. - -2007-05-04 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Migration to Mono.Addins. - -2007-04-19 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp: Don't copy referenced assemblies. - -2007-02-16 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp: Set target runtime to 2.0. - -2007-02-16 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Change add-in versions to 0.13. - -2007-02-15 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp, Makefile.am: Synchronized the MD project and the - Makefile - -2006-12-14 Lluis Sanchez Gual <lluis@novell.com> - - * Parser/SharpDevelopTree/CompilationUnit.cs, - Parser/SharpDevelopTree/Indexer.cs, - Parser/SharpDevelopTree/Method.cs, - Parser/SharpDevelopTree/Parameter.cs, - Parser/SharpDevelopTree/Event.cs, - Parser/SharpDevelopTree/ReturnType.cs, - Parser/SharpDevelopTree/Field.cs, - Parser/SharpDevelopTree/Property.cs, - Parser/SharpDevelopTree/Class.cs, - Parser/SharpDevelopTree/Constructor.cs, - Parser/SharpDevelopTree/AttributeSection.cs: Renamed Abstract* - classes to Default*. - -2006-09-18 Jacob Ilsø Christensen <jacobilsoe@gmail.com> - - * JavaBinding.mdp: Updated. - * .: Added svn:ignore for JavaBinding.pidb. - -2006-07-03 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Updated versions. - * JavaBindingCompilerServices.cs: Track changes in ProjectReference. - -2006-06-15 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Use the DataType element instead fof Class - to declare serializable types. - -2006-05-04 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Updated versions. - * JavaBinding.mdp: Updated. - -2006-04-21 Lluis Sanchez Gual <lluis@novell.com> - - * JavaLanguageBinding.cs: Implement GetSupportedClrVersions. - -2006-04-07 David Makovský (Yakeen) <yakeen@sannyas-on.net> - - * JavaBinding.addin.xml: renamed attribute in FileFilter Extension - -2006-03-30 Lluis Sanchez Gual <lluis@novell.com> - - * Makefile.am: - * JavaBinding.addin.xml: Updated references. - -2006-03-24 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.mdp: Updated. - * Makefile.am: Use an unified format. Patch by Matze Braun. - * JavaBinding.addin.xml: Updated add-in versions. - -2006-03-12 David Makovský (Yakeen) <yakeen@sannyas-on.net> - - * Java.glade: Marking some strings not to be translated. Not include balast in pot file. - -2006-01-30 Lluis Sanchez Gual <lluis@novell.com> - - * Parser/Resolver.cs: - * Parser/Parser.cs: Track changes in parser api. - -2005-12-13 Lluis Sanchez Gual <lluis@novell.com> - - * JavaLanguageBinding.cs: Implemented IDotNetLanguageBinding methods. - * templates/*: Set the correct category and language name. - -2005-11-15 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBindingCompilerServices.cs: Look for ikvmc.exe in the configured - directory and in the bin subdirectory. Fixes bug #76700. - -2005-11-14 Lluis Sanchez Gual <lluis@novell.com> - - * templates/JavaConsoleApplicationProject.xpt.xml: - * templates/JavaApplicationProject.xpt.xml: "Class" is not a valid - project target. Changed to Exe. - -2005-10-11 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Fixed incorrect class name. - -2005-10-11 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Fixed addin header information. - Use "id" attribuet instead of "name" to identify addins. - -2005-10-06 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: - * JavaLanguageBinding.cs: Register serializable types in the addin - configuration file. - -2005-10-04 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBinding.addin.xml: Added addin dependencies. - -2005-08-12 Lluis Sanchez Gual <lluis@novell.com> - - * templates/*: - * JavaBinding.addin.xml: Properly reference resource icons and - templates. - * Makefile.am: Embed icon and templates as resources. - -2005-08-09 Lluis Sanchez Gual <lluis@novell.com> - - * Parser/Resolver.cs: - * Parser/Parser.cs: Use the new IParserContext API. - -2005-07-11 Lluis Sanchez Gual <lluis@novell.com> - - * Project/JavaCompilerParameters.cs: Implement ICloneable. - * JavaLanguageBinding.cs : CreateCompilationParameters now returns an - ICloneable. - -2005-06-11 Lluis Sanchez Gual <lluis@novell.com> - - * Gui/ProjectConfigurationPropertyPanel.cs: Fix build. - -2005-05-20 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBindingCompilerServices.cs: Automatically generate wrappers - for referenced assemblies. Improved error parsing. Many fixes. - * ProjectConfigurationPropertyPanel.cs: Moved to Glade. - * JavaLanguageBinding.cs: Added some global configuration properties. - * JavaCompilerParameters.cs: Added missing DefineSymbols property. - * JavaBinding.addin.xml: Added new configuration dialogs and a new - template. - * Makefile.am: Added a new template and a glade file. - * templates/IkvmGtkApplicationProject.xpt.xml: - * templates/IkvmGladeApplicationProject.xpt.xml: - * templates/IkvmGnomeApplicationProject.xpt.xml: Added GTK references - in the GTK# projects. - * templates/IkvmConsoleApplicationProject.xpt.xml: Removed hard-coded - classpath. - * Java.glade: New glade file for java options. - * Gui/GlobalOptionsPanel.cs: New java options panel. - * templates/IkvmLibraryProject.xpt.xml: New project template. - -2005-04-17 John Luke <john.luke@gmail.com> - - * Makefile.am: fix distcheck - -2005-02-16 Ben Motmans <ben.motmans@gmail.com> - - * EmptyJavaFile: - * EmptyJavaProject: - * JavaConsoleApplicationProject: - * JavaApplicationProject: - * JavaApplication: - * JavaApplet: - * JavaFrame: - * JavaOKDialog: - * JavaPanel: - Consistent naming - -2005-02-05 John Luke <john.luke@gmail.com> - - * Makefile.am - * JavaBinding.addin.xml: remove custom node builder - * ProjectTreeBuilder/JavaNodeBuilder.cs: remove custom - node builder in favor of using the default so references - can be added (ikvm projects need IKVM.GNU.Classpath.dll and - IKVM.Runtime.dll) - * JavaBindingCompilerServices.cs: work like the C# bindings, - error parsing is broken but Im pretty sure it already was - -2005-01-24 Lluis Sanchez Gual <lluis@novell.com> - - * JavaBindingCompilerServices.cs: - * JavaLanguageBinding.cs: Use the new progress monitor API. - -2005-01-16 John Luke <john.luke@gmail.com> - - * Makefile.am: remove FormattingStrategy from build - * JavaLanguageBinding.cs: make const LanguageName internal - comment out NotImplementedException for GenerateMakefile - so it doesn't abort MD when running - * JavaBindingCompilerServices.cs: remove warnings - * ProjectTreeBuilder/JavaNodeBuilder.cs: remove some unused - code that caused warnings, use MonoDevelop.Services.Runtime - instead of old method of getting services - * TODO: add - * template/Ikvm*.xft: Target "Exe" or "WinExe" instead of "Class" - -2005-01-11 Lluis Sanchez Gual <lluis@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@novell.com> - - * JavaBindingCompilerServices.cs: StatusBarService.ProgressMonitor is - not a StatusBar widget any more. - -2004-12-07 Alexandre Gomes <alexmipego@hotmail.com> - - * JavaLanguageBinding.cs: Added CommentTag to be used by (Un)CommentCode - -2004-11-05 Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com> - - * Parser/Parser.cs: Added HandlesFileExtension() to work with new - IParser - -2004-07-05 John Luke <jluke@cfl.rr.com> - - * *.cs: cleanup everything - remove single file compile/run - remove runtime choices and use ikvmc to produce assemblies - - need to check errors on ikvmc part, I wish there was a better - way than screen-scraping to do this. - - convert line endings to unix, not sure why they were dos style - -2004-06-08 John Luke <jluke@cfl.rr.com> - - * JavaBindingCompilerService.cs: rework so Process.Start works - * JavaBindingExecutionService.cs: rework so Process.Start works - by using ProcessStartInfo (cmd, args) - add support for using Gij - * Gui/ProjectConfigurationPropertyPanel.cs: - enable Java, remove Mono, and add Gij runtimes - * JavaRuntime.cs: add Gij - -2004-05-25 Todd Berman <tberman@sevenl.net> - - * JavaLanguageBinding.cs: signature change for GenerateMakefile. - -2004-04-28 Todd Berman <tberman@sevenl.net> - - * JavaLanguageBinding.cs: stubbing GenerateMakefile. - -2004-04-16 John Luke <jluke@cfl.rr.com> - - * JavaBindingCompilerService.cs: - rework error parsing to work off of Streams instead of temp files - allows javac errors to work, gcj maybe not - set the column of the error - specify the output directory - * Project/JavaCompilerOptions: add runtime prop - * JavaBindingExecutionService.cs: add prelim support - for choosing runtime - * JavaCompiler.cs: - * JavaRuntime.cs: add enums for compiler and runtime - -2004-04-09 John Luke <jluke@cfl.rr.com> - - * JavaBindingCompilerService.cs: account for classpath when compiling, - work with gcj or javac, cleanup old code - * Gui/ProjectConfigurationPropertyPanel.cs: rough port, needs major HIG love, - cleanup, add RadioButtons to select from gcj and javac - * JavaBindingExecutionService.cs: use ikvm instead of java runtime - * Parser/*: make a copy of the CSharpBinding/Parser in case I am crazy enough - to port the parser to work with Java (not built yet) - * Project/JavaCompilerParameters.cs: add javac/gcj .Compiler property, - fix CompilerPath from being hardcoded - -2004-03-25 John Luke <jluke@cfl.rr.com> - - import from SD and make it build with our - namespaces and SourceEditor - change to work like CSharpBinding diff --git a/main/src/addins/JavaBinding/FormatingStrategy/JavaFormattingStrategy.cs b/main/src/addins/JavaBinding/FormatingStrategy/JavaFormattingStrategy.cs deleted file mode 100644 index 8c90693eb5..0000000000 --- a/main/src/addins/JavaBinding/FormatingStrategy/JavaFormattingStrategy.cs +++ /dev/null @@ -1,250 +0,0 @@ -// JavaFormattingStrategy.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Mike Krüger <mkrueger@novell.com> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -using System; -using System.Collections; -using System.Diagnostics; -using System.Drawing; -using System.Text; - -using MonoDevelop.TextEditor; -using MonoDevelop.TextEditor.Document; -using MonoDevelop.Core.Properties; -using MonoDevelop.Core; -using MonoDevelop.Core; -using MonoDevelop.EditorBindings.FormattingStrategy; - -namespace JavaBinding.FormattingStrategy -{ - /// <summary> - /// This class handles the auto and smart indenting in the textbuffer while - /// you type. - /// </summary> - public class JavaFormattingStrategy : DefaultFormattingStrategy - { - public JavaFormattingStrategy() - { - } - - /// <summary> - /// Define Java specific smart indenting for a line :) - /// </summary> - protected override int SmartIndentLine(IFormattableDocument d, int lineNr) - { - if (lineNr > 0) { - string lineAboveText = d.GetLineAsString (lineNr - 1); - string trimlineAboveText = lineAboveText.Trim (); - string curLineText = d.GetLineAsString (lineNr); - string trimcurLineText = curLineText.Trim (); - - if (lineAboveText.EndsWith(")") && curLineText.StartsWith("{")) { - string indentation = GetIndentation(d, lineNr - 1); - d.ReplaceLine (lineNr, indentation + curLineText); - return indentation.Length; - } - - if (curLineText.StartsWith("}")) { // indent closing bracket. - int openLine; - int closingBracketOffset = d.GetClosingBraceForLine (lineNr, out openLine); - if (closingBracketOffset == -1) { // no closing bracket found -> autoindent - return AutoIndentLine(d, lineNr); - } - - string indentation = GetIndentation (d, lineNr - 1); - - d.ReplaceLine (lineNr, indentation + curLineText); - return indentation.Length; - } - - if (lineAboveText.EndsWith(";")) { // expression ended, reset to valid indent. - int openLine; - int closingBracketOffset = d.GetClosingBraceForLine (lineNr, out openLine); - if (closingBracketOffset == -1) { // no closing bracket found -> autoindent - return AutoIndentLine(d, lineNr); - } - - string closingBracketLineText = d.GetLineAsString (openLine).Trim (); - - string indentation = GetIndentation (d, openLine); - - // special handling for switch statement formatting. - if (closingBracketLineText.StartsWith("switch")) { - if (lineAboveText.StartsWith("break;") || - lineAboveText.StartsWith("goto") || - lineAboveText.StartsWith("return")) { - } else { - indentation += d.IndentString; - } - } - indentation += d.IndentString; - - d.ReplaceLine (lineNr, indentation + curLineText); - return indentation.Length; - } - - if (lineAboveText.EndsWith("{") || // indent opening bracket. - lineAboveText.EndsWith(":") || // indent case xyz: - (lineAboveText.EndsWith(")") && // indent single line if, for ... etc - (lineAboveText.StartsWith("if") || - lineAboveText.StartsWith("while") || - lineAboveText.StartsWith("for"))) || - lineAboveText.EndsWith("else")) { - string indentation = GetIndentation (d, lineNr - 1) + d.IndentString; - d.ReplaceLine (lineNr, indentation + curLineText); - return indentation.Length; - } else { - // try to indent linewrap - ArrayList bracketPos = new ArrayList(); - for (int i = 0; i < lineAboveText.Length; ++i) { // search for a ( bracket that isn't closed - switch (lineAboveText[i]) { - case '(': - bracketPos.Add(i); - break; - case ')': - if (bracketPos.Count > 0) { - bracketPos.RemoveAt(bracketPos.Count - 1); - } - break; - } - } - if (bracketPos.Count > 0) { - int bracketIndex = (int)bracketPos[bracketPos.Count - 1]; - string indentation = GetIndentation (d, lineNr - 1); - - for (int i = 0; i <= bracketIndex; ++i) { // insert enough spaces to match - indentation += " "; // brace start in the next line - } - - d.ReplaceLine (lineNr, indentation + curLineText); - return indentation.Length; - } - } - } - return AutoIndentLine (d, lineNr); - } - - bool NeedCurlyBracket(string text) - { - int curlyCounter = 0; - - bool inString = false; - bool inChar = false; - - bool lineComment = false; - bool blockComment = false; - - for (int i = 0; i < text.Length; ++i) { - switch (text[i]) { - case '\r': - case '\n': - lineComment = false; - break; - case '/': - if (blockComment) { - Debug.Assert(i > 0); - if (text[i - 1] == '*') { - blockComment = false; - } - } - if (!inString && !inChar && i + 1 < text.Length) { - if (!blockComment && text[i + 1] == '/') { - lineComment = true; - } - if (!lineComment && text[i + 1] == '*') { - blockComment = true; - } - } - break; - case '"': - inString = !inString; - break; - case '\'': - inChar = !inChar; - break; - case '{': - if (!(inString || inChar || lineComment || blockComment)) { - ++curlyCounter; - } - break; - case '}': - if (!(inString || inChar || lineComment || blockComment)) { - --curlyCounter; - } - break; - } - } - return curlyCounter > 0; - } - - // used for comment tag formater/inserter - public override int FormatLine (IFormattableDocument d, int lineNr, int cursorOffset, char ch) - { - switch (ch) { - //case '}': - //case '{': - // return d.FormattingStrategy.IndentLine (d, lineNr); - case '\n': - if (lineNr <= 0) { - return IndentLine(d, lineNr); - } - - if (d.AutoInsertCurlyBracket) { - string oldLineText = d.GetLineAsString (lineNr - 1); - if (oldLineText.EndsWith ("{") && NeedCurlyBracket (d.TextContent)) { - d.Insert (cursorOffset, "\n}"); - IndentLine(d, lineNr + 1); - } - } - - string lineAboveText = d.GetLineAsString (lineNr - 1); - - -#if NON_PORTABLE_CODE - if (lineAbove.HighlightSpanStack != null && lineAbove.HighlightSpanStack.Count > 0) { - if (!((Span)lineAbove.HighlightSpanStack.Peek()).StopEOL) { // case for /* style comments - int index = lineAboveText.IndexOf("/*"); - - if (index > 0) { - string indentation = GetIndentation(d, lineNr - 1); - for (int i = indentation.Length; i < index; ++ i) { - indentation += ' '; - } - d.Document.Replace(curLine.Offset, cursorOffset - curLine.Offset, indentation + " * "); - return indentation.Length + 3; - } - - index = lineAboveText.IndexOf("*"); - if (index > 0) { - string indentation = GetIndentation(d, lineNr - 1); - for (int i = indentation.Length; i < index; ++ i) { - indentation += ' '; - } - d.Document.Replace(curLine.Offset, cursorOffset - curLine.Offset, indentation + "* "); - return indentation.Length + 2; - } - } - } -#endif - return IndentLine(d, lineNr); - } - return 0; - } - } -} diff --git a/main/src/addins/JavaBinding/Gui/GlobalOptionsPanel.cs b/main/src/addins/JavaBinding/Gui/GlobalOptionsPanel.cs deleted file mode 100644 index 2bb16c36de..0000000000 --- a/main/src/addins/JavaBinding/Gui/GlobalOptionsPanel.cs +++ /dev/null @@ -1,59 +0,0 @@ - -using System; -using Gtk; - -using MonoDevelop.Projects; -using MonoDevelop.Core.Gui.Dialogs; -using MonoDevelop.Components; -using MonoDevelop.Core; - -namespace JavaBinding -{ - public class GlobalOptionsPanelPanel : AbstractOptionPanel - { - GlobalOptionsPanelWidget widget; - - public override void LoadPanelContents() - { - Add (widget = new GlobalOptionsPanelWidget ()); - } - - public override bool StorePanelContents() - { - bool result = true; - result = widget.Store (); - return result; - } - } - - partial class GlobalOptionsPanelWidget : Gtk.Bin - { - public GlobalOptionsPanelWidget () - { - Build (); - - ListStore store = new ListStore (typeof (string)); - store.AppendValues (GettextCatalog.GetString ("Javac")); - store.AppendValues (GettextCatalog.GetString ("Gcj")); - compilerCombo.Model = store; - CellRendererText cr = new CellRendererText (); - compilerCombo.PackStart (cr, true); - compilerCombo.AddAttribute (cr, "text", 0); - compilerCombo.Active = (int) JavaLanguageBinding.Properties.CompilerType; - - ikvmPathEntry.Path = JavaLanguageBinding.Properties.IkvmPath; - compilerPathEntry.Text = JavaLanguageBinding.Properties.CompilerCommand; - classpathEntry.Text = JavaLanguageBinding.Properties.Classpath; - } - - public bool Store () - { - JavaLanguageBinding.Properties.IkvmPath = ikvmPathEntry.Path; - JavaLanguageBinding.Properties.CompilerCommand = compilerPathEntry.Text; - JavaLanguageBinding.Properties.Classpath = classpathEntry.Text; - - JavaLanguageBinding.Properties.CompilerType = (JavaCompiler) compilerCombo.Active; - return true; - } - } -} diff --git a/main/src/addins/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs b/main/src/addins/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs deleted file mode 100644 index 1b4ba980ce..0000000000 --- a/main/src/addins/JavaBinding/Gui/ProjectConfigurationPropertyPanel.cs +++ /dev/null @@ -1,123 +0,0 @@ -// ProjectConfigurationPropertyPanel.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Mike Krüger <mkrueger@novell.com> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -using System; -using Gtk; - -using MonoDevelop.Projects; -using MonoDevelop.Core.Gui.Dialogs; -using MonoDevelop.Components; -using MonoDevelop.Core; - -namespace JavaBinding -{ - public class ProjectConfigurationPropertyPanel : AbstractOptionPanel - { - CodeGenerationPanelWidget widget; - - public override void LoadPanelContents() - { - Add (widget = new CodeGenerationPanelWidget ((Properties) CustomizationObject)); - } - - public override bool StorePanelContents() - { - bool result = true; - result = widget.Store (); - return result; - } - } - - partial class CodeGenerationPanelWidget : Gtk.Bin - { - JavaCompilerParameters compilerParameters = null; - DotNetProjectConfiguration configuration; - - public CodeGenerationPanelWidget (Properties CustomizationObject) - { - Build (); - - configuration = ((Properties)CustomizationObject).Get<DotNetProjectConfiguration> ("Config"); - compilerParameters = (JavaCompilerParameters) configuration.CompilationParameters; - - ListStore store = new ListStore (typeof (string)); - store.AppendValues (GettextCatalog.GetString ("Executable")); - store.AppendValues (GettextCatalog.GetString ("Library")); - compileTargetCombo.Model = store; - CellRendererText cr = new CellRendererText (); - compileTargetCombo.PackStart (cr, true); - compileTargetCombo.AddAttribute (cr, "text", 0); - compileTargetCombo.Active = (int) configuration.CompileTarget; - - if (compilerParameters.Compiler == JavaCompiler.Javac) - compilerJavacButton.Active = true; - else - compilerGcjButton.Active = true; - - compilerJavacButton.Toggled += new EventHandler (OnCompilerToggled); - compilerGcjButton.Toggled += new EventHandler (OnCompilerToggled); - - enableOptimizationCheckButton.Active = compilerParameters.Optimize; - generateDebugInformationCheckButton.Active = configuration.DebugMode; - deprecationCheckButton.Active = compilerParameters.Deprecation; - generateWarningsCheckButton.Active = compilerParameters.GenWarnings; - warningsAsErrorsCheckButton.Active = !configuration.RunWithWarnings; - - compilerEntry.Text = compilerParameters.CompilerPath; - classPathEntry.Text = compilerParameters.ClassPath; - mainClassEntry.Text = compilerParameters.MainClass; - symbolsEntry.Text = compilerParameters.DefineSymbols; - OnCompilerToggled (null, null); - } - - void OnCompilerToggled (object o, EventArgs args) - { - if (compilerJavacButton.Active) - compilerEntry.Text = "javac"; - else - compilerEntry.Text = "gcj"; - } - - public bool Store () - { - if (compilerParameters == null) - return true; - - if (compilerJavacButton.Active) - compilerParameters.Compiler = JavaCompiler.Javac; - else - compilerParameters.Compiler = JavaCompiler.Gcj; - - configuration.CompileTarget = (CompileTarget) compileTargetCombo.Active; - compilerParameters.GenWarnings = generateWarningsCheckButton.Active; - compilerParameters.Deprecation = deprecationCheckButton.Active; - configuration.DebugMode = generateDebugInformationCheckButton.Active; - compilerParameters.Optimize = enableOptimizationCheckButton.Active; - configuration.RunWithWarnings = !warningsAsErrorsCheckButton.Active; - - compilerParameters.CompilerPath = compilerEntry.Text; - compilerParameters.ClassPath = classPathEntry.Text; - compilerParameters.MainClass = mainClassEntry.Text; - compilerParameters.DefineSymbols = symbolsEntry.Text; - return true; - } - } - -} diff --git a/main/src/addins/JavaBinding/IKVMCompilerManager.cs b/main/src/addins/JavaBinding/IKVMCompilerManager.cs deleted file mode 100644 index 467cf3746c..0000000000 --- a/main/src/addins/JavaBinding/IKVMCompilerManager.cs +++ /dev/null @@ -1,274 +0,0 @@ -// -// IKVMCompilerManager.cs -// -// Author: -// Mike Krüger <mkrueger@novell.com> -// -// Copyright (C) 2007 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.IO; -using System.Text; - -using MonoDevelop.Core; -using MonoDevelop.Core.Execution; -using MonoDevelop.Core.ProgressMonitoring; -using MonoDevelop.Projects; - -namespace JavaBinding -{ - public static class IKVMCompilerManager - { - static string GenerateOptionString (DotNetProjectConfiguration configuration) - { - JavaCompilerParameters parameters = (configuration.CompilationParameters as JavaCompilerParameters) ?? new JavaCompilerParameters (); - StringBuilder result = new StringBuilder (); - result.Append (configuration.DebugMode ? " -g " : " -g:none "); - if (parameters.Optimize) - result.Append (" -O "); - if (parameters.Deprecation) - result.Append (" -deprecation "); - if (parameters.GenWarnings) - result.Append (" -nowarn "); - result.Append (" -encoding utf8 "); - return result.ToString (); - } - - public static ICompilerResult Compile (ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor) - { - JavaCompilerParameters parameters = (configuration.CompilationParameters as JavaCompilerParameters) ?? new JavaCompilerParameters (); - string outdir = configuration.OutputDirectory; - string options = GenerateOptionString (configuration); - string compiler = parameters.CompilerPath; - if (String.IsNullOrEmpty (compiler)) - compiler = "javac"; - - StringBuilder files = new StringBuilder (); - foreach (ProjectFile finfo in projectFiles) { - if (finfo.Subtype != Subtype.Directory && finfo.BuildAction == BuildAction.Compile) { - files.Append (" \""); - files.Append (finfo.Name); - files.Append ("\""); - } - } - - StringBuilder classpath = new StringBuilder (parameters.ClassPath); - AppendClasspath (classpath, GenerateReferenceStubs (monitor, configuration, parameters, references)); - AppendClasspath (classpath, GenerateReferenceStub (monitor, configuration, new ProjectReference(ReferenceType.Gac, "mscorlib"))); - - StringBuilder args = new StringBuilder (); - args.Append (options.ToString ()); - if (parameters.Compiler == JavaCompiler.Gcj) - args.Append ("-C "); - if (classpath.Length != 0) { - args.Append (" -classpath "); - args.Append (classpath.ToString ()); - } - args.Append (files.ToString ()); - args.Append (" -d "); - args.Append (outdir); - - CompilerResults results = new CompilerResults (new TempFileCollection ()); - StringWriter output = new StringWriter (); - StringWriter error = new StringWriter (); - - bool success = Compile (monitor, compiler, args.ToString (), configuration, parameters, output, error); - ParseJavaOutput (parameters.Compiler, error.ToString(), results); - - if (success) { - output = new StringWriter (); - error = new StringWriter (); - CompileToAssembly (monitor, configuration, parameters, references, output, error); - ParseIkvmOutput (parameters.Compiler, error.ToString(), results); - } - - return new DefaultCompilerResult (results, ""); - } - - static void AppendClasspath (StringBuilder path, string jar) - { - if (path.Length > 0) - path.Append (":"); - path.Append (jar); - } - - static string GenerateReferenceStubs (IProgressMonitor monitor, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectReferenceCollection references) - { - StringBuilder result = new StringBuilder (); - if (references != null) { - foreach (ProjectReference reference in references) { - AppendClasspath (result, GenerateReferenceStub (monitor, configuration, reference)); - } - } - return result.ToString (); - } - - static string GenerateReferenceStub (IProgressMonitor monitor,DotNetProjectConfiguration configuration, ProjectReference reference) - { - StringBuilder result = new StringBuilder (); - foreach (string fileName in reference.GetReferencedFileNames ()) { - string name = Path.GetFileNameWithoutExtension (Path.GetFileName (fileName)); - string outputName = Path.Combine (configuration.OutputDirectory, name + ".jar"); - if (!System.IO.File.Exists (outputName)) { - monitor.Log.WriteLine (String.Format (GettextCatalog.GetString ("Generating {0} reference stub ..."), name)); - ProcessWrapper p = Runtime.ProcessService.StartProcess ("ikvmstub", "\"" + fileName + "\"", configuration.OutputDirectory, null); - p.WaitForExit (); - } - AppendClasspath (result, outputName); - } - return result.ToString (); - } - static string TargetToString (CompileTarget target) - { - switch (target) { - case CompileTarget.WinExe: - return "winexe"; - case CompileTarget.Library: - return "library"; - } - return "exe"; - } - - static void CompileToAssembly (IProgressMonitor monitor, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, ProjectReferenceCollection references, TextWriter output, TextWriter error) - { - monitor.Log.WriteLine (GettextCatalog.GetString ("Generating assembly ...")); - - LogTextWriter chainedError = new LogTextWriter (); - chainedError.ChainWriter (monitor.Log); - chainedError.ChainWriter (error); - - LogTextWriter chainedOutput = new LogTextWriter (); - chainedOutput.ChainWriter (monitor.Log); - chainedOutput.ChainWriter (output); - - string outdir = configuration.OutputDirectory; - string outclass = Path.Combine (outdir, configuration.OutputAssembly + ".class"); - string asm = Path.GetFileNameWithoutExtension (outclass); - - StringBuilder args = new StringBuilder ("*.class "); - - args.Append ("-assembly:"); args.Append (asm); - args.Append (" -target:"); args.Append (TargetToString (configuration.CompileTarget)); - if (configuration.DebugMode) - args.Append (" -debug"); - args.Append (" -srcpath:"); args.Append (configuration.SourceDirectory); - - if (references != null) { - foreach (ProjectReference lib in references) { - foreach (string fileName in lib.GetReferencedFileNames ()) { - args.Append (" -r:"); args.Append (fileName); - } - } - } - - foreach (string fileName in new ProjectReference(ReferenceType.Gac, "mscorlib").GetReferencedFileNames ()) { - args.Append (" -r:"); args.Append (fileName); - } - - Process process = Runtime.ProcessService.StartProcess ("ikvmc", args.ToString (), configuration.OutputDirectory, chainedOutput, chainedError, null); - process.WaitForExit (); - } - - static bool Compile (IProgressMonitor monitor, string compiler, string args, DotNetProjectConfiguration configuration, JavaCompilerParameters compilerparameters, TextWriter output, TextWriter error) - { - LogTextWriter chainedError = new LogTextWriter (); - chainedError.ChainWriter (monitor.Log); - chainedError.ChainWriter (error); - - LogTextWriter chainedOutput = new LogTextWriter (); - chainedOutput.ChainWriter (monitor.Log); - chainedOutput.ChainWriter (output); - - monitor.Log.WriteLine (GettextCatalog.GetString ("Compiling Java source code ...")); - - Process process = Runtime.ProcessService.StartProcess (compiler, args, null, chainedOutput, chainedError, null); - process.WaitForExit (); - return process.ExitCode == 0; - } - - static void ParseJavaOutput (JavaCompiler compiler, string errorStr, CompilerResults cr) - { - TextReader reader = new StringReader (errorStr); - string line; - while ((line = reader.ReadLine ()) != null) { - CompilerError error = CreateJavaErrorFromString (compiler, line); - if (error != null) - cr.Errors.Add (error); - } - reader.Close (); - } - - private static CompilerError CreateJavaErrorFromString (JavaCompiler compiler, string next) - { - CompilerError result = new CompilerError (); - - int errorCol = 0; - string col = next.Trim (); - if (col.Length == 1 && col == "^") - errorCol = next.IndexOf ("^"); - - int index1 = next.IndexOf (".java:"); - if (index1 < 0) - return null; - - string s2 = next.Substring (index1 + 6); - int index2 = s2.IndexOf (":"); - int line = Int32.Parse (next.Substring (index1 + 6, index2)); - - result.Column = errorCol; - result.Line = line; - result.ErrorText = next.Substring (index1 + index2 + 7); - result.FileName = Path.GetFullPath (next.Substring (0, index1) + ".java"); - return result; - } - - static void ParseIkvmOutput (JavaCompiler compiler, string errorStr, CompilerResults cr) - { - TextReader reader = new StringReader (errorStr); - string line; - while ((line = reader.ReadLine ()) != null) { - CompilerError error = CreateIkvmErrorFromString (line); - if (error != null) - cr.Errors.Add (error); - } - reader.Close (); - } - - static CompilerError CreateIkvmErrorFromString (string error) - { - if (error.StartsWith ("Note") || error.StartsWith ("Warning")) - return null; - string trimmed = error.Trim (); - if (trimmed.StartsWith ("(to avoid this warning add")) - return null; - - CompilerError cerror = new CompilerError (); - cerror.ErrorText = error; - return cerror; - } - - } -} -
\ No newline at end of file diff --git a/main/src/addins/JavaBinding/JavaBinding.addin.xml b/main/src/addins/JavaBinding/JavaBinding.addin.xml deleted file mode 100644 index 4e851204d5..0000000000 --- a/main/src/addins/JavaBinding/JavaBinding.addin.xml +++ /dev/null @@ -1,81 +0,0 @@ -<Addin id = "JavaBinding" - namespace = "MonoDevelop" - name = "Java Language Binding" - author = "Todd Berman" - copyright = "GPL" - url = "http://www.monodevelop.com" - description = "Java Language Binding" - category = "Language bindings" - version = "0.17.0"> - - <Runtime> - <Import assembly = "JavaBinding.dll"/> - </Runtime> - - <Dependencies> - <Addin id="Core" version="0.17.0"/> - <Addin id="Core.Gui" version="0.17.0"/> - <Addin id="Projects" version="0.17.0"/> - <Addin id="Projects.Gui" version="0.17.0"/> - <Addin id="Ide" version="0.17.0"/> - </Dependencies> - - <Extension path = "/MonoDevelop/Ide/FileFilters"> - <FileFilter id = "Java" - insertbefore = "AllFiles" - _label = "Java Files" - extensions = "*.java"/> - </Extension> - - <Extension path = "/MonoDevelop/Ide/FileTemplates"> - <FileTemplate id = "JavaApplet" resource = "JavaApplet.xft.xml"/> - <FileTemplate id = "JavaApplication" resource = "JavaApplication.xft.xml"/> - <FileTemplate id = "JavaDialog" resource = "JavaDialog.xft.xml"/> - <FileTemplate id = "JavaFrame" resource = "JavaFrame.xft.xml"/> - <FileTemplate id = "JavaOKDialog" resource = "JavaOKDialog.xft.xml"/> - <FileTemplate id = "JavaPanel" resource = "JavaPanel.xft.xml"/> - <FileTemplate id = "EmptyJavaFile" resource = "EmptyJavaFile.xft.xml"/> - </Extension> - - <Extension path = "/MonoDevelop/Ide/ProjectTemplates"> - <ProjectTemplate id = "EmptyJavaProject" resource = "EmptyJavaProject.xpt.xml"/> - <ProjectTemplate id = "IkvmConsoleApplicationProject" resource = "IkvmConsoleApplicationProject.xpt.xml"/> - <ProjectTemplate id = "IkvmGladeApplicationProject" resource = "IkvmGladeApplicationProject.xpt.xml"/> -<!-- <ProjectTemplate id = "IkvmGnomeApplicationProject" resource = "IkvmGnomeApplicationProject.xpt.xml"/> --> - <ProjectTemplate id = "IkvmGtkApplicationProject" resource = "IkvmGtkApplicationProject.xpt.xml"/> - <ProjectTemplate id = "JavaApplicationProject" resource = "JavaApplicationProject.xpt.xml"/> - <ProjectTemplate id = "JavaConsoleApplicationProject" resource = "JavaConsoleApplicationProject.xpt.xml"/> - <ProjectTemplate id = "IkvmLibraryProject" resource = "IkvmLibraryProject.xpt.xml"/> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/Gui/ProjectOptions/ConfigurationOptions"> - <Condition id="activelanguage" value = "Java"> - <DialogPanel id = "JavaProjectPanel" - _label = "Code Generation" - class = "JavaBinding.ProjectConfigurationPropertyPanel"/> - <DialogPanel id = "JavaOutputOptionsPanel" - _label = "Output" - class = "MonoDevelop.Projects.Gui.Dialogs.OptionPanels.OutputOptionsPanel"/> - </Condition> - </Extension> - - <Extension path = "/MonoDevelop/Ide/OptionsDialogPanels/Other"> - <DialogPanel _label = "Java" class = "JavaBinding.GlobalOptionsPanelPanel" /> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/Gui/Icons"> - <Icon language = "Java" icon = "res:Java.ProjectIcon"/> - <Icon extensions = ".java" icon = "res:Java.FileIcon"/> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/LanguageBindings"> - <LanguageBinding id = "Java" - supportedextensions = ".java" - class = "JavaBinding.JavaLanguageBinding" /> - </Extension> - - <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses"> - <DataType class = "JavaBinding.JavaCompilerParameters" /> - </Extension> - -</Addin> diff --git a/main/src/addins/JavaBinding/JavaBinding.mdp b/main/src/addins/JavaBinding/JavaBinding.mdp deleted file mode 100644 index b3eee62b9e..0000000000 --- a/main/src/addins/JavaBinding/JavaBinding.mdp +++ /dev/null @@ -1,73 +0,0 @@ -<Project name="JavaBinding" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject"> - <Configurations active="Debug"> - <Configuration name="Debug" ctype="DotNetProjectConfiguration"> - <Output directory="../../build/AddIns/BackendBindings/" assembly="JavaBinding" /> - <Build debugmode="True" target="Library" /> - <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> - <CodeGeneration compiler="Csc" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> - </Configuration> - <Configuration name="Release" ctype="DotNetProjectConfiguration"> - <Output directory="../../build/AddIns/BackendBindings/" assembly="JavaBinding" /> - <Build debugmode="False" target="Library" /> - <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> - <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> - </Configuration> - </Configurations> - <Contents> - <File name="templates/EmptyJavaFile.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/EmptyJavaProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/IkvmConsoleApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/IkvmGladeApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/IkvmGnomeApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/IkvmGtkApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/IkvmLibraryProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaApplet.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaApplication.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaConsoleApplicationProject.xpt.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaDialog.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaFrame.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaOKDialog.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="templates/JavaPanel.xft.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="icons/Java.FileIcon" subtype="Code" buildaction="EmbedAsResource" /> - <File name="Gui/ProjectConfigurationPropertyPanel.cs" subtype="Code" buildaction="Compile" /> - <File name="Gui/GlobalOptionsPanel.cs" subtype="Code" buildaction="Compile" /> - <File name="Project/JavaCompilerParameters.cs" subtype="Code" buildaction="Compile" /> - <File name="JavaCompiler.cs" subtype="Code" buildaction="Compile" /> - <File name="JavaLanguageBinding.cs" subtype="Code" buildaction="Compile" /> - <File name="JavaBinding.addin.xml" subtype="Code" buildaction="EmbedAsResource" /> - <File name="icons/java-icon-32.png" subtype="Code" buildaction="EmbedAsResource" /> - <File name="IKVMCompilerManager.cs" subtype="Code" buildaction="Compile" /> - <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" /> - <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> - <File name="gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs" subtype="Code" buildaction="Compile" /> - <File name="gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs" subtype="Code" buildaction="Compile" /> - </Contents> - <References> - <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Core" /> - <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Components" /> - <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Ide" /> - <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Core.Gui" /> - <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Projects" /> - <ProjectReference type="Gac" localcopy="False" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <ProjectReference type="Gac" localcopy="False" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> - </References> - <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" SyncReferences="True" IsAutotoolsProject="True" RelativeConfigureInPath="../../"> - <BuildFilesVar Sync="True" Name="FILES" /> - <DeployFilesVar /> - <ResourcesVar Sync="True" Name="RES" /> - <OthersVar /> - <GacRefVar Sync="True" Name="REFS" Prefix="-r:" /> - <AsmRefVar Sync="True" Name="REFS" Prefix="-r:" /> - <ProjectRefVar Sync="True" Name="REFS" Prefix="-r:" /> - </MonoDevelop.Autotools.MakefileInfo> - <GtkDesignInfo gtkVersion="2.8.3" /> -</Project>
\ No newline at end of file diff --git a/main/src/addins/JavaBinding/JavaCompiler.cs b/main/src/addins/JavaBinding/JavaCompiler.cs deleted file mode 100644 index 17245eb9c5..0000000000 --- a/main/src/addins/JavaBinding/JavaCompiler.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace JavaBinding -{ - public enum JavaCompiler - { - Javac, - Gcj, - } -} diff --git a/main/src/addins/JavaBinding/JavaLanguageBinding.cs b/main/src/addins/JavaBinding/JavaLanguageBinding.cs deleted file mode 100644 index 443b4e7fee..0000000000 --- a/main/src/addins/JavaBinding/JavaLanguageBinding.cs +++ /dev/null @@ -1,146 +0,0 @@ -// JavaLanguageBinding.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Mike Krüger <mkrueger@novell.com> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -using System; -using System.IO; -using System.Diagnostics; -using System.Collections; -using System.Reflection; -using System.Resources; -using System.Xml; -using System.CodeDom.Compiler; - -using MonoDevelop.Projects; -using MonoDevelop.Core.Gui; -using MonoDevelop.Core; -using MonoDevelop.Projects.Parser; -using MonoDevelop.Projects.CodeGeneration; - -namespace JavaBinding -{ - /// <summary> - /// This class describes the main functionalaty of a language binding - /// </summary> - public class JavaLanguageBinding : IDotNetLanguageBinding - { - internal const string LanguageName = "Java"; - static GlobalProperties props = new GlobalProperties (); - - public static GlobalProperties Properties { - get { return props; } - } - - public string Language { - get { - return LanguageName; - } - } - - public bool IsSourceCodeFile (string fileName) - { - return Path.GetExtension (fileName) == ".java"; - } - - public ICompilerResult Compile (ProjectFileCollection projectFiles, ProjectReferenceCollection references, DotNetProjectConfiguration configuration, IProgressMonitor monitor) - { - return IKVMCompilerManager.Compile (projectFiles, references, configuration, monitor); - } - - public void GenerateMakefile (Project project, Combine parentCombine) - { - // FIXME: dont abort for now - // throw new NotImplementedException (); - } - - public ICloneable CreateCompilationParameters (XmlElement projectOptions) - { - JavaCompilerParameters parameters = new JavaCompilerParameters (); - if (Properties.Classpath.Length > 0) - parameters.ClassPath = Properties.Classpath; - - parameters.Compiler = Properties.CompilerType; - parameters.CompilerPath = Properties.CompilerCommand; - - 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; - } - - // http://www.nbirn.net/Resources/Developers/Conventions/Commenting/Java_Comments.htm#CommentBlock - public string CommentTag - { - get { return "//"; } - } - - public CodeDomProvider GetCodeDomProvider () - { - return null; - } - - public string GetFileName (string baseName) - { - return baseName + ".java"; - } - - public IParser Parser { - get { return null; } - } - - public IRefactorer Refactorer { - get { return null; } - } - - public ClrVersion[] GetSupportedClrVersions () - { - return new ClrVersion[] { ClrVersion.Net_1_1 }; - } - } - - public class GlobalProperties - { - Properties props = (Properties) PropertyService.Get ("JavaBinding.GlobalProps", new Properties ()); - - public string IkvmPath { - get { return props.Get ("IkvmPath", ""); } - set { props.Set ("IkvmPath", value != null ? value : ""); } - } - - public string CompilerCommand { - get { return props.Get ("CompilerCommand", ""); } - set { props.Set ("CompilerCommand", value != null ? value : "javac"); } - } - - public JavaCompiler CompilerType { - get { return (JavaCompiler) props.Get ("CompilerType", 0); } - set { props.Set ("CompilerType", (int)value); } - } - - public string Classpath { - get { return props.Get ("Classpath", ""); } - set { props.Set ("Classpath", value != null ? value : ""); } - } - } -} diff --git a/main/src/addins/JavaBinding/Makefile.am b/main/src/addins/JavaBinding/Makefile.am deleted file mode 100644 index 44c6bc7900..0000000000 --- a/main/src/addins/JavaBinding/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ - -ADDIN_BUILD = $(top_builddir)/build/AddIns/BackendBindings -ASSEMBLY = $(ADDIN_BUILD)/JavaBinding.dll -REFS = \ - $(GLADE_SHARP_LIBS) \ - $(GNOME_SHARP_LIBS) \ - $(GTK_SHARP_LIBS) \ - -r:$(top_builddir)/build/bin/MonoDevelop.Components.dll \ - -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \ - -r:$(top_builddir)/build/bin/MonoDevelop.Core.Gui.dll \ - -r:$(top_builddir)/build/bin/MonoDevelop.Ide.dll \ - -r:$(top_builddir)/build/bin/MonoDevelop.Projects.dll \ - -r:Mono.Posix \ - -r:System \ - -r:System.Drawing \ - -r:System.Xml - -FILES = \ - gtk-gui/generated.cs \ - gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs \ - gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs \ - Gui/GlobalOptionsPanel.cs \ - Gui/ProjectConfigurationPropertyPanel.cs \ - IKVMCompilerManager.cs \ - JavaCompiler.cs \ - JavaLanguageBinding.cs \ - Project/JavaCompilerParameters.cs - -RES = \ - gtk-gui/gui.stetic \ - icons/Java.FileIcon \ - icons/java-icon-32.png \ - JavaBinding.addin.xml \ - templates/EmptyJavaFile.xft.xml \ - templates/EmptyJavaProject.xpt.xml \ - templates/IkvmConsoleApplicationProject.xpt.xml \ - templates/IkvmGladeApplicationProject.xpt.xml \ - templates/IkvmGnomeApplicationProject.xpt.xml \ - templates/IkvmGtkApplicationProject.xpt.xml \ - templates/IkvmLibraryProject.xpt.xml \ - templates/JavaApplet.xft.xml \ - templates/JavaApplication.xft.xml \ - templates/JavaApplicationProject.xpt.xml \ - templates/JavaConsoleApplicationProject.xpt.xml \ - templates/JavaDialog.xft.xml \ - templates/JavaFrame.xft.xml \ - templates/JavaOKDialog.xft.xml \ - templates/JavaPanel.xft.xml - -if ENABLE_JAVA -all: $(ASSEMBLY) -else -all: -endif - -$(ASSEMBLY): $(FILES) $(build_resources) - mkdir -p $(ADDIN_BUILD) - $(CSC) $(CSC_FLAGS) $(REFS) $(build_resources:%=/resource:%) $(build_sources) -out:$@ -target:library - -if ENABLE_JAVA -assemblydir = $(MD_ADDIN_DIR)/BackendBindings -assembly_DATA = $(ASSEMBLY) - -endif - -CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb -EXTRA_DIST = $(FILES) $(RES) - -include $(top_srcdir)/Makefile.include diff --git a/main/src/addins/JavaBinding/Parser/ExpressionFinder.cs b/main/src/addins/JavaBinding/Parser/ExpressionFinder.cs deleted file mode 100644 index e3a6e0b314..0000000000 --- a/main/src/addins/JavaBinding/Parser/ExpressionFinder.cs +++ /dev/null @@ -1,380 +0,0 @@ -using System; -using System.Text; -using MonoDevelop.Projects.Parser; - -namespace JavaBinding.Parser -{ - /// <summary> - /// Description of ExpressionFinder. - /// </summary> - public class ExpressionFinder : IExpressionFinder - { - public string FindExpression(string inText, int offset) - { - this.text = FilterComments(inText, ref offset); - this.text = text; - this.offset = this.lastAccept = offset; - this.state = START; - if (this.text == null) { - return null; - } - - while (state != ERROR) { - ReadNextToken(); - //Console.WriteLine("cur state {0} got token {1} going to {2}", GetStateName(state), GetTokenName(curTokenType), GetStateName(stateTable[state, curTokenType])); - state = stateTable[state, curTokenType]; - - if (state == ACCEPT || state == ACCEPT2) { - lastAccept = this.offset; - } - if (state == ACCEPTNOMORE) { - return this.text.Substring(this.offset + 1, offset - this.offset); - } - } - return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept); - } - - #region Comment Filter and 'inside string watcher' - int initialOffset; - public string FilterComments(string text, ref int offset) - { - this.initialOffset = offset; - StringBuilder outText = new StringBuilder(); - int curOffset = 0; - while (curOffset <= initialOffset) { - char ch = text[curOffset]; - - switch (ch) { - case '@': - if (curOffset + 1 < text.Length && text[curOffset + 1] == '"') { - outText.Append(text[curOffset++]); // @ - outText.Append(text[curOffset++]); // " - if (!ReadVerbatimString(outText, text, ref curOffset)) { - return null; - } - }else{ - outText.Append(ch); - ++curOffset; - } - break; - case '\'': - outText.Append(ch); - curOffset++; - // to read '" and '\" ... this should work for these cases - if (curOffset <= initialOffset) { - outText.Append(text[curOffset++]); - } - if (curOffset <= initialOffset) { - outText.Append(text[curOffset++]); - } - break; - case '"': - outText.Append(ch); - curOffset++; - if (!ReadString(outText, text, ref curOffset)) { - return null; - } - break; - case '/': - if (curOffset + 1 < text.Length && text[curOffset + 1] == '/') { - offset -= 2; - curOffset += 2; - if (!ReadToEOL(text, ref curOffset, ref offset)) { - return null; - } - } else if (curOffset + 1 < text.Length && text[curOffset + 1] == '*') { - offset -= 2; - curOffset += 2; - if (!ReadMultiLineComment(text, ref curOffset, ref offset)) { - return null; - } - } else { - goto default; - } - break; - default: - outText.Append(ch); - ++curOffset; - break; - } - } - - return outText.ToString(); - } - - bool ReadToEOL(string text, ref int curOffset, ref int offset) - { - while (curOffset <= initialOffset) { - char ch = text[curOffset++]; - --offset; - if (ch == '\n') { - return true; - } - } - return false; - } - - bool ReadString(StringBuilder outText, string text, ref int curOffset) - { - while (curOffset <= initialOffset) { - char ch = text[curOffset++]; - outText.Append(ch); - if (ch == '"') { - return true; - } else if (ch == '\\') { - outText.Append(text[curOffset++]); - } - } - return false; - } - - bool ReadVerbatimString(StringBuilder outText, string text, ref int curOffset) - { - while (curOffset <= initialOffset) { - char ch = text[curOffset++]; - outText.Append(ch); - if (ch == '"') { - if (curOffset < text.Length && text[curOffset] == '"') { - outText.Append(text[curOffset++]); - } else { - return true; - } - } - } - return false; - } - - bool ReadMultiLineComment(string text, ref int curOffset, ref int offset) - { - while (curOffset <= initialOffset) { - char ch = text[curOffset++]; - --offset; - if (ch == '*') { - if (curOffset < text.Length && text[curOffset] == '/') { - ++curOffset; - --offset; - return true; - } - } - } - return false; - } - #endregion - - #region mini backward lexer - string text; - int offset; - - char GetNext() - { - if (offset >= 0) { - return text[offset--]; - } - return '\0'; - } - - char Peek() - { - if (offset >= 0) { - return text[offset]; - } - return '\0'; - } - - void UnGet() - { - ++offset; - } - - // tokens for our lexer - static int Err = 0; - static int Dot = 1; - static int StrLit = 2; - static int Ident = 3; - static int New = 4; - static int Bracket = 5; - static int Parent = 6; - static int Curly = 7; - static int Using = 8; - int curTokenType; - - string GetTokenName(int state) - { - string[] stateName = new string[] { - "Err", "Dot", "StrLit", "Ident", "New", "Bracket", "Paren", "Curly", "Using" - }; - return stateName[state]; - } - - void ReadNextToken() - { - char ch = GetNext(); - - curTokenType = Err; - if (ch == '\0') { - return; - } - while (Char.IsWhiteSpace(ch)) { - ch = GetNext(); - } - - switch (ch) { - case '}': - if (ReadBracket('{', '}')) { - curTokenType = Curly; - } - break; - case ')': - if (ReadBracket('(', ')')) { - curTokenType = Parent; - } - break; - case ']': - if (ReadBracket('[', ']')) { - curTokenType = Bracket; - } - break; - case '.': - curTokenType = Dot; - break; - case '\'': - case '"': - if (ReadStringLiteral(ch)) { - curTokenType = StrLit; - } - break; - default: - string ident = ReadIdentifier(ch); - if (ident != null) { - switch (ident) { - case "new": - curTokenType = New; - break; - case "using": - curTokenType = Using; - break; - default: - curTokenType = Ident; - break; - } - } - break; - } - } - - bool ReadStringLiteral(char litStart) - { - while (true) { - char ch = GetNext(); - if (ch == '\0') { - return false; - } - if (ch == litStart) { - if (Peek() == '@' && litStart == '"') { - GetNext(); - } - return true; - } - } - } - - bool ReadBracket(char openBracket, char closingBracket) - { - int curlyBraceLevel = 0; - int squareBracketLevel = 0; - int parenthesisLevel = 0; - switch (openBracket) { - case '(': - parenthesisLevel++; - break; - case '[': - squareBracketLevel++; - break; - case '{': - curlyBraceLevel++; - break; - } - - while (parenthesisLevel != 0 || squareBracketLevel != 0 || curlyBraceLevel != 0) { - char ch = GetNext(); - if (ch == '\0') { - return false; - } - switch (ch) { - case '(': - parenthesisLevel--; - break; - case '[': - squareBracketLevel--; - break; - case '{': - curlyBraceLevel--; - break; - case ')': - parenthesisLevel++; - break; - case ']': - squareBracketLevel++; - break; - case '}': - curlyBraceLevel++; - break; - } - } - return true; - } - - string ReadIdentifier(char ch) - { - string identifier = ch.ToString(); - while (IsIdentifierPart(Peek())) { - identifier = GetNext() + identifier; - } - return identifier; - } - - bool IsIdentifierPart(char ch) - { - return Char.IsLetterOrDigit(ch) || ch == '_'; - } - #endregion - - #region finite state machine - static int ERROR = 0; - static int START = 1; - static int DOT = 2; - static int MORE = 3; - static int CURLY = 4; - static int CURLY2 = 5; - static int CURLY3 = 6; - - static int ACCEPT = 7; - static int ACCEPTNOMORE = 8; - static int ACCEPT2 = 9; - - string GetStateName(int state) - { - string[] stateName = new string[] { - "ERROR", "START", "DOT", "MORE", "CURLY", "CURLY2", "CURLY3", "ACCEPT", "ACCEPTNOMORE", "ACCEPT2" - }; - return stateName[state]; - } - - int state = 0; - int lastAccept = 0; - static int[,] stateTable = new int[,] { - // Err, Dot, Str, ID, New, Brk, Par, Cur, Using - /*ERROR*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR}, - /*START*/ { ERROR, DOT, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ACCEPTNOMORE}, - /*DOT*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT, CURLY, ERROR}, - /*MORE*/ { ERROR, ERROR, ACCEPT, ACCEPT, ERROR, MORE, ACCEPT2, CURLY, ERROR}, - /*CURLY*/ { ERROR, ERROR, ERROR, ERROR, ERROR, CURLY2, ERROR, ERROR, ERROR}, - /*CURLY2*/ { ERROR, ERROR, ERROR, CURLY3, ERROR, ERROR, ERROR, ERROR, ERROR}, - /*CURLY3*/ { ERROR, ERROR, ERROR, ERROR, ACCEPTNOMORE, ERROR, ERROR, ERROR, ERROR}, - /*ACCEPT*/ { ERROR, MORE, ERROR, ERROR, ACCEPT, ERROR, ERROR, ERROR, ACCEPTNOMORE}, - /*ACCEPTNOMORE*/ { ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR, ERROR}, - /*ACCEPT2*/ { ERROR, MORE, ERROR, ACCEPT, ACCEPT, ERROR, ERROR, ERROR, ERROR}, - }; - #endregion - } -} diff --git a/main/src/addins/JavaBinding/Parser/JavaVisitor.cs b/main/src/addins/JavaBinding/Parser/JavaVisitor.cs deleted file mode 100644 index d2e18663a6..0000000000 --- a/main/src/addins/JavaBinding/Parser/JavaVisitor.cs +++ /dev/null @@ -1,252 +0,0 @@ -// created on 04.08.2003 at 17:49 -using System; -using System.Drawing; -using System.Diagnostics; -using System.Collections; - -using RefParser = JRefactory.Parser; -using AST = JRefactory.Parser.AST; -using MonoDevelop.Projects.Parser; -using JavaBinding.Parser.SharpDevelopTree; - -namespace JavaBinding.Parser -{ - public class Using : AbstractUsing - { - } - - public class JavaVisitor : RefParser.AbstractASTVisitor - { - CompilationUnit cu = new CompilationUnit(); - Stack currentNamespace = new Stack(); - Stack currentClass = new Stack(); - - public CompilationUnit Cu { - get { - return cu; - } - } - - public override object Visit(AST.CompilationUnit compilationUnit, object data) - { - //TODO: usings, Comments - compilationUnit.AcceptChildren(this, data); - return cu; - } - - public override object Visit(AST.UsingDeclaration usingDeclaration, object data) - { - Using u = new Using(); - u.Usings.Add(usingDeclaration.Namespace); - cu.Usings.Add(u); - return data; - } - - public override object Visit(AST.UsingAliasDeclaration usingAliasDeclaration, object data) - { - Using u = new Using(); - u.Aliases[usingAliasDeclaration.Alias] = usingAliasDeclaration.Namespace; - cu.Usings.Add(u); - return data; - } - - AttributeSectionCollection VisitAttributes(ArrayList attributes) - { - // TODO Expressions??? - AttributeSectionCollection result = new AttributeSectionCollection(); - foreach (AST.AttributeSection section in attributes) { - AttributeCollection resultAttributes = new AttributeCollection(); - foreach (AST.Attribute attribute in section.Attributes) { - IAttribute a = new ASTAttribute(attribute.Name, new ArrayList(attribute.PositionalArguments), new SortedList()); - foreach (AST.NamedArgument n in attribute.NamedArguments) { - a.NamedArguments[n.Name] = n.Expr; - } - } - IAttributeSection s = new AttributeSection((AttributeTarget)Enum.Parse(typeof (AttributeTarget), section.AttributeTarget), resultAttributes); - } - return null; - } - -// ModifierEnum VisitModifier(JRefactory.Parser.Modifier m) -// { -// return (ModifierEnum)m; -// } - - public override object Visit(AST.NamespaceDeclaration namespaceDeclaration, object data) - { - string name; - if (currentNamespace.Count == 0) { - name = namespaceDeclaration.NameSpace; - } else { - name = String.Concat((string)currentNamespace.Peek(), '.', namespaceDeclaration.NameSpace); - } - currentNamespace.Push(name); - object ret = namespaceDeclaration.AcceptChildren(this, data); - currentNamespace.Pop(); - return ret; - } - - ClassType TranslateClassType(RefParser.Types type) - { - switch (type) { - case RefParser.Types.Class: - return ClassType.Class; - case RefParser.Types.Enum: - return ClassType.Enum; - case RefParser.Types.Interface: - return ClassType.Interface; - case RefParser.Types.Struct: - return ClassType.Struct; - } - return ClassType.Class; - } - - public override object Visit(AST.TypeDeclaration typeDeclaration, object data) - { - DefaultRegion region = GetRegion(typeDeclaration.StartLocation, typeDeclaration.EndLocation); - Class c = new Class(cu, TranslateClassType(typeDeclaration.Type), typeDeclaration.Modifier, region); - if (currentClass.Count > 0) { - Class cur = ((Class)currentClass.Peek()); - cur.InnerClasses.Add(c); - c.FullyQualifiedName = String.Concat(cur.FullyQualifiedName, '.', typeDeclaration.Name); - } else { - if (currentNamespace.Count == 0) { - c.FullyQualifiedName = typeDeclaration.Name; - } else { - c.FullyQualifiedName = String.Concat(currentNamespace.Peek(), '.', typeDeclaration.Name); - } - cu.Classes.Add(c); - } - if (typeDeclaration.BaseTypes != null) { - foreach (string type in typeDeclaration.BaseTypes) { - c.BaseTypes.Add(type); - } - } - currentClass.Push(c); - object ret = typeDeclaration.AcceptChildren(this, data); - currentClass.Pop(); - c.UpdateModifier(); - return ret; - } - - DefaultRegion GetRegion(Point start, Point end) - { - return new DefaultRegion(start.Y, start.X, end.Y, end.X); - } - - public override object Visit(AST.MethodDeclaration methodDeclaration, object data) - { - DefaultRegion region = GetRegion(methodDeclaration.StartLocation, methodDeclaration.EndLocation); - DefaultRegion bodyRegion = GetRegion(methodDeclaration.EndLocation, methodDeclaration.Body != null ? methodDeclaration.Body.EndLocation : new Point(-1, -1)); -// Console.WriteLine(region + " --- " + bodyRegion); - ReturnType type = new ReturnType(methodDeclaration.TypeReference); - Class c = (Class)currentClass.Peek(); - - Method method = new Method(String.Concat(methodDeclaration.Name), type, methodDeclaration.Modifier, region, bodyRegion); - ParameterCollection parameters = new ParameterCollection(); - if (methodDeclaration.Parameters != null) { - foreach (AST.ParameterDeclarationExpression par in methodDeclaration.Parameters) { - ReturnType parType = new ReturnType(par.TypeReference); - Parameter p = new Parameter(par.ParameterName, parType); - parameters.Add(p); - } - } - method.Parameters = parameters; - c.Methods.Add(method); - return null; - } - - public override object Visit(AST.ConstructorDeclaration constructorDeclaration, object data) - { - DefaultRegion region = GetRegion(constructorDeclaration.StartLocation, constructorDeclaration.EndLocation); - DefaultRegion bodyRegion = GetRegion(constructorDeclaration.EndLocation, constructorDeclaration.Body != null ? constructorDeclaration.Body.EndLocation : new Point(-1, -1)); - - Class c = (Class)currentClass.Peek(); - - Constructor constructor = new Constructor(constructorDeclaration.Modifier, region, bodyRegion); - ParameterCollection parameters = new ParameterCollection(); - if (constructorDeclaration.Parameters != null) { - foreach (AST.ParameterDeclarationExpression par in constructorDeclaration.Parameters) { - ReturnType parType = new ReturnType(par.TypeReference); - Parameter p = new Parameter(par.ParameterName, parType); - parameters.Add(p); - } - } - constructor.Parameters = parameters; - c.Methods.Add(constructor); - return null; - } - - - public override object Visit(AST.FieldDeclaration fieldDeclaration, object data) - { - DefaultRegion region = GetRegion(fieldDeclaration.StartLocation, fieldDeclaration.EndLocation); - Class c = (Class)currentClass.Peek(); - ReturnType type = null; - if (fieldDeclaration.TypeReference == null) { - Debug.Assert(c.ClassType == ClassType.Enum); - } else { - type = new ReturnType(fieldDeclaration.TypeReference); - } - if (currentClass.Count > 0) { - foreach (AST.VariableDeclaration field in fieldDeclaration.Fields) { - Field f = new Field(type, field.Name, fieldDeclaration.Modifier, region); - - c.Fields.Add(f); - } - } - return null; - } - - public override object Visit(AST.PropertyDeclaration propertyDeclaration, object data) - { - DefaultRegion region = GetRegion(propertyDeclaration.StartLocation, propertyDeclaration.EndLocation); - DefaultRegion bodyRegion = GetRegion(propertyDeclaration.BodyStart, propertyDeclaration.BodyEnd); - - ReturnType type = new ReturnType(propertyDeclaration.TypeReference); - Class c = (Class)currentClass.Peek(); - - Property property = new Property(propertyDeclaration.Name, type, propertyDeclaration.Modifier, region, bodyRegion); - c.Properties.Add(property); - return null; - } - - public override object Visit(AST.EventDeclaration eventDeclaration, object data) - { - DefaultRegion region = GetRegion(eventDeclaration.StartLocation, eventDeclaration.EndLocation); - DefaultRegion bodyRegion = GetRegion(eventDeclaration.BodyStart, eventDeclaration.BodyEnd); - ReturnType type = new ReturnType(eventDeclaration.TypeReference); - Class c = (Class)currentClass.Peek(); - Event e = null; - - if (eventDeclaration.VariableDeclarators != null) { - foreach (JRefactory.Parser.AST.VariableDeclaration varDecl in eventDeclaration.VariableDeclarators) { - e = new Event(varDecl.Name, type, eventDeclaration.Modifier, region, bodyRegion); - c.Events.Add(e); - } - } else { - e = new Event(eventDeclaration.Name, type, eventDeclaration.Modifier, region, bodyRegion); - c.Events.Add(e); - } - return null; - } - - public override object Visit(AST.IndexerDeclaration indexerDeclaration, object data) - { - DefaultRegion region = GetRegion(indexerDeclaration.StartLocation, indexerDeclaration.EndLocation); - DefaultRegion bodyRegion = GetRegion(indexerDeclaration.BodyStart, indexerDeclaration.BodyEnd); - ParameterCollection parameters = new ParameterCollection(); - Indexer i = new Indexer(new ReturnType(indexerDeclaration.TypeReference), parameters, indexerDeclaration.Modifier, region, bodyRegion); - if (indexerDeclaration.Parameters != null) { - foreach (AST.ParameterDeclarationExpression par in indexerDeclaration.Parameters) { - ReturnType parType = new ReturnType(par.TypeReference); - Parameter p = new Parameter(par.ParameterName, parType); - parameters.Add(p); - } - } - Class c = (Class)currentClass.Peek(); - c.Indexer.Add(i); - return null; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/Parser.cs b/main/src/addins/JavaBinding/Parser/Parser.cs deleted file mode 100644 index 707f54b20e..0000000000 --- a/main/src/addins/JavaBinding/Parser/Parser.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Parser.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Andrea Paatz <andrea@icsharpcode.net> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -using System; -using System.Drawing; -using System.Collections; -using MonoDevelop.Core; -using MonoDevelop.Projects.Parser; -using JavaBinding.Parser.SharpDevelopTree; -using JRefactory.Parser; - -namespace JavaBinding.Parser -{ - public class TParser : IParser - { - ///<summary>IParser Interface</summary> - string[] lexerTags; - public string[] LexerTags { - set { - lexerTags = value; - } - } - public IExpressionFinder ExpressionFinder { - get { - return new ExpressionFinder(); - } - } - - void RetrieveRegions(CompilationUnit cu, SpecialTracker tracker) - { - for (int i = 0; i < tracker.CurrentSpecials.Count; ++i) { - PreProcessingDirective directive = tracker.CurrentSpecials[i] as PreProcessingDirective; - if (directive != null) { - if (directive.Cmd == "#region") { - int deep = 1; - for (int j = i + 1; j < tracker.CurrentSpecials.Count; ++j) { - PreProcessingDirective nextDirective = tracker.CurrentSpecials[j] as PreProcessingDirective; - if (nextDirective != null) { - switch (nextDirective.Cmd) { - case "#region": - ++deep; - break; - case "#endregion": - --deep; - if (deep == 0) { - cu.FoldingRegions.Add(new FoldingRegion(directive.Arg.Trim(), new DefaultRegion(directive.Start, new Point(nextDirective.End.X - 2, nextDirective.End.Y)))); - goto end; - } - break; - } - } - } - end: ; - } - } - } - } - - public ICompilationUnitBase Parse(string fileName) - { - Console.WriteLine ("*****"); - JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); - - Lexer lexer = new Lexer(new FileReader(fileName)); - p.Parse(lexer); - - JavaVisitor visitor = new JavaVisitor (); - visitor.Visit(p.compilationUnit, null); - visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; - RetrieveRegions(visitor.Cu, lexer.SpecialTracker); - return visitor.Cu; - } - - public ICompilationUnitBase Parse(string fileName, string fileContent) - { - JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); - - Lexer lexer = new Lexer(new StringReader(fileContent)); - p.Parse(lexer); - - JavaVisitor visitor = new JavaVisitor (); - visitor.Visit(p.compilationUnit, null); - visitor.Cu.ErrorsDuringCompile = p.Errors.count > 0; - visitor.Cu.Tag = p.compilationUnit; - RetrieveRegions(visitor.Cu, lexer.SpecialTracker); - return visitor.Cu; - } - - public LanguageItemCollection CtrlSpace(IParserContext parserService, int caretLine, int caretColumn, string fileName) - { - return new Resolver().CtrlSpace(parserService, caretLine, caretColumn, fileName); - } - - public ResolveResult Resolve(IParserContext parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent) - { - return new Resolver().Resolve(parserService, expression, caretLineNumber, caretColumn, fileName, fileContent); - } - - - public bool HandlesFileExtension(string fileExtension){ - if(fileExtension == null) return false; - return (fileExtension.ToLower() == ".java"); - } - - - ///////// IParser Interface END - } -} diff --git a/main/src/addins/JavaBinding/Parser/Resolver.cs b/main/src/addins/JavaBinding/Parser/Resolver.cs deleted file mode 100644 index cc4ddf424a..0000000000 --- a/main/src/addins/JavaBinding/Parser/Resolver.cs +++ /dev/null @@ -1,858 +0,0 @@ -// Resolver.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Andrea Paatz <andrea@icsharpcode.net> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -using System; -using System.Collections; -using System.Drawing; - -using MonoDevelop.Core; -using MonoDevelop.Projects.Parser; -using JavaBinding.Parser.SharpDevelopTree; -using JRefactory.Parser.AST; -using JRefactory.Parser; - -namespace JavaBinding.Parser -{ - public class Resolver - { - IParserContext parserService; - ICompilationUnit cu; - IClass callingClass; - LookupTableVisitor lookupTableVisitor; - - public IParserContext ParserService { - get { - return parserService; - } - } - - public ICompilationUnit CompilationUnit { - get { - return cu; - } - } - - public IClass CallingClass { - get { - return callingClass; - } - } - - bool showStatic = false; - - public bool ShowStatic { - get { - return showStatic; - } - - set { - showStatic = value; - } - } - - int caretLine; - int caretColumn; - - public ResolveResult Resolve(IParserContext parserService, string expression, int caretLineNumber, int caretColumn, string fileName, string fileContent) - { - Console.WriteLine("Start Resolving"); - if (expression == null) { - return null; - } - expression = expression.TrimStart(null); - if (expression == "") { - return null; - } - if (expression.StartsWith("using ")) { - // expression[expression.Length - 1] != '.' - // the period that causes this Resove() is not part of the expression - if (expression[expression.Length - 1] == '.') { - return null; - } - int i; - for (i = expression.Length - 1; i >= 0; --i) { - if (!(Char.IsLetterOrDigit(expression[i]) || expression[i] == '_' || expression[i] == '.')) { - break; - } - } - // no Identifier before the period - if (i == expression.Length - 1) { - return null; - } - string t = expression.Substring(i + 1); -// Console.WriteLine("in Using Statement"); - string[] namespaces = parserService.GetNamespaceList(t); - if (namespaces == null || namespaces.Length <= 0) { - return null; - } - return new ResolveResult(namespaces); - } - - Console.WriteLine("Not in Using"); - this.caretLine = caretLineNumber; - this.caretColumn = caretColumn; - - this.parserService = parserService; - IParseInformation parseInfo = parserService.GetParseInformation(fileName); - JRefactory.Parser.AST.CompilationUnit fileCompilationUnit = parseInfo.MostRecentCompilationUnit.Tag as JRefactory.Parser.AST.CompilationUnit; - if (fileCompilationUnit == null) { -// JRefactory.Parser.Parser fileParser = new JRefactory.Parser.Parser(); -// fileParser.Parse(new Lexer(new StringReader(fileContent))); - Console.WriteLine("!Warning: no parseinformation!"); - return null; - } - /* - //// try to find last expression in original string, it could be like " if (act!=null) act" - //// in this case only "act" should be parsed as expression - !!is so!! don't change things that work - Expression expr=null; // tentative expression - Lexer l=null; - JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); - while (expression.Length > 0) { - l = new Lexer(new StringReader(expression)); - expr = p.ParseExpression(l); - if (l.LookAhead.val != "" && expression.LastIndexOf(l.LookAhead.val) >= 0) { - if (expression.Substring(expression.LastIndexOf(l.LookAhead.val) + l.LookAhead.val.Length).Length > 0) - expression=expression.Substring(expression.LastIndexOf(l.LookAhead.val) + l.LookAhead.val.Length).Trim(); - else { - expression=l.LookAhead.val.Trim(); - l=new Lexer(new StringReader(expression)); - expr=p.ParseExpression(l); - break; - } - } else { - if (l.Token.val!="" || expr!=null) break; - } - } - //// here last subexpression should be fixed in expr - if it should be changed in expressionfinder don't fix it here - */ - JRefactory.Parser.Parser p = new JRefactory.Parser.Parser(); - Lexer l = new Lexer(new StringReader(expression)); - Expression expr = p.ParseExpression(l); - if (expr == null) { - return null; - } - lookupTableVisitor = new LookupTableVisitor(); - lookupTableVisitor.Visit(fileCompilationUnit, null); - - TypeVisitor typeVisitor = new TypeVisitor(this); - - JavaVisitor cSharpVisitor = new JavaVisitor(); - cu = (ICompilationUnit)cSharpVisitor.Visit(fileCompilationUnit, null); - if (cu != null) { - callingClass = GetInnermostClass(); - //Console.WriteLine("CallingClass is " + callingClass == null ? "null" : callingClass.Name); - } - //Console.WriteLine("expression = " + expr.ToString()); - IReturnType type = expr.AcceptVisitor(typeVisitor, null) as IReturnType; - //Console.WriteLine("type visited"); - if (type == null || type.PointerNestingLevel != 0) { -// Console.WriteLine("Type == null || type.PointerNestingLevel != 0"); - if (type != null) { - //Console.WriteLine("PointerNestingLevel is " + type.PointerNestingLevel); - } else { - //Console.WriteLine("Type == null"); - } - //// when type is null might be file needs to be reparsed - some vars were lost - fileCompilationUnit=parserService.ParseFile(fileName, fileContent).MostRecentCompilationUnit.Tag - as JRefactory.Parser.AST.CompilationUnit; - lookupTableVisitor.Visit(fileCompilationUnit,null); - cu = (ICompilationUnit)cSharpVisitor.Visit(fileCompilationUnit, null); - if (cu != null) { - callingClass = GetInnermostClass(); - } - type=expr.AcceptVisitor(typeVisitor,null) as IReturnType; - if (type==null) return null; - } - if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) { - type = new ReturnType("System.Array"); - } - Console.WriteLine("Here: Type is " + type.FullyQualifiedName); - IClass returnClass = SearchType(type.FullyQualifiedName, cu); - if (returnClass == null) { - // Try if type is Namespace: - string n = SearchNamespace(type.FullyQualifiedName, cu); - if (n == null) { - return null; - } - ArrayList content = parserService.GetNamespaceContents(n); - ArrayList classes = new ArrayList(); - for (int i = 0; i < content.Count; ++i) { - if (content[i] is IClass) { - classes.Add((IClass)content[i]); - } - } - string[] namespaces = parserService.GetNamespaceList(n); - return new ResolveResult(namespaces, classes); - } - Console.WriteLine("Returning Result!"); - return new ResolveResult(returnClass, ListMembers(new ArrayList(), returnClass)); - } - - ArrayList ListMembers(ArrayList members, IClass curType) - { -// Console.WriteLine("LIST MEMBERS!!!"); -// Console.WriteLine("showStatic = " + showStatic); -// Console.WriteLine(curType.InnerClasses.Count + " classes"); -// Console.WriteLine(curType.Properties.Count + " properties"); -// Console.WriteLine(curType.Methods.Count + " methods"); -// Console.WriteLine(curType.Events.Count + " events"); -// Console.WriteLine(curType.Fields.Count + " fields"); - if (showStatic) { - foreach (IClass c in curType.InnerClasses) { - if (IsAccessible(curType, c)) { - members.Add(c); -// Console.WriteLine("Member added"); - } - } - } - foreach (IProperty p in curType.Properties) { - if (MustBeShowen(curType, p)) { - members.Add(p); -// Console.WriteLine("Member added"); - } else { - //// for some public static properties msutbeshowen is false, so additional check - //// this is lame fix because curType doesn't allow to find out if to show only - //// static public or simply public properties - if (((AbstractMember)p).ReturnType!=null) { - // if public add it to completion window - if (((AbstractDecoration)p).IsPublic) members.Add(p); -// Console.WriteLine("Property {0} added", p.FullyQualifiedName); - } - } - } -// Console.WriteLine("ADDING METHODS!!!"); - foreach (IMethod m in curType.Methods) { -// Console.WriteLine("Method : " + m); - if (MustBeShowen(curType, m)) { - members.Add(m); -// Console.WriteLine("Member added"); - } - } - foreach (IEvent e in curType.Events) { - if (MustBeShowen(curType, e)) { - members.Add(e); -// Console.WriteLine("Member added"); - } - } - foreach (IField f in curType.Fields) { - if (MustBeShowen(curType, f)) { - members.Add(f); -// Console.WriteLine("Member added"); - } else { - //// enum fields must be shown here if present - if (curType.ClassType == ClassType.Enum) { - if (IsAccessible(curType,f)) members.Add(f); -// Console.WriteLine("Member {0} added", f.FullyQualifiedName); - } - } - } -// Console.WriteLine("ClassType = " + curType.ClassType); - if (curType.ClassType == ClassType.Interface && !showStatic) { - foreach (string s in curType.BaseTypes) { - IClass baseClass = SearchType(s, curType.CompilationUnit); - if (baseClass != null && baseClass.ClassType == ClassType.Interface) { - ListMembers(members, baseClass); - } - } - } else { - IClass baseClass = BaseClass(curType); - if (baseClass != null) { -// Console.WriteLine("Base Class = " + baseClass.FullyQualifiedName); - ListMembers(members, baseClass); - } - } -// Console.WriteLine("listing finished"); - return members; - } - - public IClass BaseClass(IClass curClass) - { - foreach (string s in curClass.BaseTypes) { - IClass baseClass = SearchType(s, curClass.CompilationUnit); - if (baseClass != null && baseClass.ClassType != ClassType.Interface) { - return baseClass; - } - } - return null; - } - - bool InStatic() - { - IProperty property = GetProperty(); - if (property != null) { - return property.IsStatic; - } - IMethod method = GetMethod(); - if (method != null) { - return method.IsStatic; - } - return false; - } - - bool IsAccessible(IClass c, IDecoration member) - { -// Console.WriteLine("member.Modifiers = " + member.Modifiers); - if ((member.Modifiers & ModifierEnum.Internal) == ModifierEnum.Internal) { - return false; - } - if ((member.Modifiers & ModifierEnum.Public) == ModifierEnum.Public) { -// Console.WriteLine("IsAccessible"); - return true; - } - if ((member.Modifiers & ModifierEnum.Protected) == ModifierEnum.Protected && IsClassInInheritanceTree(c, callingClass)) { -// Console.WriteLine("IsAccessible"); - return true; - } - return c.FullyQualifiedName == callingClass.FullyQualifiedName; - } - - bool MustBeShowen(IClass c, IDecoration member) - { -// Console.WriteLine("member:" + member.Modifiers); - if ((!showStatic && ((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static)) || - ( showStatic && !((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static))) { - //// enum type fields are not shown here - there is no info in member about enum field - return false; - } -// Console.WriteLine("Testing Accessibility"); - return IsAccessible(c, member); - } - - public ArrayList SearchMethod(IReturnType type, string memberName) - { - if (type == null || type.PointerNestingLevel != 0) { - return new ArrayList(); - } - IClass curType; - if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) { - curType = SearchType("System.Array", null); - } else { - curType = SearchType(type.FullyQualifiedName, null); - if (curType == null) { - return new ArrayList(); - } - } - return SearchMethod(new ArrayList(), curType, memberName); - } - - ArrayList SearchMethod(ArrayList methods, IClass curType, string memberName) - { - foreach (IMethod m in curType.Methods) { - if (m.Name == memberName && - MustBeShowen(curType, m) && - !((m.Modifiers & ModifierEnum.Override) == ModifierEnum.Override)) { - methods.Add(m); - } - } - IClass baseClass = BaseClass(curType); - if (baseClass != null) { - return SearchMethod(methods, baseClass, memberName); - } - showStatic = false; - return methods; - } - - public ArrayList SearchIndexer(IReturnType type) - { - IClass curType = SearchType(type.FullyQualifiedName, null); - if (curType != null) { - return SearchIndexer(new ArrayList(), curType); - } - return new ArrayList(); - } - - public ArrayList SearchIndexer(ArrayList indexer, IClass curType) - { - foreach (IIndexer i in curType.Indexer) { - if (MustBeShowen(curType, i) && !((i.Modifiers & ModifierEnum.Override) == ModifierEnum.Override)) { - indexer.Add(i); - } - } - IClass baseClass = BaseClass(curType); - if (baseClass != null) { - return SearchIndexer(indexer, baseClass); - } - showStatic = false; - return indexer; - } - - // no methods or indexer - public IReturnType SearchMember(IReturnType type, string memberName) - { - if (type == null || memberName == null || memberName == "") { - return null; - } -// Console.WriteLine("searching member {0} in {1}", memberName, type.Name); - IClass curType = SearchType(type.FullyQualifiedName, cu); - if (curType == null) { -// Console.WriteLine("Type not found in SearchMember"); - return null; - } - if (type.PointerNestingLevel != 0) { - return null; - } - if (type.ArrayDimensions != null && type.ArrayDimensions.Length > 0) { - curType = SearchType("System.Array", null); - } - if (curType.ClassType == ClassType.Enum) { - foreach (IField f in curType.Fields) { - if (f.Name == memberName && MustBeShowen(curType, f)) { - showStatic = false; - return type; // enum members have the type of the enum - } - } - } - if (showStatic) { -// Console.WriteLine("showStatic == true"); - foreach (IClass c in curType.InnerClasses) { - if (c.Name == memberName && IsAccessible(curType, c)) { - return new ReturnType(c.FullyQualifiedName); - } - } - } -// Console.WriteLine("#Properties " + curType.Properties.Count); - foreach (IProperty p in curType.Properties) { -// Console.WriteLine("checke Property " + p.Name); -// Console.WriteLine("member name " + memberName); - if (p.Name == memberName && MustBeShowen(curType, p)) { -// Console.WriteLine("Property found " + p.Name); - showStatic = false; - return p.ReturnType; - } - } - foreach (IField f in curType.Fields) { -// Console.WriteLine("checke Feld " + f.Name); -// Console.WriteLine("member name " + memberName); - if (f.Name == memberName && MustBeShowen(curType, f)) { -// Console.WriteLine("Field found " + f.Name); - showStatic = false; - return f.ReturnType; - } - } - foreach (IEvent e in curType.Events) { - if (e.Name == memberName && MustBeShowen(curType, e)) { - showStatic = false; - return e.ReturnType; - } - } - foreach (string baseType in curType.BaseTypes) { - IClass c = SearchType(baseType, curType.CompilationUnit); - if (c != null) { - IReturnType erg = SearchMember(new ReturnType(c.FullyQualifiedName), memberName); - if (erg != null) { - return erg; - } - } - } - return null; - } - - bool IsInside(Point between, Point start, Point end) - { - if (between.Y < start.Y || between.Y > end.Y) { -// Console.WriteLine("Y = {0} not between {1} and {2}", between.Y, start.Y, end.Y); - return false; - } - if (between.Y > start.Y) { - if (between.Y < end.Y) { - return true; - } - // between.Y == end.Y -// Console.WriteLine("between.Y = {0} == end.Y = {1}", between.Y, end.Y); -// Console.WriteLine("returning {0}:, between.X = {1} <= end.X = {2}", between.X <= end.X, between.X, end.X); - return between.X <= end.X; - } - // between.Y == start.Y -// Console.WriteLine("between.Y = {0} == start.Y = {1}", between.Y, start.Y); - if (between.X < start.X) { - return false; - } - // start is OK and between.Y <= end.Y - return between.Y < end.Y || between.X <= end.X; - } - - ReturnType SearchVariable(string name) - { -// Console.WriteLine("Searching Variable"); -// -// Console.WriteLine("LookUpTable has {0} entries", lookupTableVisitor.variables.Count); -// Console.WriteLine("Listing Variables:"); - IDictionaryEnumerator enumerator = lookupTableVisitor.variables.GetEnumerator(); - while (enumerator.MoveNext()) { - Console.WriteLine(enumerator.Key); - } -// Console.WriteLine("end listing"); - ArrayList variables = (ArrayList)lookupTableVisitor.variables[name]; - if (variables == null || variables.Count <= 0) { -// Console.WriteLine(name + " not in LookUpTable"); - return null; - } - - ReturnType found = null; - foreach (LocalLookupVariable v in variables) { -// Console.WriteLine("Position: ({0}/{1})", v.StartPos, v.EndPos); - if (IsInside(new Point(caretColumn, caretLine), v.StartPos, v.EndPos)) { - found = new ReturnType(v.TypeRef); -// Console.WriteLine("Variable found"); - break; - } - } - if (found == null) { -// Console.WriteLine("No Variable found"); - return null; - } - return found; - } - - /// <remarks> - /// does the dynamic lookup for the typeName - /// </remarks> - public IReturnType DynamicLookup(string typeName) - { -// Console.WriteLine("starting dynamic lookup"); -// Console.WriteLine("name == " + typeName); - - // try if it exists a variable named typeName - ReturnType variable = SearchVariable(typeName); - if (variable != null) { - showStatic = false; - return variable; - } -// Console.WriteLine("No Variable found"); - - if (callingClass == null) { - return null; - } - //// somehow search in callingClass fields is not returning anything, so I am searching here once again - foreach (IField f in callingClass.Fields) { - if (f.Name == typeName) { -// Console.WriteLine("Field found " + f.Name); - return f.ReturnType; - } - } - //// end of mod for search in Fields - - // try if typeName is a method parameter - IReturnType p = SearchMethodParameter(typeName); - if (p != null) { -// Console.WriteLine("MethodParameter Found"); - showStatic = false; - return p; - } -// Console.WriteLine("No Parameter found"); - - // check if typeName == value in set method of a property - if (typeName == "value") { - p = SearchProperty(); - if (p != null) { - showStatic = false; - return p; - } - } -// Console.WriteLine("No Property found"); - - // try if there exists a nonstatic member named typeName - showStatic = false; - IReturnType t = SearchMember(callingClass == null ? null : new ReturnType(callingClass.FullyQualifiedName), typeName); - if (t != null) { - return t; - } -// Console.WriteLine("No nonstatic member found"); - - // try if there exists a static member named typeName - showStatic = true; - t = SearchMember(callingClass == null ? null : new ReturnType(callingClass.FullyQualifiedName), typeName); - if (t != null) { - showStatic = false; - return t; - } -// Console.WriteLine("No static member found"); - - // try if there exists a static member in outer classes named typeName - ClassCollection classes = GetOuterClasses(); - foreach (IClass c in GetOuterClasses()) { - t = SearchMember(callingClass == null ? null : new ReturnType(c.FullyQualifiedName), typeName); - if (t != null) { - showStatic = false; - return t; - } - } -// Console.WriteLine("No static member in outer classes found"); -// Console.WriteLine("DynamicLookUp resultless"); - return null; - } - - IProperty GetProperty() - { - foreach (IProperty property in callingClass.Properties) { - if (property.BodyRegion != null && property.BodyRegion.IsInside(caretLine, caretColumn)) { - return property; - } - } - return null; - } - - IMethod GetMethod() - { - foreach (IMethod method in callingClass.Methods) { - if (method.BodyRegion != null && method.BodyRegion.IsInside(caretLine, caretColumn)) { - return method; - } - } - return null; - } - - IReturnType SearchProperty() - { - IProperty property = GetProperty(); - if (property == null) { - return null; - } - if (property.SetterRegion != null && property.SetterRegion.IsInside(caretLine, caretColumn)) { - return property.ReturnType; - } - return null; - } - - IReturnType SearchMethodParameter(string parameter) - { - IMethod method = GetMethod(); - if (method == null) { - Console.WriteLine("Method not found"); - return null; - } - foreach (IParameter p in method.Parameters) { - if (p.Name == parameter) { - Console.WriteLine("Parameter found"); - return p.ReturnType; - } - } - return null; - } - - /// <remarks> - /// use the usings to find the correct name of a namespace - /// </remarks> - public string SearchNamespace(string name, ICompilationUnit unit) - { - if (parserService.NamespaceExists(name)) { - return name; - } - if (unit == null) { -// Console.WriteLine("done, resultless"); - return null; - } - foreach (IUsing u in unit.Usings) { - if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) { - string nameSpace = u.SearchNamespace(name); - if (nameSpace != null) { - return nameSpace; - } - } - } -// Console.WriteLine("done, resultless"); - return null; - } - - /// <remarks> - /// use the usings and the name of the namespace to find a class - /// </remarks> - public IClass SearchType(string name, ICompilationUnit unit) - { -// Console.WriteLine("Searching Type " + name); - if (name == null || name == String.Empty) { -// Console.WriteLine("No Name!"); - return null; - } - IClass c; - c = parserService.GetClass(name); - if (c != null) { -// Console.WriteLine("Found!"); - return c; - } -// Console.WriteLine("No FullName"); - if (unit != null) { -// Console.WriteLine(unit.Usings.Count + " Usings"); - foreach (IUsing u in unit.Usings) { - if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) { -// Console.WriteLine("In UsingRegion"); - c = u.SearchType(name); - if (c != null) { -// Console.WriteLine("SearchType Successfull!!!"); - return c; - } - } - } - } - if (callingClass == null) { - return null; - } - string fullname = callingClass.FullyQualifiedName; - string[] namespaces = fullname.Split(new char[] {'.'}); - string curnamespace = namespaces[0] + '.'; - for (int i = 1; i < namespaces.Length; ++i) { - c = parserService.GetClass(curnamespace + name); - if (c != null) { - return c; - } - curnamespace += namespaces[i] + '.'; - } - return null; - } - - /// <remarks> - /// Returns true, if class possibleBaseClass is in the inheritance tree from c - /// </remarks> - bool IsClassInInheritanceTree(IClass possibleBaseClass, IClass c) - { - if (possibleBaseClass == null || c == null) { - return false; - } - if (possibleBaseClass.FullyQualifiedName == c.FullyQualifiedName) { - return true; - } - foreach (string baseClass in c.BaseTypes) { - if (IsClassInInheritanceTree(possibleBaseClass, SearchType(baseClass, cu))) { - return true; - } - } - return false; - } - - /// <remarks> - /// Returns the innerst class in which the carret currently is, returns null - /// if the carret is outside any class boundaries. - /// </remarks> - IClass GetInnermostClass() - { - if (cu != null) { - foreach (IClass c in cu.Classes) { - if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) { - return GetInnermostClass(c); - } - } - } - return null; - } - - IClass GetInnermostClass(IClass curClass) - { - if (curClass == null) { - return null; - } - if (curClass.InnerClasses == null) { - return curClass; - } - foreach (IClass c in curClass.InnerClasses) { - if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) { - return GetInnermostClass(c); - } - } - return curClass; - } - - /// <remarks> - /// Returns all (nestet) classes in which the carret currently is exept - /// the innermost class, returns an empty collection if the carret is in - /// no class or only in the innermost class. - /// the most outer class is the last in the collection. - /// </remarks> - ClassCollection GetOuterClasses() - { - ClassCollection classes = new ClassCollection(); - if (cu != null) { - foreach (IClass c in cu.Classes) { - if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) { - if (c != GetInnermostClass()) { - GetOuterClasses(classes, c); - classes.Add(c); - } - break; - } - } - } - - return classes; - } - - void GetOuterClasses(ClassCollection classes, IClass curClass) - { - if (curClass != null) { - foreach (IClass c in curClass.InnerClasses) { - if (c != null && c.Region != null && c.Region.IsInside(caretLine, caretColumn)) { - if (c != GetInnermostClass()) { - GetOuterClasses(classes, c); - classes.Add(c); - } - break; - } - } - } - } - - public LanguageItemCollection CtrlSpace(IParserContext parserService, int caretLine, int caretColumn, string fileName) - { - LanguageItemCollection result = new LanguageItemCollection(); - this.parserService = parserService; - IParseInformation parseInfo = parserService.GetParseInformation(fileName); - JRefactory.Parser.AST.CompilationUnit fileCompilationUnit = parseInfo.MostRecentCompilationUnit.Tag as JRefactory.Parser.AST.CompilationUnit; - if (fileCompilationUnit == null) { - return null; - } - lookupTableVisitor = new LookupTableVisitor(); - lookupTableVisitor.Visit(fileCompilationUnit, null); - JavaVisitor cSharpVisitor = new JavaVisitor (); - cu = (ICompilationUnit)cSharpVisitor.Visit(fileCompilationUnit, null); - if (cu != null) { - callingClass = GetInnermostClass(); -// Console.WriteLine("CallingClass is " + callingClass == null ? "null" : callingClass.Name); - } - foreach (string name in lookupTableVisitor.variables.Keys) { - ArrayList variables = (ArrayList)lookupTableVisitor.variables[name]; - if (variables != null && variables.Count > 0) { - foreach (LocalLookupVariable v in variables) { - if (IsInside(new Point(caretColumn, caretLine), v.StartPos, v.EndPos)) { - result.Add(v); - break; - } - } - } - } - if (callingClass != null) { - result = ListMembers(result, callingClass); - } - string n = ""; - result.AddRange(parserService.GetNamespaceContents(n)); - foreach (IUsing u in cu.Usings) { - if (u != null && (u.Region == null || u.Region.IsInside(caretLine, caretColumn))) { - foreach (string name in u.Usings) { - result.AddRange(parserService.GetNamespaceContents(name)); - } - foreach (string alias in u.Aliases.Keys) { - result.Add(alias); - } - } - } - return result; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/AttributeSection.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/AttributeSection.cs deleted file mode 100644 index 3602608f49..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/AttributeSection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// created on 08.09.2003 at 16:17 - -using MonoDevelop.Projects.Parser; -using System.Collections; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class AttributeSection : DefaultAttributeSection - { - public AttributeSection(AttributeTarget attributeTarget, - AttributeCollection attributes) { - this.attributeTarget = attributeTarget; - this.attributes = attributes; - } - } - public class ASTAttribute : DefaultAttribute - { - public ASTAttribute(string name, ArrayList positionalArguments, SortedList namedArguments) - { - this.name = name; - this.positionalArguments = positionalArguments; - this.namedArguments = namedArguments; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Class.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Class.cs deleted file mode 100644 index d07c72efb7..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Class.cs +++ /dev/null @@ -1,57 +0,0 @@ -// created on 06.08.2003 at 12:37 - -using System.Diagnostics; - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Class : DefaultClass - { - public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region): base (cu) - { - classType = t; - this.region = region; - modifiers = (ModifierEnum)m; - } - - public void UpdateModifier() - { - if (classType == ClassType.Enum) { - foreach (Field f in fields) { - f.AddModifier(ModifierEnum.Public); - } - return; - } - if (classType != ClassType.Interface) { - return; - } - foreach (Class c in innerClasses) { - c.modifiers = c.modifiers | ModifierEnum.Public; - } - foreach (IMethod m in methods) { - if (m is Constructor) { - ((Constructor)m).AddModifier(ModifierEnum.Public); - } else if (m is Method) { - ((Method)m).AddModifier(ModifierEnum.Public); - } else { - Debug.Assert(false, "Unexpected type in method of interface. Can not set modifier to public!"); - } - } - foreach (Event e in events) { - e.AddModifier(ModifierEnum.Public); - } - foreach (Field f in fields) { - f.AddModifier(ModifierEnum.Public); - } - foreach (Indexer i in indexer) { - i.AddModifier(ModifierEnum.Public); - } - foreach (Property p in properties) { - p.AddModifier(ModifierEnum.Public); - } - - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/CompilationUnit.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/CompilationUnit.cs deleted file mode 100644 index c87424a972..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/CompilationUnit.cs +++ /dev/null @@ -1,26 +0,0 @@ -// created on 04.08.2003 at 17:31 - -using MonoDevelop.Projects.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class CompilationUnit : DefaultCompilationUnit - { - - public override CommentCollection MiscComments { - get { - return null; - } - } - public override CommentCollection DokuComments { - get { - return null; - } - } - public override TagCollection TagComments { - get { - return null; - } - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Constructor.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Constructor.cs deleted file mode 100644 index 894a6c2144..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Constructor.cs +++ /dev/null @@ -1,18 +0,0 @@ -// created on 06.08.2003 at 12:35 - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Constructor : DefaultMethod - { - public Constructor(Modifier m, IRegion region, IRegion bodyRegion) - { - FullyQualifiedName = "ctor"; - this.region = region; - this.bodyRegion = bodyRegion; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Event.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Event.cs deleted file mode 100644 index 2ff7d5b473..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Event.cs +++ /dev/null @@ -1,24 +0,0 @@ -// created on 06.08.2003 at 12:30 - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Event : DefaultEvent - { - public void AddModifier(ModifierEnum m) - { - modifiers = modifiers | m; - } - - public Event(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion) - { - FullyQualifiedName = name; - returnType = type; - this.region = region; - this.bodyRegion = bodyRegion; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Field.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Field.cs deleted file mode 100644 index db3eb386b1..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Field.cs +++ /dev/null @@ -1,23 +0,0 @@ -// created on 04.08.2003 at 18:06 - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Field : DefaultField - { - public void AddModifier(ModifierEnum m) - { - modifiers = modifiers | m; - } - - public Field(ReturnType type, string fullyQualifiedName, Modifier m, IRegion region) - { - this.returnType = type; - this.FullyQualifiedName = fullyQualifiedName; - this.region = region; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Indexer.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Indexer.cs deleted file mode 100644 index 6c60fea22f..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Indexer.cs +++ /dev/null @@ -1,24 +0,0 @@ -// created on 06.08.2003 at 12:34 - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Indexer : DefaultIndexer - { - public void AddModifier(ModifierEnum m) - { - modifiers = modifiers | m; - } - - public Indexer(ReturnType type, ParameterCollection parameters, Modifier m, IRegion region, IRegion bodyRegion) - { - returnType = type; - this.parameters = parameters; - this.region = region; - this.bodyRegion = bodyRegion; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Method.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Method.cs deleted file mode 100644 index 6603912823..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Method.cs +++ /dev/null @@ -1,19 +0,0 @@ -// created on 06.08.2003 at 12:35 -using System; -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Method : DefaultMethod - { - public Method(string name, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion) - { - FullyQualifiedName = name; - returnType = type; - this.region = region; - this.bodyRegion = bodyRegion; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Parameter.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Parameter.cs deleted file mode 100644 index 259f70d614..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Parameter.cs +++ /dev/null @@ -1,15 +0,0 @@ -// created on 07.08.2003 at 20:12 - -using MonoDevelop.Projects.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Parameter : DefaultParameter - { - public Parameter(string name, ReturnType type) - { - this.name = name; - returnType = type; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Property.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Property.cs deleted file mode 100644 index 1b3acba113..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/Property.cs +++ /dev/null @@ -1,24 +0,0 @@ -// created on 06.08.2003 at 12:36 - -using MonoDevelop.Projects.Parser; -using JRefactory.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class Property : DefaultProperty - { - public void AddModifier(ModifierEnum m) - { - modifiers = modifiers | m; - } - - public Property(string fullyQualifiedName, ReturnType type, Modifier m, IRegion region, IRegion bodyRegion) - { - this.FullyQualifiedName = fullyQualifiedName; - returnType = type; - this.region = region; - this.bodyRegion = bodyRegion; - modifiers = (ModifierEnum)m; - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/ReturnType.cs b/main/src/addins/JavaBinding/Parser/SharpDevelopTree/ReturnType.cs deleted file mode 100644 index 5f401ea406..0000000000 --- a/main/src/addins/JavaBinding/Parser/SharpDevelopTree/ReturnType.cs +++ /dev/null @@ -1,32 +0,0 @@ -// created on 04.08.2003 at 18:08 - -using MonoDevelop.Projects.Parser; - -namespace JavaBinding.Parser.SharpDevelopTree -{ - public class ReturnType : DefaultReturnType - { - public ReturnType(string fullyQualifiedName) - { - base.FullyQualifiedName = fullyQualifiedName; - } - - public ReturnType(string fullyQualifiedName, int[] arrayDimensions, int pointerNestingLevel) - { - this.FullyQualifiedName = fullyQualifiedName; - this.arrayDimensions = arrayDimensions; - this.pointerNestingLevel = pointerNestingLevel; - } - - public ReturnType (JRefactory.Parser.AST.TypeReference type) - { - base.FullyQualifiedName = type.SystemType; - base.arrayDimensions = type.RankSpecifier == null ? new int[] { } : type.RankSpecifier; - base.pointerNestingLevel = type.PointerNestingLevel; - } - public ReturnType Clone() - { - return new ReturnType(FullyQualifiedName, arrayDimensions, pointerNestingLevel); - } - } -} diff --git a/main/src/addins/JavaBinding/Parser/TypeVisitor.cs b/main/src/addins/JavaBinding/Parser/TypeVisitor.cs deleted file mode 100644 index 2ca129a0e9..0000000000 --- a/main/src/addins/JavaBinding/Parser/TypeVisitor.cs +++ /dev/null @@ -1,306 +0,0 @@ -// created on 22.08.2003 at 19:02 - -using System; -using System.Collections; - -using JRefactory.Parser; -using JRefactory.Parser.AST; -using JavaBinding.Parser.SharpDevelopTree; -using MonoDevelop.Projects.Parser; - -namespace JavaBinding.Parser -{ - public class TypeVisitor : AbstractASTVisitor - { - Resolver resolver; - - public TypeVisitor(Resolver resolver) - { - this.resolver = resolver; - } - - public override object Visit(PrimitiveExpression primitiveExpression, object data) - { - if (primitiveExpression.Value != null) { -// Console.WriteLine("Visiting " + primitiveExpression.Value); - return new ReturnType(primitiveExpression.Value.GetType().FullName); - } - return null; - } - - public override object Visit(BinaryOperatorExpression binaryOperatorExpression, object data) - { - // TODO : Operators - return binaryOperatorExpression.Left.AcceptVisitor(this, data); - } - - public override object Visit(ParenthesizedExpression parenthesizedExpression, object data) - { - if (parenthesizedExpression == null) { - return null; - } - return parenthesizedExpression.Expression.AcceptVisitor(this, data); - } - - public override object Visit(InvocationExpression invocationExpression, object data) - { - if (invocationExpression.TargetObject is FieldReferenceExpression) { - FieldReferenceExpression field = (FieldReferenceExpression)invocationExpression.TargetObject; - IReturnType type = field.TargetObject.AcceptVisitor(this, data) as IReturnType; - ArrayList methods = resolver.SearchMethod(type, field.FieldName); - resolver.ShowStatic = false; - if (methods.Count <= 0) { - return null; - } - // TODO: Find the right method - return ((IMethod)methods[0]).ReturnType; - } else if (invocationExpression.TargetObject is IdentifierExpression) { - string id = ((IdentifierExpression)invocationExpression.TargetObject).Identifier; - if (resolver.CallingClass == null) { - return null; - } - IReturnType type = new ReturnType(resolver.CallingClass.FullyQualifiedName); - ArrayList methods = resolver.SearchMethod(type, id); - resolver.ShowStatic = false; - if (methods.Count <= 0) { - return null; - } - // TODO: Find the right method - return ((IMethod)methods[0]).ReturnType; - } - // invocationExpression is delegate call - IReturnType t = invocationExpression.AcceptChildren(this, data) as IReturnType; - if (t == null) { - return null; - } - IClass c = resolver.SearchType(t.FullyQualifiedName, resolver.CompilationUnit); - if (c.ClassType == ClassType.Delegate) { - ArrayList methods = resolver.SearchMethod(t, "invoke"); - if (methods.Count <= 0) { - return null; - } - return ((IMethod)methods[0]).ReturnType; - } - return null; - } - - public override object Visit(FieldReferenceExpression fieldReferenceExpression, object data) - { - if (fieldReferenceExpression == null) { - return null; - } - - IReturnType returnType = fieldReferenceExpression.TargetObject.AcceptVisitor(this, data) as IReturnType; - if (returnType != null) { - string name = resolver.SearchNamespace(returnType.FullyQualifiedName, resolver.CompilationUnit); - if (name != null) { - string n = resolver.SearchNamespace(string.Concat(name, ".", fieldReferenceExpression.FieldName), null); - if (n != null) { - return new ReturnType(n); - } - IClass c = resolver.SearchType(string.Concat(name, ".", fieldReferenceExpression.FieldName), resolver.CompilationUnit); - if (c != null) { - resolver.ShowStatic = true; - return new ReturnType(c.FullyQualifiedName); - } - return null; - } - return resolver.SearchMember(returnType, fieldReferenceExpression.FieldName); - } -// Console.WriteLine("returnType of child is null!"); - return null; - } - - public override object Visit(PointerReferenceExpression pointerReferenceExpression, object data) - { - ReturnType type = pointerReferenceExpression.Expression.AcceptVisitor(this, data) as ReturnType; - if (type == null) { - return null; - } - type = type.Clone(); - --type.PointerNestingLevel; - if (type.PointerNestingLevel != 0) { - return null; - } - return resolver.SearchMember(type, pointerReferenceExpression.Identifier); - } - - public override object Visit(IdentifierExpression identifierExpression, object data) - { - if (identifierExpression == null) { - return null; - } - string name = resolver.SearchNamespace(identifierExpression.Identifier, resolver.CompilationUnit); - if (name != null) { - return new ReturnType(name); - } - IClass c = resolver.SearchType(identifierExpression.Identifier, resolver.CompilationUnit); - if (c != null) { - resolver.ShowStatic = true; - return new ReturnType(c.FullyQualifiedName); - } - return resolver.DynamicLookup(identifierExpression.Identifier); - } - - public override object Visit(TypeReferenceExpression typeReferenceExpression, object data) - { - return new ReturnType(typeReferenceExpression.TypeReference); - } - - public override object Visit(UnaryOperatorExpression unaryOperatorExpression, object data) - { - if (unaryOperatorExpression == null) { - return null; - } - ReturnType expressionType = unaryOperatorExpression.Expression.AcceptVisitor(this, data) as ReturnType; - // TODO: Little bug: unary operator MAY change the return type, - // but that is only a minor issue - switch (unaryOperatorExpression.Op) { - case UnaryOperatorType.Not: - break; - case UnaryOperatorType.BitNot: - break; - case UnaryOperatorType.Minus: - break; - case UnaryOperatorType.Plus: - break; - case UnaryOperatorType.Increment: - case UnaryOperatorType.PostIncrement: - break; - case UnaryOperatorType.Decrement: - case UnaryOperatorType.PostDecrement: - break; - case UnaryOperatorType.Star: // dereference - --expressionType.PointerNestingLevel; - break; - case UnaryOperatorType.BitWiseAnd: // get reference - ++expressionType.PointerNestingLevel; - break; - case UnaryOperatorType.None: - break; - } - return expressionType; - } - - public override object Visit(AssignmentExpression assignmentExpression, object data) - { - return assignmentExpression.Left.AcceptVisitor(this, data); - } - - public override object Visit(SizeOfExpression sizeOfExpression, object data) - { - return new ReturnType("System.Int32"); - } - - public override object Visit(TypeOfExpression typeOfExpression, object data) - { - return new ReturnType("System.Type"); - } - - public override object Visit(CheckedExpression checkedExpression, object data) - { - return checkedExpression.Expression.AcceptVisitor(this, data); - } - - public override object Visit(UncheckedExpression uncheckedExpression, object data) - { - return uncheckedExpression.Expression.AcceptVisitor(this, data); - } - - public override object Visit(CastExpression castExpression, object data) - { - return new ReturnType(castExpression.CastTo.Type); - } - - public override object Visit(StackAllocExpression stackAllocExpression, object data) - { - ReturnType returnType = new ReturnType(stackAllocExpression.Type); - ++returnType.PointerNestingLevel; - return returnType; - } - - public override object Visit(IndexerExpression indexerExpression, object data) - { - IReturnType type = (IReturnType)indexerExpression.TargetObject.AcceptVisitor(this, data); - if (type == null) { - return null; - } - if (type.ArrayDimensions == null || type.ArrayDimensions.Length == 0) { - // check if ther is an indexer - if (indexerExpression.TargetObject is ThisReferenceExpression) { - if (resolver.CallingClass == null) { - return null; - } - type = new ReturnType(resolver.CallingClass.FullyQualifiedName); - } - ArrayList indexer = resolver.SearchIndexer(type); - if (indexer.Count == 0) { - return null; - } - // TODO: get the right indexer - return ((IIndexer)indexer[0]).ReturnType; - } - - // TODO: what is a[0] if a is pointer to array or array of pointer ? - if (type.ArrayDimensions[type.ArrayDimensions.Length - 1] != indexerExpression.Indices.Count) { - return null; - } - int[] newArray = new int[type.ArrayDimensions.Length - 1]; - Array.Copy(type.ArrayDimensions, 0, newArray, 0, type.ArrayDimensions.Length - 1); - return new ReturnType(type.Name, newArray, type.PointerNestingLevel); - } - - public override object Visit(ThisReferenceExpression thisReferenceExpression, object data) - { - if (resolver.CallingClass == null) { - return null; - } - return new ReturnType(resolver.CallingClass.FullyQualifiedName); - } - - public override object Visit(BaseReferenceExpression baseReferenceExpression, object data) - { -// Console.WriteLine("Visiting base"); - if (resolver.CallingClass == null) { - return null; - } - IClass baseClass = resolver.BaseClass(resolver.CallingClass); - if (baseClass == null) { -// Console.WriteLine("Base Class not found"); - return null; - } -// Console.WriteLine("Base Class: " + baseClass.FullyQualifiedName); - return new ReturnType(baseClass.FullyQualifiedName); - } - - public override object Visit(ObjectCreateExpression objectCreateExpression, object data) - { - string name = resolver.SearchType(objectCreateExpression.CreateType.Type, resolver.CompilationUnit).FullyQualifiedName; - return new ReturnType(name, objectCreateExpression.CreateType.RankSpecifier, objectCreateExpression.CreateType.PointerNestingLevel); - } - - public override object Visit(ArrayCreateExpression arrayCreateExpression, object data) - { - ReturnType type = new ReturnType(arrayCreateExpression.CreateType); - if (arrayCreateExpression.Parameters != null && arrayCreateExpression.Parameters.Count > 0) { - int[] newRank = new int[arrayCreateExpression.Rank.Length + 1]; - newRank[0] = arrayCreateExpression.Parameters.Count - 1; - Array.Copy(type.ArrayDimensions, 0, newRank, 1, type.ArrayDimensions.Length); - type.ArrayDimensions = newRank; - } - return type; - } - - public override object Visit(DirectionExpression directionExpression, object data) - { - // no calls allowed !!! - return null; - } - - public override object Visit(ArrayInitializerExpression arrayInitializerExpression, object data) - { - // no calls allowed !!! - return null; - } - } -} diff --git a/main/src/addins/JavaBinding/Project/JavaCompilerParameters.cs b/main/src/addins/JavaBinding/Project/JavaCompilerParameters.cs deleted file mode 100644 index 27e491def2..0000000000 --- a/main/src/addins/JavaBinding/Project/JavaCompilerParameters.cs +++ /dev/null @@ -1,136 +0,0 @@ -// JavaCompilerParameters.cs -// -// This file was derived from a file from #Develop. -// -// Copyright (C) 2001-2007 Mike Krüger <mkrueger@novell.com> -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -using System; -using System.Xml; -using System.Diagnostics; - -using MonoDevelop.Projects; -using MonoDevelop.Projects.Serialization; - -namespace JavaBinding -{ - /// <summary> - /// This class handles project specific compiler parameters - /// </summary> - public class JavaCompilerParameters: ICloneable - { - [ItemProperty("deprecation")] - bool deprecation = true; - - [ItemProperty("optimize")] - bool optimize = true; - - [ItemProperty("mainclass")] - string mainclass = null; - - [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 object Clone () - { - return MemberwiseClone (); - } - - public bool GenWarnings { - get { - return genwarnings; - } - set { - genwarnings = value; - } - } - - public string ClassPath { - get { - return classpath; - } - set { - classpath = value; - } - } - - public JavaCompiler Compiler { - get { - return compiler; - } - set { - compiler = value; - } - } - - public string CompilerPath { - get { - return compilerpath; - } - set { - compilerpath = value; - } - } - - public bool Deprecation { - get { - return deprecation; - } - set { - deprecation = value; - } - } - - public bool Optimize { - get { - return optimize; - } - set { - optimize = value; - } - } - - public string MainClass { - get { - return mainclass; - } - set { - mainclass = value; - } - } - - public string DefineSymbols { - get { - return definesymbols; - } - set { - definesymbols = value; - } - } - } -} diff --git a/main/src/addins/JavaBinding/README b/main/src/addins/JavaBinding/README deleted file mode 100644 index 794c3285fa..0000000000 --- a/main/src/addins/JavaBinding/README +++ /dev/null @@ -1,7 +0,0 @@ - -MonoDevelop's support of Java is accompished via IKVM.NET -(see http://www.ikvm.net) and it intended to allow writing -.NET applications and libraries in Java. With this in mind -we will be moving to producing .NET assemblies instead of -java class files or jars by default. - diff --git a/main/src/addins/JavaBinding/TODO b/main/src/addins/JavaBinding/TODO deleted file mode 100644 index 7b0d9904ce..0000000000 --- a/main/src/addins/JavaBinding/TODO +++ /dev/null @@ -1,7 +0,0 @@ - - fix regluar java templates - - make classpath handling better - - support turning a jar to a dll simply - - support more java compilers (like ecj) - - automatically copy IKVM.GNU.Classpath.dll and IKVM.Runtime.dll - to output dir - - implement GenerateMakefiles perhaps diff --git a/main/src/addins/JavaBinding/gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs b/main/src/addins/JavaBinding/gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs deleted file mode 100644 index 3a99699971..0000000000 --- a/main/src/addins/JavaBinding/gtk-gui/JavaBinding.CodeGenerationPanelWidget.cs +++ /dev/null @@ -1,473 +0,0 @@ -// ------------------------------------------------------------------------------ -// <autogenerated> -// This code was generated by a tool. -// Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </autogenerated> -// ------------------------------------------------------------------------------ - -namespace JavaBinding { - - - internal partial class CodeGenerationPanelWidget { - - private Gtk.VBox vbox62; - - private Gtk.Label label82; - - private Gtk.HBox hbox56; - - private Gtk.Label label81; - - private Gtk.VBox vbox65; - - private Gtk.Table table7; - - private Gtk.Entry classPathEntry; - - private Gtk.HBox hbox61; - - private Gtk.ComboBox compileTargetCombo; - - private Gtk.Label label86; - - private Gtk.Label label87; - - private Gtk.Label label88; - - private Gtk.Label label91; - - private Gtk.Entry mainClassEntry; - - private Gtk.Entry symbolsEntry; - - private Gtk.Label label92; - - private Gtk.HBox hbox57; - - private Gtk.Label label93; - - private Gtk.VBox vbox66; - - private Gtk.HBox hbox58; - - private Gtk.RadioButton compilerGcjButton; - - private Gtk.RadioButton compilerJavacButton; - - private Gtk.Entry compilerEntry; - - private Gtk.HBox hbox60; - - private Gtk.VBox vbox68; - - private Gtk.Label label90; - - private Gtk.HBox hbox47; - - private Gtk.Label label72; - - private Gtk.VBox vbox64; - - private Gtk.CheckButton enableOptimizationCheckButton; - - private Gtk.CheckButton generateDebugInformationCheckButton; - - private Gtk.VBox vbox69; - - private Gtk.Label label94; - - private Gtk.HBox hbox59; - - private Gtk.Label label95; - - private Gtk.VBox vbox67; - - private Gtk.CheckButton generateWarningsCheckButton; - - private Gtk.CheckButton deprecationCheckButton; - - private Gtk.CheckButton warningsAsErrorsCheckButton; - - protected virtual void Build() { - Stetic.Gui.Initialize(this); - // Widget JavaBinding.CodeGenerationPanelWidget - Stetic.BinContainer.Attach(this); - this.Name = "JavaBinding.CodeGenerationPanelWidget"; - // Container child JavaBinding.CodeGenerationPanelWidget.Gtk.Container+ContainerChild - this.vbox62 = new Gtk.VBox(); - this.vbox62.Name = "vbox62"; - this.vbox62.Spacing = 12; - // Container child vbox62.Gtk.Box+BoxChild - this.label82 = new Gtk.Label(); - this.label82.Name = "label82"; - this.label82.Xalign = 0F; - this.label82.LabelProp = Mono.Unix.Catalog.GetString("<b>Code Generation</b>"); - this.label82.UseMarkup = true; - this.vbox62.Add(this.label82); - Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox62[this.label82])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; - // Container child vbox62.Gtk.Box+BoxChild - this.hbox56 = new Gtk.HBox(); - this.hbox56.Name = "hbox56"; - // Container child hbox56.Gtk.Box+BoxChild - this.label81 = new Gtk.Label(); - this.label81.WidthRequest = 18; - this.label81.Name = "label81"; - this.label81.LabelProp = ""; - this.hbox56.Add(this.label81); - Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox56[this.label81])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child hbox56.Gtk.Box+BoxChild - this.vbox65 = new Gtk.VBox(); - this.vbox65.Name = "vbox65"; - this.vbox65.Spacing = 6; - // Container child vbox65.Gtk.Box+BoxChild - this.table7 = new Gtk.Table(((uint)(4)), ((uint)(2)), false); - this.table7.Name = "table7"; - this.table7.RowSpacing = ((uint)(6)); - this.table7.ColumnSpacing = ((uint)(6)); - // Container child table7.Gtk.Table+TableChild - this.classPathEntry = new Gtk.Entry(); - this.classPathEntry.Name = "classPathEntry"; - this.classPathEntry.IsEditable = true; - this.classPathEntry.InvisibleChar = '●'; - this.table7.Add(this.classPathEntry); - Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table7[this.classPathEntry])); - w3.TopAttach = ((uint)(3)); - w3.BottomAttach = ((uint)(4)); - w3.LeftAttach = ((uint)(1)); - w3.RightAttach = ((uint)(2)); - w3.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.hbox61 = new Gtk.HBox(); - this.hbox61.Name = "hbox61"; - // Container child hbox61.Gtk.Box+BoxChild - this.compileTargetCombo = new Gtk.ComboBox(); - this.compileTargetCombo.Name = "compileTargetCombo"; - this.hbox61.Add(this.compileTargetCombo); - Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox61[this.compileTargetCombo])); - w4.Position = 0; - w4.Expand = false; - w4.Fill = false; - this.table7.Add(this.hbox61); - Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table7[this.hbox61])); - w5.LeftAttach = ((uint)(1)); - w5.RightAttach = ((uint)(2)); - w5.XOptions = ((Gtk.AttachOptions)(4)); - w5.YOptions = ((Gtk.AttachOptions)(4)); - // Container child table7.Gtk.Table+TableChild - this.label86 = new Gtk.Label(); - this.label86.Name = "label86"; - this.label86.Xalign = 0F; - this.label86.LabelProp = Mono.Unix.Catalog.GetString("Compile _Target:"); - this.label86.UseUnderline = true; - this.table7.Add(this.label86); - Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table7[this.label86])); - w6.XOptions = ((Gtk.AttachOptions)(4)); - w6.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.label87 = new Gtk.Label(); - this.label87.Name = "label87"; - this.label87.Xalign = 0F; - this.label87.LabelProp = Mono.Unix.Catalog.GetString("Define S_ymbols:"); - this.label87.UseUnderline = true; - this.table7.Add(this.label87); - Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table7[this.label87])); - w7.TopAttach = ((uint)(1)); - w7.BottomAttach = ((uint)(2)); - w7.XOptions = ((Gtk.AttachOptions)(4)); - w7.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.label88 = new Gtk.Label(); - this.label88.Name = "label88"; - this.label88.Xalign = 0F; - this.label88.LabelProp = Mono.Unix.Catalog.GetString("_Main Class:"); - this.label88.UseUnderline = true; - this.table7.Add(this.label88); - Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table7[this.label88])); - w8.TopAttach = ((uint)(2)); - w8.BottomAttach = ((uint)(3)); - w8.XOptions = ((Gtk.AttachOptions)(4)); - w8.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.label91 = new Gtk.Label(); - this.label91.Name = "label91"; - this.label91.Xalign = 0F; - this.label91.LabelProp = Mono.Unix.Catalog.GetString("Classpath:"); - this.label91.UseUnderline = true; - this.table7.Add(this.label91); - Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table7[this.label91])); - w9.TopAttach = ((uint)(3)); - w9.BottomAttach = ((uint)(4)); - w9.XOptions = ((Gtk.AttachOptions)(4)); - w9.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.mainClassEntry = new Gtk.Entry(); - this.mainClassEntry.Name = "mainClassEntry"; - this.mainClassEntry.IsEditable = true; - this.mainClassEntry.InvisibleChar = '●'; - this.table7.Add(this.mainClassEntry); - Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table7[this.mainClassEntry])); - w10.TopAttach = ((uint)(2)); - w10.BottomAttach = ((uint)(3)); - w10.LeftAttach = ((uint)(1)); - w10.RightAttach = ((uint)(2)); - w10.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table7.Gtk.Table+TableChild - this.symbolsEntry = new Gtk.Entry(); - this.symbolsEntry.Name = "symbolsEntry"; - this.symbolsEntry.IsEditable = true; - this.symbolsEntry.InvisibleChar = '●'; - this.table7.Add(this.symbolsEntry); - Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table7[this.symbolsEntry])); - w11.TopAttach = ((uint)(1)); - w11.BottomAttach = ((uint)(2)); - w11.LeftAttach = ((uint)(1)); - w11.RightAttach = ((uint)(2)); - w11.YOptions = ((Gtk.AttachOptions)(0)); - this.vbox65.Add(this.table7); - Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox65[this.table7])); - w12.Position = 0; - this.hbox56.Add(this.vbox65); - Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox56[this.vbox65])); - w13.Position = 1; - this.vbox62.Add(this.hbox56); - Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox62[this.hbox56])); - w14.Position = 1; - w14.Expand = false; - w14.Fill = false; - // Container child vbox62.Gtk.Box+BoxChild - this.label92 = new Gtk.Label(); - this.label92.Name = "label92"; - this.label92.Xalign = 0F; - this.label92.LabelProp = Mono.Unix.Catalog.GetString("<b>Compiler</b>"); - this.label92.UseMarkup = true; - this.vbox62.Add(this.label92); - Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox62[this.label92])); - w15.Position = 2; - w15.Expand = false; - w15.Fill = false; - // Container child vbox62.Gtk.Box+BoxChild - this.hbox57 = new Gtk.HBox(); - this.hbox57.Name = "hbox57"; - // Container child hbox57.Gtk.Box+BoxChild - this.label93 = new Gtk.Label(); - this.label93.WidthRequest = 18; - this.label93.Name = "label93"; - this.label93.LabelProp = ""; - this.hbox57.Add(this.label93); - Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox57[this.label93])); - w16.Position = 0; - w16.Expand = false; - w16.Fill = false; - // Container child hbox57.Gtk.Box+BoxChild - this.vbox66 = new Gtk.VBox(); - this.vbox66.Name = "vbox66"; - // Container child vbox66.Gtk.Box+BoxChild - this.hbox58 = new Gtk.HBox(); - this.hbox58.Name = "hbox58"; - this.hbox58.Spacing = 18; - // Container child hbox58.Gtk.Box+BoxChild - this.compilerGcjButton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("gcj")); - this.compilerGcjButton.Name = "compilerGcjButton"; - this.compilerGcjButton.Active = true; - this.compilerGcjButton.DrawIndicator = true; - this.compilerGcjButton.UseUnderline = true; - this.compilerGcjButton.Group = new GLib.SList(System.IntPtr.Zero); - this.hbox58.Add(this.compilerGcjButton); - Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox58[this.compilerGcjButton])); - w17.Position = 0; - w17.Expand = false; - w17.Fill = false; - // Container child hbox58.Gtk.Box+BoxChild - this.compilerJavacButton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("javac")); - this.compilerJavacButton.Name = "compilerJavacButton"; - this.compilerJavacButton.DrawIndicator = true; - this.compilerJavacButton.UseUnderline = true; - this.compilerJavacButton.Group = this.compilerGcjButton.Group; - this.hbox58.Add(this.compilerJavacButton); - Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.hbox58[this.compilerJavacButton])); - w18.Position = 1; - w18.Expand = false; - w18.Fill = false; - this.vbox66.Add(this.hbox58); - Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox66[this.hbox58])); - w19.Position = 0; - // Container child vbox66.Gtk.Box+BoxChild - this.compilerEntry = new Gtk.Entry(); - this.compilerEntry.Name = "compilerEntry"; - this.compilerEntry.IsEditable = true; - this.compilerEntry.InvisibleChar = '●'; - this.vbox66.Add(this.compilerEntry); - Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.vbox66[this.compilerEntry])); - w20.Position = 1; - w20.Expand = false; - w20.Fill = false; - this.hbox57.Add(this.vbox66); - Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox57[this.vbox66])); - w21.Position = 1; - this.vbox62.Add(this.hbox57); - Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox62[this.hbox57])); - w22.Position = 3; - w22.Expand = false; - w22.Fill = false; - // Container child vbox62.Gtk.Box+BoxChild - this.hbox60 = new Gtk.HBox(); - this.hbox60.Name = "hbox60"; - // Container child hbox60.Gtk.Box+BoxChild - this.vbox68 = new Gtk.VBox(); - this.vbox68.Name = "vbox68"; - this.vbox68.Spacing = 6; - // Container child vbox68.Gtk.Box+BoxChild - this.label90 = new Gtk.Label(); - this.label90.Name = "label90"; - this.label90.Xalign = 0F; - this.label90.LabelProp = Mono.Unix.Catalog.GetString("<b>Options</b>"); - this.label90.UseMarkup = true; - this.label90.UseUnderline = true; - this.vbox68.Add(this.label90); - Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.vbox68[this.label90])); - w23.Position = 0; - w23.Expand = false; - w23.Fill = false; - // Container child vbox68.Gtk.Box+BoxChild - this.hbox47 = new Gtk.HBox(); - this.hbox47.Name = "hbox47"; - // Container child hbox47.Gtk.Box+BoxChild - this.label72 = new Gtk.Label(); - this.label72.WidthRequest = 18; - this.label72.Name = "label72"; - this.label72.LabelProp = ""; - this.hbox47.Add(this.label72); - Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.hbox47[this.label72])); - w24.Position = 0; - w24.Expand = false; - w24.Fill = false; - // Container child hbox47.Gtk.Box+BoxChild - this.vbox64 = new Gtk.VBox(); - this.vbox64.Name = "vbox64"; - this.vbox64.Spacing = 6; - // Container child vbox64.Gtk.Box+BoxChild - this.enableOptimizationCheckButton = new Gtk.CheckButton(); - this.enableOptimizationCheckButton.Name = "enableOptimizationCheckButton"; - this.enableOptimizationCheckButton.Label = Mono.Unix.Catalog.GetString("Enable _optimizations"); - this.enableOptimizationCheckButton.DrawIndicator = true; - this.enableOptimizationCheckButton.UseUnderline = true; - this.vbox64.Add(this.enableOptimizationCheckButton); - Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox64[this.enableOptimizationCheckButton])); - w25.Position = 0; - w25.Expand = false; - w25.Fill = false; - // Container child vbox64.Gtk.Box+BoxChild - this.generateDebugInformationCheckButton = new Gtk.CheckButton(); - this.generateDebugInformationCheckButton.Name = "generateDebugInformationCheckButton"; - this.generateDebugInformationCheckButton.Label = Mono.Unix.Catalog.GetString("Emit _debugging information"); - this.generateDebugInformationCheckButton.DrawIndicator = true; - this.generateDebugInformationCheckButton.UseUnderline = true; - this.vbox64.Add(this.generateDebugInformationCheckButton); - Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.vbox64[this.generateDebugInformationCheckButton])); - w26.Position = 1; - w26.Expand = false; - w26.Fill = false; - this.hbox47.Add(this.vbox64); - Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox47[this.vbox64])); - w27.Position = 1; - this.vbox68.Add(this.hbox47); - Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox68[this.hbox47])); - w28.Position = 1; - this.hbox60.Add(this.vbox68); - Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox60[this.vbox68])); - w29.Position = 0; - // Container child hbox60.Gtk.Box+BoxChild - this.vbox69 = new Gtk.VBox(); - this.vbox69.Name = "vbox69"; - this.vbox69.Spacing = 6; - // Container child vbox69.Gtk.Box+BoxChild - this.label94 = new Gtk.Label(); - this.label94.Name = "label94"; - this.label94.Xalign = 0F; - this.label94.LabelProp = Mono.Unix.Catalog.GetString("<b>Warnings</b>"); - this.label94.UseMarkup = true; - this.label94.UseUnderline = true; - this.vbox69.Add(this.label94); - Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox69[this.label94])); - w30.Position = 0; - w30.Expand = false; - w30.Fill = false; - // Container child vbox69.Gtk.Box+BoxChild - this.hbox59 = new Gtk.HBox(); - this.hbox59.Name = "hbox59"; - // Container child hbox59.Gtk.Box+BoxChild - this.label95 = new Gtk.Label(); - this.label95.WidthRequest = 18; - this.label95.Name = "label95"; - this.label95.LabelProp = ""; - this.hbox59.Add(this.label95); - Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.hbox59[this.label95])); - w31.Position = 0; - w31.Expand = false; - w31.Fill = false; - // Container child hbox59.Gtk.Box+BoxChild - this.vbox67 = new Gtk.VBox(); - this.vbox67.Name = "vbox67"; - this.vbox67.Spacing = 6; - // Container child vbox67.Gtk.Box+BoxChild - this.generateWarningsCheckButton = new Gtk.CheckButton(); - this.generateWarningsCheckButton.Name = "generateWarningsCheckButton"; - this.generateWarningsCheckButton.Label = Mono.Unix.Catalog.GetString("Generate warnings"); - this.generateWarningsCheckButton.DrawIndicator = true; - this.generateWarningsCheckButton.UseUnderline = true; - this.vbox67.Add(this.generateWarningsCheckButton); - Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.vbox67[this.generateWarningsCheckButton])); - w32.Position = 0; - w32.Expand = false; - w32.Fill = false; - // Container child vbox67.Gtk.Box+BoxChild - this.deprecationCheckButton = new Gtk.CheckButton(); - this.deprecationCheckButton.Name = "deprecationCheckButton"; - this.deprecationCheckButton.Label = Mono.Unix.Catalog.GetString("Enable deprecation warnings"); - this.deprecationCheckButton.DrawIndicator = true; - this.deprecationCheckButton.UseUnderline = true; - this.vbox67.Add(this.deprecationCheckButton); - Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.vbox67[this.deprecationCheckButton])); - w33.Position = 1; - w33.Expand = false; - w33.Fill = false; - // Container child vbox67.Gtk.Box+BoxChild - this.warningsAsErrorsCheckButton = new Gtk.CheckButton(); - this.warningsAsErrorsCheckButton.Name = "warningsAsErrorsCheckButton"; - this.warningsAsErrorsCheckButton.Label = Mono.Unix.Catalog.GetString("Treat warnings as _errors"); - this.warningsAsErrorsCheckButton.DrawIndicator = true; - this.warningsAsErrorsCheckButton.UseUnderline = true; - this.vbox67.Add(this.warningsAsErrorsCheckButton); - Gtk.Box.BoxChild w34 = ((Gtk.Box.BoxChild)(this.vbox67[this.warningsAsErrorsCheckButton])); - w34.Position = 2; - w34.Expand = false; - w34.Fill = false; - this.hbox59.Add(this.vbox67); - Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(this.hbox59[this.vbox67])); - w35.Position = 1; - this.vbox69.Add(this.hbox59); - Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(this.vbox69[this.hbox59])); - w36.Position = 1; - this.hbox60.Add(this.vbox69); - Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.hbox60[this.vbox69])); - w37.Position = 1; - this.vbox62.Add(this.hbox60); - Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.vbox62[this.hbox60])); - w38.Position = 4; - this.Add(this.vbox62); - if ((this.Child != null)) { - this.Child.ShowAll(); - } - this.Show(); - } - } -} diff --git a/main/src/addins/JavaBinding/gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs b/main/src/addins/JavaBinding/gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs deleted file mode 100644 index e909ad1c99..0000000000 --- a/main/src/addins/JavaBinding/gtk-gui/JavaBinding.GlobalOptionsPanelWidget.cs +++ /dev/null @@ -1,229 +0,0 @@ -// ------------------------------------------------------------------------------ -// <autogenerated> -// This code was generated by a tool. -// Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </autogenerated> -// ------------------------------------------------------------------------------ - -namespace JavaBinding { - - - internal partial class GlobalOptionsPanelWidget { - - private Gtk.VBox vbox70; - - private Gtk.Label label96; - - private Gtk.HBox hbox63; - - private Gtk.Label label100; - - private Gtk.Table table9; - - private Gtk.Entry compilerPathEntry; - - private Gtk.HBox hbox64; - - private Gtk.ComboBox compilerCombo; - - private MonoDevelop.Components.FolderEntry ikvmPathEntry; - - private Gtk.Label label101; - - private Gtk.Label label98; - - private Gtk.Label label99; - - private Gtk.Label label97; - - private Gtk.HBox hbox65; - - private Gtk.Label label102; - - private Gtk.Table table10; - - private Gtk.Entry classpathEntry; - - private Gtk.Label label103; - - protected virtual void Build() { - Stetic.Gui.Initialize(this); - // Widget JavaBinding.GlobalOptionsPanelWidget - Stetic.BinContainer.Attach(this); - this.Name = "JavaBinding.GlobalOptionsPanelWidget"; - // Container child JavaBinding.GlobalOptionsPanelWidget.Gtk.Container+ContainerChild - this.vbox70 = new Gtk.VBox(); - this.vbox70.Name = "vbox70"; - this.vbox70.Spacing = 12; - // Container child vbox70.Gtk.Box+BoxChild - this.label96 = new Gtk.Label(); - this.label96.Name = "label96"; - this.label96.Xalign = 0F; - this.label96.LabelProp = Mono.Unix.Catalog.GetString("<b>Compiler</b>"); - this.label96.UseMarkup = true; - this.vbox70.Add(this.label96); - Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox70[this.label96])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; - // Container child vbox70.Gtk.Box+BoxChild - this.hbox63 = new Gtk.HBox(); - this.hbox63.Name = "hbox63"; - // Container child hbox63.Gtk.Box+BoxChild - this.label100 = new Gtk.Label(); - this.label100.WidthRequest = 18; - this.label100.Name = "label100"; - this.label100.LabelProp = ""; - this.hbox63.Add(this.label100); - Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox63[this.label100])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child hbox63.Gtk.Box+BoxChild - this.table9 = new Gtk.Table(((uint)(3)), ((uint)(2)), false); - this.table9.Name = "table9"; - this.table9.RowSpacing = ((uint)(6)); - this.table9.ColumnSpacing = ((uint)(6)); - // Container child table9.Gtk.Table+TableChild - this.compilerPathEntry = new Gtk.Entry(); - this.compilerPathEntry.Name = "compilerPathEntry"; - this.compilerPathEntry.IsEditable = true; - this.compilerPathEntry.InvisibleChar = '●'; - this.table9.Add(this.compilerPathEntry); - Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table9[this.compilerPathEntry])); - w3.TopAttach = ((uint)(2)); - w3.BottomAttach = ((uint)(3)); - w3.LeftAttach = ((uint)(1)); - w3.RightAttach = ((uint)(2)); - w3.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table9.Gtk.Table+TableChild - this.hbox64 = new Gtk.HBox(); - this.hbox64.Name = "hbox64"; - // Container child hbox64.Gtk.Box+BoxChild - this.compilerCombo = new Gtk.ComboBox(); - this.compilerCombo.Name = "compilerCombo"; - this.hbox64.Add(this.compilerCombo); - Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox64[this.compilerCombo])); - w4.Position = 0; - w4.Expand = false; - w4.Fill = false; - this.table9.Add(this.hbox64); - Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table9[this.hbox64])); - w5.TopAttach = ((uint)(1)); - w5.BottomAttach = ((uint)(2)); - w5.LeftAttach = ((uint)(1)); - w5.RightAttach = ((uint)(2)); - w5.YOptions = ((Gtk.AttachOptions)(4)); - // Container child table9.Gtk.Table+TableChild - this.ikvmPathEntry = new MonoDevelop.Components.FolderEntry(); - this.ikvmPathEntry.Name = "ikvmPathEntry"; - this.table9.Add(this.ikvmPathEntry); - Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table9[this.ikvmPathEntry])); - w6.LeftAttach = ((uint)(1)); - w6.RightAttach = ((uint)(2)); - w6.XOptions = ((Gtk.AttachOptions)(4)); - w6.YOptions = ((Gtk.AttachOptions)(4)); - // Container child table9.Gtk.Table+TableChild - this.label101 = new Gtk.Label(); - this.label101.Name = "label101"; - this.label101.Xalign = 0F; - this.label101.LabelProp = Mono.Unix.Catalog.GetString("Compiler command:"); - this.table9.Add(this.label101); - Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table9[this.label101])); - w7.TopAttach = ((uint)(2)); - w7.BottomAttach = ((uint)(3)); - w7.XOptions = ((Gtk.AttachOptions)(4)); - w7.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table9.Gtk.Table+TableChild - this.label98 = new Gtk.Label(); - this.label98.Name = "label98"; - this.label98.Xalign = 0F; - this.label98.LabelProp = Mono.Unix.Catalog.GetString("IKVM path:"); - this.table9.Add(this.label98); - Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table9[this.label98])); - w8.XOptions = ((Gtk.AttachOptions)(4)); - w8.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table9.Gtk.Table+TableChild - this.label99 = new Gtk.Label(); - this.label99.Name = "label99"; - this.label99.Xalign = 0F; - this.label99.LabelProp = Mono.Unix.Catalog.GetString("Java compiler:"); - this.table9.Add(this.label99); - Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table9[this.label99])); - w9.TopAttach = ((uint)(1)); - w9.BottomAttach = ((uint)(2)); - w9.XOptions = ((Gtk.AttachOptions)(4)); - w9.YOptions = ((Gtk.AttachOptions)(0)); - this.hbox63.Add(this.table9); - Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox63[this.table9])); - w10.Position = 1; - this.vbox70.Add(this.hbox63); - Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox70[this.hbox63])); - w11.Position = 1; - w11.Expand = false; - w11.Fill = false; - // Container child vbox70.Gtk.Box+BoxChild - this.label97 = new Gtk.Label(); - this.label97.Name = "label97"; - this.label97.Xalign = 0F; - this.label97.LabelProp = Mono.Unix.Catalog.GetString("<b>Code Generation</b>"); - this.label97.UseMarkup = true; - this.vbox70.Add(this.label97); - Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox70[this.label97])); - w12.Position = 2; - w12.Expand = false; - w12.Fill = false; - // Container child vbox70.Gtk.Box+BoxChild - this.hbox65 = new Gtk.HBox(); - this.hbox65.Name = "hbox65"; - // Container child hbox65.Gtk.Box+BoxChild - this.label102 = new Gtk.Label(); - this.label102.WidthRequest = 18; - this.label102.Name = "label102"; - this.label102.LabelProp = ""; - this.hbox65.Add(this.label102); - Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox65[this.label102])); - w13.Position = 0; - w13.Expand = false; - w13.Fill = false; - // Container child hbox65.Gtk.Box+BoxChild - this.table10 = new Gtk.Table(((uint)(1)), ((uint)(2)), false); - this.table10.Name = "table10"; - this.table10.RowSpacing = ((uint)(6)); - this.table10.ColumnSpacing = ((uint)(6)); - // Container child table10.Gtk.Table+TableChild - this.classpathEntry = new Gtk.Entry(); - this.classpathEntry.Name = "classpathEntry"; - this.classpathEntry.IsEditable = true; - this.classpathEntry.InvisibleChar = '●'; - this.table10.Add(this.classpathEntry); - Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table10[this.classpathEntry])); - w14.LeftAttach = ((uint)(1)); - w14.RightAttach = ((uint)(2)); - w14.YOptions = ((Gtk.AttachOptions)(0)); - // Container child table10.Gtk.Table+TableChild - this.label103 = new Gtk.Label(); - this.label103.Name = "label103"; - this.label103.Xalign = 0F; - this.label103.LabelProp = Mono.Unix.Catalog.GetString("Classpath:"); - this.table10.Add(this.label103); - Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.table10[this.label103])); - w15.XOptions = ((Gtk.AttachOptions)(4)); - w15.YOptions = ((Gtk.AttachOptions)(0)); - this.hbox65.Add(this.table10); - Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox65[this.table10])); - w16.Position = 1; - this.vbox70.Add(this.hbox65); - Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.vbox70[this.hbox65])); - w17.Position = 3; - this.Add(this.vbox70); - if ((this.Child != null)) { - this.Child.ShowAll(); - } - this.Show(); - } - } -} diff --git a/main/src/addins/JavaBinding/gtk-gui/generated.cs b/main/src/addins/JavaBinding/gtk-gui/generated.cs deleted file mode 100644 index 2fb22592af..0000000000 --- a/main/src/addins/JavaBinding/gtk-gui/generated.cs +++ /dev/null @@ -1,82 +0,0 @@ -// ------------------------------------------------------------------------------ -// <autogenerated> -// This code was generated by a tool. -// Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </autogenerated> -// ------------------------------------------------------------------------------ - -namespace Stetic { - - - internal class Gui { - - private static bool initialized; - - internal static void Initialize(Gtk.Widget iconRenderer) { - if ((Stetic.Gui.initialized == false)) { - Stetic.Gui.initialized = true; - } - } - } - - internal class BinContainer { - - private Gtk.Widget child; - - private Gtk.UIManager uimanager; - - public static BinContainer Attach(Gtk.Bin bin) { - BinContainer bc = new BinContainer(); - bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested); - bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated); - bin.Added += new Gtk.AddedHandler(bc.OnAdded); - return bc; - } - - private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) { - if ((this.child != null)) { - args.Requisition = this.child.SizeRequest(); - } - } - - private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) { - if ((this.child != null)) { - this.child.Allocation = args.Allocation; - } - } - - private void OnAdded(object sender, Gtk.AddedArgs args) { - this.child = args.Widget; - } - - public void SetUiManager(Gtk.UIManager uim) { - this.uimanager = uim; - this.child.Realized += new System.EventHandler(this.OnRealized); - } - - private void OnRealized(object sender, System.EventArgs args) { - if ((this.uimanager != null)) { - Gtk.Widget w; - w = this.child.Toplevel; - if (((w != null) && typeof(Gtk.Window).IsInstanceOfType(w))) { - ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup); - this.uimanager = null; - } - } - } - } - - internal class ActionGroups { - - public static Gtk.ActionGroup GetActionGroup(System.Type type) { - return Stetic.ActionGroups.GetActionGroup(type.FullName); - } - - public static Gtk.ActionGroup GetActionGroup(string name) { - return null; - } - } -} diff --git a/main/src/addins/JavaBinding/gtk-gui/gui.stetic b/main/src/addins/JavaBinding/gtk-gui/gui.stetic deleted file mode 100644 index efd5bbc25d..0000000000 --- a/main/src/addins/JavaBinding/gtk-gui/gui.stetic +++ /dev/null @@ -1,838 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<stetic-interface> - <configuration> - <images-root-path>..</images-root-path> - <target-gtk-version>2.8.3</target-gtk-version> - </configuration> - <import> - <widget-library name="../../../build/bin/MonoDevelop.Components.dll" /> - <widget-library name="../../../build/bin/MonoDevelop.Ide.dll" /> - </import> - <widget class="Gtk.Bin" id="JavaBinding.CodeGenerationPanelWidget" design-size="600 410"> - <property name="MemberName" /> - <property name="GeneratePublic">False</property> - <child> - <widget class="Gtk.VBox" id="vbox62"> - <property name="MemberName" /> - <property name="Spacing">12</property> - <child> - <widget class="Gtk.Label" id="label82"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Code Generation</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox56"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label81"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox65"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Table" id="table7"> - <property name="MemberName" /> - <property name="NRows">4</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Entry" id="classPathEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">0</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox61"> - <property name="MemberName" /> - <child> - <widget class="Gtk.ComboBox" id="compileTargetCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">False</property> - <property name="Items" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label86"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Compile _Target:</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label87"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Define S_ymbols:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">symbolsEntry</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label88"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">_Main Class:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">mainClassEntry</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label91"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Classpath:</property> - <property name="UseUnderline">True</property> - <property name="MnemonicWidget">classPathEntry</property> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="mainClassEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">0</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="symbolsEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">0</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label92"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Compiler</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox57"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label93"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox66"> - <property name="MemberName" /> - <child> - <widget class="Gtk.HBox" id="hbox58"> - <property name="MemberName" /> - <property name="Spacing">18</property> - <child> - <widget class="Gtk.RadioButton" id="compilerGcjButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">gcj</property> - <property name="Active">True</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <property name="Group">compilerGcjButton</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.RadioButton" id="compilerJavacButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">javac</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <property name="Group">compilerGcjButton</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="compilerEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">3</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox60"> - <property name="MemberName" /> - <child> - <widget class="Gtk.VBox" id="vbox68"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label90"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Options</b></property> - <property name="UseMarkup">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox47"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label72"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox64"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.CheckButton" id="enableOptimizationCheckButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">Enable _optimizations</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="generateDebugInformationCheckButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">Emit _debugging information</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox69"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.Label" id="label94"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Warnings</b></property> - <property name="UseMarkup">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox59"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label95"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.VBox" id="vbox67"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <widget class="Gtk.CheckButton" id="generateWarningsCheckButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">Generate warnings</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="deprecationCheckButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">Enable deprecation warnings</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.CheckButton" id="warningsAsErrorsCheckButton"> - <property name="MemberName" /> - <property name="Label" translatable="yes">Treat warnings as _errors</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">4</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <widget class="Gtk.Bin" id="JavaBinding.GlobalOptionsPanelWidget" design-size="349 182"> - <property name="MemberName" /> - <property name="GeneratePublic">False</property> - <child> - <widget class="Gtk.VBox" id="vbox70"> - <property name="MemberName" /> - <property name="Spacing">12</property> - <child> - <widget class="Gtk.Label" id="label96"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Compiler</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox63"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label100"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Table" id="table9"> - <property name="MemberName" /> - <property name="NRows">3</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Entry" id="compilerPathEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">0</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox64"> - <property name="MemberName" /> - <child> - <widget class="Gtk.ComboBox" id="compilerCombo"> - <property name="MemberName" /> - <property name="IsTextCombo">False</property> - <property name="Items" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="MonoDevelop.Components.FolderEntry" id="ikvmPathEntry"> - <property name="MemberName" /> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label101"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Compiler command:</property> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label98"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">IKVM path:</property> - </widget> - <packing> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label99"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Java compiler:</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label97"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes"><b>Code Generation</b></property> - <property name="UseMarkup">True</property> - </widget> - <packing> - <property name="Position">2</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.HBox" id="hbox65"> - <property name="MemberName" /> - <child> - <widget class="Gtk.Label" id="label102"> - <property name="MemberName" /> - <property name="WidthRequest">18</property> - <property name="LabelProp" translatable="yes" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">False</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Table" id="table10"> - <property name="MemberName" /> - <property name="NRows">1</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <widget class="Gtk.Entry" id="classpathEntry"> - <property name="MemberName" /> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">0</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Label" id="label103"> - <property name="MemberName" /> - <property name="Xalign">0</property> - <property name="LabelProp" translatable="yes">Classpath:</property> - </widget> - <packing> - <property name="AutoSize">False</property> - <property name="XOptions">Fill</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">1</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - <packing> - <property name="Position">3</property> - <property name="AutoSize">False</property> - </packing> - </child> - </widget> - </child> - </widget> -</stetic-interface>
\ No newline at end of file diff --git a/main/src/addins/JavaBinding/icons/Java.FileIcon b/main/src/addins/JavaBinding/icons/Java.FileIcon Binary files differdeleted file mode 100644 index 04429be655..0000000000 --- a/main/src/addins/JavaBinding/icons/Java.FileIcon +++ /dev/null diff --git a/main/src/addins/JavaBinding/icons/java-icon-32.png b/main/src/addins/JavaBinding/icons/java-icon-32.png Binary files differdeleted file mode 100644 index ce52b9db82..0000000000 --- a/main/src/addins/JavaBinding/icons/java-icon-32.png +++ /dev/null diff --git a/main/src/addins/JavaBinding/templates/EmptyJavaFile.xft.xml b/main/src/addins/JavaBinding/templates/EmptyJavaFile.xft.xml deleted file mode 100644 index c9a87ea5cf..0000000000 --- a/main/src/addins/JavaBinding/templates/EmptyJavaFile.xft.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="Java" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>Empty File</_Name> - <Icon>md-text-file-icon</Icon> - <Category>General</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates an empty Java file.</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="EmptyJavafile"> - <![CDATA[// created on ${Date} at ${Time}]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/EmptyJavaProject.xpt.xml b/main/src/addins/JavaBinding/templates/EmptyJavaProject.xpt.xml deleted file mode 100644 index fa01b71bc4..0000000000 --- a/main/src/addins/JavaBinding/templates/EmptyJavaProject.xpt.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "Gary Gray" - created = "09/05/2001" - lastModified = "02/01/2003"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>Empty Project</_Name> - <Category>Java</Category> - <Icon>md-project|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Creates an empty Java solution.</_Description> - </TemplateConfiguration> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Project name = "${ProjectName}" directory = "."/> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/IkvmConsoleApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/IkvmConsoleApplicationProject.xpt.xml deleted file mode 100644 index 01cdd0f063..0000000000 --- a/main/src/addins/JavaBinding/templates/IkvmConsoleApplicationProject.xpt.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "John Luke" - created = "04/06/2004" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>IKVM Console Project</_Name> - <Category>Java</Category> - <Icon>md-project-console|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a console Java project with IKVM</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <!-- FIXME: remove path to jar --> - <Options Target = "Exe" PauseConsoleOutput = "False" MainClass ="application" /> - - <Files> - <File name = "application.java"> -<![CDATA[/* - * application.java - * - * created on ${Date} at ${Time} - */ -import cli.System.*; - -public class application { - public static void main(java.lang.String[] args) { - Console.WriteLine ("Hello, World!"); - } -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/IkvmGladeApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/IkvmGladeApplicationProject.xpt.xml deleted file mode 100644 index b8eb879a5b..0000000000 --- a/main/src/addins/JavaBinding/templates/IkvmGladeApplicationProject.xpt.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "John Luke" - created = "04/06/2004" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>IKVM Glade# Project</_Name> - <Category>Java</Category> - <Icon>md-project-gui|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a Glade# Java project with IKVM</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <!-- FIXME: do not hardcode these --> - <Options Target = "WinExe" PauseConsoleOutput = "False" MainClass ="application" /> - - <References> - <Reference type="Gac" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="gdk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glib-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="pango-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - </References> - - <Files> - <File name = "application.java"> -<![CDATA[/* - * application.java - * - * created on ${Date} at ${Time} - */ -import cli.Gtk.*; -import cli.Glade.*; - -public class application { - public static void main (String[] args) { - Application.Init (); - Window w = new Window ("Hello Mono with Java#"); - Button b = new Button ("Click me"); - w.Add (b); - w.ShowAll (); - Application.Run (); - } -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/IkvmGnomeApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/IkvmGnomeApplicationProject.xpt.xml deleted file mode 100644 index 37f1256d66..0000000000 --- a/main/src/addins/JavaBinding/templates/IkvmGnomeApplicationProject.xpt.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "John Luke" - created = "04/06/2004" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>IKVM Gnome# Project</_Name> - <Category>Java</Category> - <Icon>md-project-gui|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a Gnome# Java project with IKVM</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <!-- FIXME: do not hardcode these --> - <Options Target = "WinExe" PauseConsoleOutput = "False" MainClass ="application" /> - - <References> - <Reference type="Gac" refto="gnome-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="gdk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glib-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="pango-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - </References> - - <Files> - <File name = "application.java"> -<![CDATA[/* - * application.java - * - * created on ${Date} at ${Time} - */ -import cli.Gnome.*; -import cli.Gtk.*; - -public class application { - public static void main (String[] args) { - Program p = new Program ("Name", "0.0", Modules.UI, args); - App app = new App ("Hello Mono with Java#", "0.0"); - Button b = new Button ("Click me"); - app.Add (b); - app.ShowAll (); - p.Run (); - } -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/IkvmGtkApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/IkvmGtkApplicationProject.xpt.xml deleted file mode 100644 index d2b411f4e4..0000000000 --- a/main/src/addins/JavaBinding/templates/IkvmGtkApplicationProject.xpt.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "John Luke" - created = "04/06/2004" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>IKVM Gtk# Project</_Name> - <Category>Java</Category> - <Icon>md-project-gui|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a Gtk# Java project with IKVM</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <!-- FIXME: do not hardcode these --> - <Options Target = "WinExe" PauseConsoleOutput = "False" MainClass ="application" /> - - <References> - <Reference type="Gac" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="gdk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glib-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="pango-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - </References> - - <Files> - <File name = "application.java"> -<![CDATA[/* - * application.java - * - * created on ${Date} at ${Time} - */ -import cli.Gtk.*; - -public class application { - public static void main (String[] args) { - Application.Init (); - Window w = new Window ("Hello Mono with Java#"); - Button b = new Button ("Click me"); - w.Add (b); - w.ShowAll (); - Application.Run (); - } -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/IkvmLibraryProject.xpt.xml b/main/src/addins/JavaBinding/templates/IkvmLibraryProject.xpt.xml deleted file mode 100644 index 7a8a65f90f..0000000000 --- a/main/src/addins/JavaBinding/templates/IkvmLibraryProject.xpt.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "John Luke" - created = "04/06/2004" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>IKVM Library</_Name> - <Category>Java</Category> - <Icon>md-project-library|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a Java library with IKVM</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "MyClass.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <References> - <Reference type="Gac" refto="gtk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="gdk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="glib-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - <Reference type="Gac" refto="atk-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> - </References> - - <Options Target = "Library" PauseConsoleOutput = "False" /> - - <Files> - <File name = "MyClass.java"> -<![CDATA[/* - * MyClass.java - * - * created on ${Date} at ${Time} - */ - -public class MyClass -{ -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaApplet.xft.xml b/main/src/addins/JavaBinding/templates/JavaApplet.xft.xml deleted file mode 100644 index 9671603ac0..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaApplet.xft.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>AWT Applet</_Name> - <Icon>md-html-file-icon</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT Applet</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="Applet"> - -<![CDATA[ -/* - * applet.java - * - * created on ${Date} at ${Time} - */ - -public class applet extends java.applet.Applet { - - /** Initializes the applet applet */ - public void init() { - initComponents(); - } - - /** This method is called from within the init() method to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - setLayout(new java.awt.BorderLayout()); - - }//GEN-END:initComponents - - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - -}]]> - </File> - <File DefaultExtension=".html" DefaultName="Applet"> - -<![CDATA[ -<HTML> -<HEAD> - <TITLE>Applet HTML Page</TITLE> -</HEAD> -<BODY> - -<H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3> - -<P> -<APPLET code="applet.class" width=350 height=200></APPLET> -</P> - -<HR WIDTH="100%"><FONT SIZE=-1><I>Generated by SharpDevelop IDE</I></FONT> -</BODY> -</HTML> - -]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaApplication.xft.xml b/main/src/addins/JavaBinding/templates/JavaApplication.xft.xml deleted file mode 100644 index bc45f9e3c9..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaApplication.xft.xml +++ /dev/null @@ -1,146 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>AWT Application</_Name> - <Icon>md-gui-file</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT application.</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="Application"> - -<![CDATA[ -/* - * application.java - * - * created on ${Date} at ${Time} - */ - -public class application extends javax.swing.JFrame { - - /** Creates new form application */ - public application() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - menuBar = new javax.swing.JMenuBar(); - - fileMenu = new javax.swing.JMenu(); - fileMenu.setText("File"); - - openMenuItem = new javax.swing.JMenuItem(); - openMenuItem.setText("Open"); - - fileMenu.add(openMenuItem); - saveMenuItem = new javax.swing.JMenuItem(); - saveMenuItem.setText("Save"); - - fileMenu.add(saveMenuItem); - saveAsMenuItem = new javax.swing.JMenuItem(); - saveAsMenuItem.setText("Save As ..."); - - fileMenu.add(saveAsMenuItem); - exitMenuItem = new javax.swing.JMenuItem(); - exitMenuItem.setText("Exit"); - exitMenuItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - exitMenuItemActionPerformed(evt); - } - } - ); - - fileMenu.add(exitMenuItem); - menuBar.add(fileMenu); - editMenu = new javax.swing.JMenu(); - editMenu.setText("Edit"); - - cutMenuItem = new javax.swing.JMenuItem(); - cutMenuItem.setText("Cut"); - - editMenu.add(cutMenuItem); - copyMenuItem = new javax.swing.JMenuItem(); - copyMenuItem.setText("Copy"); - - editMenu.add(copyMenuItem); - pasteMenuItem = new javax.swing.JMenuItem(); - pasteMenuItem.setText("Paste"); - - editMenu.add(pasteMenuItem); - deleteMenuItem = new javax.swing.JMenuItem(); - deleteMenuItem.setText("Delete"); - - editMenu.add(deleteMenuItem); - menuBar.add(editMenu); - helpMenu = new javax.swing.JMenu(); - helpMenu.setText("Help"); - - contentsMenuItem = new javax.swing.JMenuItem(); - contentsMenuItem.setText("Contents"); - - helpMenu.add(contentsMenuItem); - aboutMenuItem = new javax.swing.JMenuItem(); - aboutMenuItem.setText("About"); - - helpMenu.add(aboutMenuItem); - menuBar.add(helpMenu); - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - exitForm(evt); - } - } - ); - - setJMenuBar(menuBar); - - pack(); - }//GEN-END:initComponents - - private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed - System.exit(0); - }//GEN-LAST:event_exitMenuItemActionPerformed - - /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm - System.exit(0); - }//GEN-LAST:event_exitForm - - /** - * param args the command line arguments - */ - public static void main(String args[]) { - new application().show(); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JMenuBar menuBar; - private javax.swing.JMenu fileMenu; - private javax.swing.JMenuItem openMenuItem; - private javax.swing.JMenuItem saveMenuItem; - private javax.swing.JMenuItem saveAsMenuItem; - private javax.swing.JMenuItem exitMenuItem; - private javax.swing.JMenu editMenu; - private javax.swing.JMenuItem cutMenuItem; - private javax.swing.JMenuItem copyMenuItem; - private javax.swing.JMenuItem pasteMenuItem; - private javax.swing.JMenuItem deleteMenuItem; - private javax.swing.JMenu helpMenu; - private javax.swing.JMenuItem contentsMenuItem; - private javax.swing.JMenuItem aboutMenuItem; - // End of variables declaration//GEN-END:variables - -}]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/JavaApplicationProject.xpt.xml deleted file mode 100644 index b80ec9add6..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaApplicationProject.xpt.xml +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "Gary Gray" - created = "09/05/2001" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>AWT Project</_Name> - <Category>Java</Category> - <Icon>md-project-gui|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT project.</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <Options Target = "Exe" PauseConsoleOutput = "False" ClassPath = "" MainClass ="application" /> - - <Files> - <File name = "application.java"> -<![CDATA[ -/* - * application.java - * - * created on ${Date} at ${Time} - */ - -public class application extends javax.swing.JFrame { - - /** Creates new form application */ - public application() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - menuBar = new javax.swing.JMenuBar(); - - fileMenu = new javax.swing.JMenu(); - fileMenu.setText("File"); - - openMenuItem = new javax.swing.JMenuItem(); - openMenuItem.setText("Open"); - - fileMenu.add(openMenuItem); - saveMenuItem = new javax.swing.JMenuItem(); - saveMenuItem.setText("Save"); - - fileMenu.add(saveMenuItem); - saveAsMenuItem = new javax.swing.JMenuItem(); - saveAsMenuItem.setText("Save As ..."); - - fileMenu.add(saveAsMenuItem); - exitMenuItem = new javax.swing.JMenuItem(); - exitMenuItem.setText("Exit"); - exitMenuItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - exitMenuItemActionPerformed(evt); - } - } - ); - - fileMenu.add(exitMenuItem); - menuBar.add(fileMenu); - editMenu = new javax.swing.JMenu(); - editMenu.setText("Edit"); - - cutMenuItem = new javax.swing.JMenuItem(); - cutMenuItem.setText("Cut"); - - editMenu.add(cutMenuItem); - copyMenuItem = new javax.swing.JMenuItem(); - copyMenuItem.setText("Copy"); - - editMenu.add(copyMenuItem); - pasteMenuItem = new javax.swing.JMenuItem(); - pasteMenuItem.setText("Paste"); - - editMenu.add(pasteMenuItem); - deleteMenuItem = new javax.swing.JMenuItem(); - deleteMenuItem.setText("Delete"); - - editMenu.add(deleteMenuItem); - menuBar.add(editMenu); - helpMenu = new javax.swing.JMenu(); - helpMenu.setText("Help"); - - contentsMenuItem = new javax.swing.JMenuItem(); - contentsMenuItem.setText("Contents"); - - helpMenu.add(contentsMenuItem); - aboutMenuItem = new javax.swing.JMenuItem(); - aboutMenuItem.setText("About"); - - helpMenu.add(aboutMenuItem); - menuBar.add(helpMenu); - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - exitForm(evt); - } - } - ); - - setJMenuBar(menuBar); - - pack(); - }//GEN-END:initComponents - - private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed - System.exit(0); - }//GEN-LAST:event_exitMenuItemActionPerformed - - /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm - System.exit(0); - }//GEN-LAST:event_exitForm - - /** - * param args the command line arguments - */ - public static void main(String args[]) { - new application().show(); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JMenuBar menuBar; - private javax.swing.JMenu fileMenu; - private javax.swing.JMenuItem openMenuItem; - private javax.swing.JMenuItem saveMenuItem; - private javax.swing.JMenuItem saveAsMenuItem; - private javax.swing.JMenuItem exitMenuItem; - private javax.swing.JMenu editMenu; - private javax.swing.JMenuItem cutMenuItem; - private javax.swing.JMenuItem copyMenuItem; - private javax.swing.JMenuItem pasteMenuItem; - private javax.swing.JMenuItem deleteMenuItem; - private javax.swing.JMenu helpMenu; - private javax.swing.JMenuItem contentsMenuItem; - private javax.swing.JMenuItem aboutMenuItem; - // End of variables declaration//GEN-END:variables - -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaConsoleApplicationProject.xpt.xml b/main/src/addins/JavaBinding/templates/JavaConsoleApplicationProject.xpt.xml deleted file mode 100644 index 016a83cd86..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaConsoleApplicationProject.xpt.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<Template originator = "Shinsaku Nakagawa" - created = "03/27/2003" - lastModified = "04/06/2004"> - - <!-- Template Header --> - <TemplateConfiguration> - <_Name>Console Project</_Name> - <Category>Java</Category> - <Icon>md-project-console|res:java-icon-32.png</Icon> - <LanguageName>Java</LanguageName> - <_Description>Create a console Java project</_Description> - </TemplateConfiguration> - - <!-- Actions --> - <Actions> - <Open filename = "application.java"/> - </Actions> - - <!-- Template Content --> - <Combine name = "${ProjectName}" directory = "."> - <Options> - <StartupProject>${ProjectName}</StartupProject> - </Options> - - <Project name = "${ProjectName}" directory = "."> - <Options Target = "Exe" PauseConsoleOutput = "False" ClassPath = "" MainClass ="application" /> - - <Files> - <File name = "application.java"> -<![CDATA[/* - * application.java - * - * created on ${Date} at ${Time} - */ - -public class application { - public static void main(String[] args) { - System.out.println("Hello, World!"); - } -}]]></File> - </Files> - </Project> - </Combine> -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaDialog.xft.xml b/main/src/addins/JavaBinding/templates/JavaDialog.xft.xml deleted file mode 100644 index 51b6d61502..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaDialog.xft.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>Java AWT Dialog</_Name> - <Icon>md-gui-file</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates an AWT dialog.</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="Dialog"> - -<![CDATA[ -/* - * dialog.java - * - * created on ${Date} at ${Time} - */ - -public class dialog extends java.awt.Dialog { - - /** Creates new form dialog */ - public dialog(java.awt.Frame parent, boolean modal) { - super(parent, modal); - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - setLayout(new java.awt.BorderLayout()); - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - closeDialog(evt); - } - } - ); - pack(); - }//GEN-END:initComponents - - /** Closes the dialog */ - private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog - setVisible(false); - dispose(); - }//GEN-LAST:event_closeDialog - - /** - * param args the command line arguments - */ - public static void main(String args[]) { - new dialog(new java.awt.Frame(), true).show(); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - -}]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaFrame.xft.xml b/main/src/addins/JavaBinding/templates/JavaFrame.xft.xml deleted file mode 100644 index 9ccc60dd68..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaFrame.xft.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>AWT Frame</_Name> - <Icon>md-gui-file</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT Frame</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="Frame"> - -<![CDATA[ -/* - * frame.java - * - * created on ${Date} at ${Time} - */ - -public class frame extends java.awt.Frame { - - /** Creates new form frame */ - public frame() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - exitForm(evt); - } - } - ); - pack(); - }//GEN-END:initComponents - - /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm - System.exit(0); - }//GEN-LAST:event_exitForm - - /** - * param args the command line arguments - */ - public static void main(String args[]) { - new frame().show(); - } - - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - -} -]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaOKDialog.xft.xml b/main/src/addins/JavaBinding/templates/JavaOKDialog.xft.xml deleted file mode 100644 index e474c28c8f..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaOKDialog.xft.xml +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>AWT OK Dialog</_Name> - <Icon>md-gui-file</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT OK Dialog.</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="OKDialog"> - -<![CDATA[ -/* - * OKDialog.java - * - * created on ${Date} at ${Time} - */ - -public class OKDialog extends javax.swing.JDialog { - /** A return status code - returned if Cancel button has been pressed */ - public static final int RET_CANCEL = 0; - /** A return status code - returned if OK button has been pressed */ - public static final int RET_OK = 1; - - /** Creates new form OKDialog */ - public OKDialog(java.awt.Frame parent, boolean modal) { - super(parent, modal); - initComponents(); - } - - /** return the return status of this dialog - one of RET_OK or RET_CANCEL */ - public int getReturnStatus() { - return returnStatus; - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - closeDialog(evt); - } - } - ); - - buttonPanel = new javax.swing.JPanel(); - buttonPanel.setLayout(new java.awt.FlowLayout(2, 5, 5)); - - okButton = new javax.swing.JButton(); - okButton.setText("OK"); - okButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - okButtonActionPerformed(evt); - } - } - ); - - buttonPanel.add(okButton); - - cancelButton = new javax.swing.JButton(); - cancelButton.setText("Cancel"); - cancelButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - cancelButtonActionPerformed(evt); - } - } - ); - - buttonPanel.add(cancelButton); - - - getContentPane().add(buttonPanel, java.awt.BorderLayout.SOUTH); - - pack(); - }//GEN-END:initComponents - - private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed - doClose(RET_OK); - }//GEN-LAST:event_okButtonActionPerformed - - private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed - doClose(RET_CANCEL); - }//GEN-LAST:event_cancelButtonActionPerformed - - /** Closes the dialog */ - private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog - doClose(RET_CANCEL); - }//GEN-LAST:event_closeDialog - - private void doClose(int retStatus) { - returnStatus = retStatus; - setVisible(false); - dispose(); - } - - /** - * param args the command line arguments - */ - public static void main(String args[]) { - new OKDialog(new javax.swing.JFrame(), true).show(); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel buttonPanel; - private javax.swing.JButton okButton; - private javax.swing.JButton cancelButton; - // End of variables declaration//GEN-END:variables - - private int returnStatus = RET_CANCEL; -}]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> diff --git a/main/src/addins/JavaBinding/templates/JavaPanel.xft.xml b/main/src/addins/JavaBinding/templates/JavaPanel.xft.xml deleted file mode 100644 index 9e10393aff..0000000000 --- a/main/src/addins/JavaBinding/templates/JavaPanel.xft.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> -<Template Originator="Gary Gray" Language="JAVA" Created="09/05/2001" LastModified="09/05/2001"> - - <TemplateConfiguration> - <_Name>AWT Panel</_Name> - <Icon>md-gui-file</Icon> - <Category>AWT</Category> - <LanguageName>Java</LanguageName> - <_Description>Creates a Java AWT panel.</_Description> - </TemplateConfiguration> - - <TemplateFiles> - <File DefaultExtension=".java" DefaultName="Panel"> - -<![CDATA[ -/* - * panel.java - * - * created on ${Date} at ${Time} - */ - -/** - * - * author Administrator - */ -public class panel extends java.awt.Panel { - - /** Creates new form panel */ - public panel() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - setLayout(new java.awt.BorderLayout()); - - }//GEN-END:initComponents - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - -} -]]> - </File> - </TemplateFiles> - - <FileOptions/> - -</Template> |