[Monodevelop-patches-list] r1417 - in trunk/MonoDevelop: . build/AddIns/AddIns/BackendBindings build/data/templates/file build/data/templates/file/Nemerle build/data/templates/project build/data/templates/project/Nemerle data/resources/glade src/AddIns/BackendBindings src/AddIns/BackendBindings/NemerleBinding src/AddIns/BackendBindings/NemerleBinding/Gui src/AddIns/BackendBindings/NemerleBinding/Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Apr 9 07:31:40 EDT 2004
Author: pawel
Date: 2004-04-09 07:31:40 -0400 (Fri, 09 Apr 2004)
New Revision: 1417
Added:
trunk/MonoDevelop/build/data/templates/file/Nemerle/
trunk/MonoDevelop/build/data/templates/file/Nemerle/EmptyNemerleFile.xft
trunk/MonoDevelop/build/data/templates/file/Nemerle/Makefile.am
trunk/MonoDevelop/build/data/templates/project/Nemerle/
trunk/MonoDevelop/build/data/templates/project/Nemerle/EmptyProject.xpt
trunk/MonoDevelop/build/data/templates/project/Nemerle/Makefile.am
trunk/MonoDevelop/data/resources/glade/Nemerle.glade
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/CodeGenerationPanel.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/OutputPanel.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Makefile.am
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingCompilerServices.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingExecutionServices.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleParameters.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleProject.cs
Modified:
trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
trunk/MonoDevelop/build/data/templates/file/Makefile.am
trunk/MonoDevelop/build/data/templates/project/Makefile.am
trunk/MonoDevelop/configure.in
trunk/MonoDevelop/src/AddIns/BackendBindings/Makefile.am
Log:
Initial Nemerle binding with templates
Modified: trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
===================================================================
--- trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-04-09 11:31:40 UTC (rev 1417)
@@ -10,6 +10,7 @@
<Import assembly = "JavaBinding.dll"/>
<!-- ORIGINAL #D COMMENT <Import assembly = "JScriptLanguageModule.dll"/> -->
<!-- <Import assembly = "VBNetBinding.dll"/> -->
+ <Import assembly = "NemerleBinding.dll"/>
</Runtime>
<Extension path = "/SharpDevelop/Workbench/Ambiences">
@@ -62,6 +63,10 @@
insertbefore="AllFiles"
name = "${res:SharpDevelop.FileFilter.XmlForms}"
extensions = "*.xfrm"/>
+ <FileFilter id = "Nemerle"
+ insertbefore="AllFiles"
+ name = "Nemerle files"
+ extensions = "*.n"/>
</Extension>
<Extension path = "/Workspace/Parser">
@@ -106,6 +111,14 @@
class = "JavaBinding.ProjectConfigurationPropertyPanel"/>
</Conditional>
+ <Conditional activeproject="Nemerle">
+ <DialogPanel id = "NemerleCodeGenerationPanel"
+ _label = "Code Generation"
+ class = "NemerleBinding.CodeGenerationPanel"/>
+ <DialogPanel id = "NemerleOutputPanel"
+ _label = "Output"
+ class = "NemerleBinding.OutputPanel"/>
+ </Conditional>
</Extension>
@@ -182,6 +195,15 @@
<Icon id = "TextFileIcon"
extensions = ".txt,.doc"
resource = "Icons.16x16.TextFileIcon"/>
+
+ <!-- Nemerle -->
+ <Icon id = "NemerlePrj"
+ language = "Nemerle"
+ resource = "Java.ProjectIcon"/>
+ <Icon id = "NemerleFile"
+ extensions = ".n"
+ resource = "Java.FileIcon"/>
+
</Extension>
<Extension path = "/SharpDevelop/Workbench/LanguageBindings">
@@ -197,6 +219,9 @@
<!--ORIGINAL #D COMMENT <LanguageBinding id = "JScript"
supportedextensions = ".js"
class = "JScriptBinding.JScriptLanguageBinding" /> -->
+ <LanguageBinding id = "Nemerle"
+ supportedextensions = ".n"
+ class = "NemerleBinding.NemerleLanguageBinding" />
</Extension>
<Extension path = "/SharpDevelop/Views/ProjectBrowser/NodeBuilders">
Modified: trunk/MonoDevelop/build/data/templates/file/Makefile.am
===================================================================
--- trunk/MonoDevelop/build/data/templates/file/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/file/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -1,4 +1,4 @@
-SUBDIRS = CSharp SharpDevelop VBNet
+SUBDIRS = CSharp SharpDevelop VBNet Nemerle
monodevelopdir = $(prefix)/lib/monodevelop
templatedir = $(monodevelopdir)/data/templates/file
Added: trunk/MonoDevelop/build/data/templates/file/Nemerle/EmptyNemerleFile.xft
===================================================================
--- trunk/MonoDevelop/build/data/templates/file/Nemerle/EmptyNemerleFile.xft 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/file/Nemerle/EmptyNemerleFile.xft 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template Originator = "Pawel Rozanski"
+ Language = "Nemerle"
+ Created = "04/04/2004"
+ LastModified = "04/04/2004">
+
+ <TemplateConfiguration>
+ <Name>Empty Nemerle file</Name>
+ <Icon>C#.File.EmptyFile</Icon>
+ <Category>Nemerle</Category>
+ <LanguageName>Nemerle</LanguageName>
+ <Description>Empty Nemerle file</Description>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".n" DefaultName="EmptyNemerlefile">
+ <![CDATA[// created on ${Date} at ${Time}]]>
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
Added: trunk/MonoDevelop/build/data/templates/file/Nemerle/Makefile.am
===================================================================
--- trunk/MonoDevelop/build/data/templates/file/Nemerle/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/file/Nemerle/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,12 @@
+
+monodevelopdir = $(prefix)/lib/monodevelop
+cstemplatedir = $(monodevelopdir)/data/templates/file/Nemerle
+
+cstemplate_DATA = \
+ EmptyNemerleFile.xft
+
+all:
+
+
+EXTRA_DIST = $(cstemplate_DATA)
+
Modified: trunk/MonoDevelop/build/data/templates/project/Makefile.am
===================================================================
--- trunk/MonoDevelop/build/data/templates/project/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/project/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -1,4 +1,4 @@
-SUBDIRS = Java CSharp Misc VBNet
+SUBDIRS = Java CSharp Misc VBNet Nemerle
all:
Added: trunk/MonoDevelop/build/data/templates/project/Nemerle/EmptyProject.xpt
===================================================================
--- trunk/MonoDevelop/build/data/templates/project/Nemerle/EmptyProject.xpt 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/project/Nemerle/EmptyProject.xpt 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<Template originator = "Pawel Rozanski"
+ created = "04/04/2004"
+ lastModified = "04/04/2004">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <Name>Empty Nemerle project</Name>
+ <Category>Nemerle</Category>
+ <Icon>C#.Project.EmptyProject</Icon>
+ <LanguageName>Nemerle</LanguageName>
+ <Description>Empty Nemerle project</Description>
+ </TemplateConfiguration>
+
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "."/>
+ </Combine>
+</Template>
Added: trunk/MonoDevelop/build/data/templates/project/Nemerle/Makefile.am
===================================================================
--- trunk/MonoDevelop/build/data/templates/project/Nemerle/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/build/data/templates/project/Nemerle/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,12 @@
+
+monodevelopdir = $(prefix)/lib/monodevelop
+cstemplatedir = $(monodevelopdir)/data/templates/project/Nemerle
+
+cstemplate_DATA = \
+ EmptyProject.xpt
+
+all:
+
+
+EXTRA_DIST = $(cstemplate_DATA)
+
Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/configure.in 2004-04-09 11:31:40 UTC (rev 1417)
@@ -133,6 +133,7 @@
src/AddIns/BackendBindings/Makefile
src/AddIns/BackendBindings/CSharpBinding/Makefile
src/AddIns/BackendBindings/JavaBinding/Makefile
+src/AddIns/BackendBindings/NemerleBinding/Makefile
src/AddIns/DisplayBindings/Makefile
src/AddIns/DisplayBindings/SourceEditor/Makefile
src/AddIns/Misc/Makefile
@@ -162,11 +163,13 @@
build/data/templates/file/Makefile
build/data/templates/file/CSharp/Makefile
build/data/templates/file/SharpDevelop/Makefile
+build/data/templates/file/Nemerle/Makefile
build/data/templates/file/VBNet/Makefile
build/data/templates/project/Makefile
build/data/templates/project/CSharp/Makefile
build/data/templates/project/Java/Makefile
build/data/templates/project/Misc/Makefile
+build/data/templates/project/Nemerle/Makefile
build/data/templates/project/VBNet/Makefile
build/doc/Makefile
build/AddIns/Makefile
Added: trunk/MonoDevelop/data/resources/glade/Nemerle.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/Nemerle.glade 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/data/resources/glade/Nemerle.glade 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,723 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="CodeGenerationPanel">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">CodeGenerationPanel</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox62">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label82">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Code Generation</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox56">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label81">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox65">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkTable" id="table7">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label86">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Compile _Target</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">target</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="target">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+
+ <child>
+ <widget class="GtkMenuItem" id="Executable">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Executable</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="Library">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Library</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="nostdmacros">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Do not load standard macros</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="nostdlib">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Do not load standard library</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label101">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Optimizations</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox59">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label102">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox70">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="ot">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">General tail call optimization</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="oocm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Ordinal constant matching optimization</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="oscm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">String constant matching optimization</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="obcm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Boolean constant matching optimization</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkWindow" id="OutputPanel">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">OutputPanel</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <accessibility>
+ <atkproperty name="AtkObject::accessible_name" translatable="yes">OutputPanel</atkproperty>
+ </accessibility>
+
+ <child>
+ <widget class="GtkVBox" id="vbox66">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label93">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Output</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox57">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label91">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox69">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkTable" id="table10">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label98">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Assembly _name</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">assemblyName</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label99">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Output _path</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">outputPath</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label100">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Paramet_ers</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">parameters</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="outputPath">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="outputPathButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="assemblyName">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="parameters">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label94">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Execute scripts </b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox58">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label92">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table9">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label95">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Execute Command</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="executeCommand">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -1 +1 @@
-SUBDIRS = CSharpBinding JavaBinding
+SUBDIRS = CSharpBinding JavaBinding NemerleBinding
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/CodeGenerationPanel.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/CodeGenerationPanel.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,70 @@
+using System;
+using System.IO;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+
+using Gtk;
+using MonoDevelop.Gui.Widgets;
+
+namespace NemerleBinding
+{
+ public class CodeGenerationPanel : AbstractOptionPanel
+ {
+ class CodeGenerationPanelWidget : GladeWidgetExtract
+ {
+ [Glade.Widget] OptionMenu target;
+ [Glade.Widget] CheckButton nostdmacros;
+ [Glade.Widget] CheckButton nostdlib;
+ [Glade.Widget] CheckButton ot;
+ [Glade.Widget] CheckButton obcm;
+ [Glade.Widget] CheckButton oocm;
+ [Glade.Widget] CheckButton oscm;
+
+ NemerleParameters compilerParameters = null;
+
+ public CodeGenerationPanelWidget(IProperties CustomizationObject) : base ("Nemerle.glade", "CodeGenerationPanel")
+ {
+ compilerParameters = (NemerleParameters)((IProperties)CustomizationObject).GetProperty("Config");
+
+ target.SetHistory ( (uint) compilerParameters.Target);
+
+ nostdmacros.Active = compilerParameters.Nostdmacros;
+ nostdlib.Active = compilerParameters.Nostdlib;
+ ot.Active = compilerParameters.Ot;
+ obcm.Active = compilerParameters.Obcm;
+ oocm.Active = compilerParameters.Oocm;
+ oscm.Active = compilerParameters.Oscm;
+ }
+
+ public bool Store ()
+ {
+ compilerParameters.Target = (NemerleBinding.CompileTarget)target.History;
+ compilerParameters.Nostdmacros = nostdmacros.Active;
+ compilerParameters.Nostdlib = nostdlib.Active;
+ compilerParameters.Ot = ot.Active;
+ compilerParameters.Obcm = obcm.Active;
+ compilerParameters.Oocm = oocm.Active;
+ compilerParameters.Oscm = oscm.Active;
+ return true;
+ }
+ }
+
+ CodeGenerationPanelWidget widget;
+
+ public override void LoadPanelContents()
+ {
+ Add (widget = new CodeGenerationPanelWidget ((IProperties) CustomizationObject));
+ }
+
+ public override bool StorePanelContents()
+ {
+ return widget.Store ();
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/OutputPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/OutputPanel.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Gui/OutputPanel.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,71 @@
+using System;
+using System.IO;
+using System.Drawing;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+
+using Gtk;
+using MonoDevelop.Gui.Widgets;
+
+namespace NemerleBinding
+{
+ public class OutputPanel : AbstractOptionPanel
+ {
+ class OutputPanelWidget : GladeWidgetExtract
+ {
+ [Glade.Widget] Entry assemblyName;
+ [Glade.Widget] Entry outputPath;
+ [Glade.Widget] Entry parameters;
+ [Glade.Widget] Entry executeCommand;
+ [Glade.Widget] Button outputPathButton;
+
+ NemerleParameters compilerParameters = null;
+
+ public OutputPanelWidget(IProperties CustomizationObject) : base ("Nemerle.glade", "OutputPanel")
+ {
+ compilerParameters = (NemerleParameters)((IProperties)CustomizationObject).GetProperty("Config");
+
+ outputPathButton.Clicked += new EventHandler(SelectFolder);
+ assemblyName.Text = compilerParameters.AssemblyName;
+ outputPath.Text = compilerParameters.OutputPath;
+ parameters.Text = compilerParameters.Parameters;
+ executeCommand.Text = compilerParameters.ExecuteCommand;
+ }
+
+ public bool Store ()
+ {
+ compilerParameters.AssemblyName = assemblyName.Text;
+ compilerParameters.OutputPath = outputPath.Text;
+ compilerParameters.Parameters = parameters.Text;
+ compilerParameters.ExecuteCommand = executeCommand.Text;
+ return true;
+ }
+ void SelectFolder(object sender, EventArgs e)
+ {
+ using (FileSelection fdiag = new FileSelection ("Output Path"))
+ {
+ if (fdiag.Run () == (int) ResponseType.Ok)
+ outputPath.Text = fdiag.Filename;
+ fdiag.Hide();
+ }
+ }
+ }
+
+ OutputPanelWidget widget;
+
+ public override void LoadPanelContents()
+ {
+ Add (widget = new OutputPanelWidget ((IProperties) CustomizationObject));
+ }
+
+ public override bool StorePanelContents()
+ {
+ return widget.Store ();
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Makefile.am 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Makefile.am 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,36 @@
+
+CSC = mcs /debug
+ASSEMBLY = NemerleBinding.dll
+
+DLLS = /r:System.Drawing.dll \
+ /r:../../../../build/bin/MonoDevelop.Core.dll \
+ /r:../../../../build/bin/MonoDevelop.SourceEditor.dll \
+ /r:../../../../build/bin/MonoDevelop.Base.dll \
+ /r:../../../../build/bin/ICSharpCode.SharpRefactory.dll \
+ /r:../../../../build/bin/MonoDevelop.Gui.Widgets.dll \
+ /r:gtk-sharp.dll \
+ /r:glade-sharp.dll
+
+FILES = \
+./Gui/CodeGenerationPanel.cs \
+./Gui/OutputPanel.cs \
+./Project/NemerleParameters.cs \
+./Project/NemerleProject.cs \
+./NemerleBindingExecutionServices.cs \
+./NemerleBindingCompilerServices.cs \
+./NemerleLanguageBinding.cs
+
+build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+all: $(ASSEMBLY)
+
+$(ASSEMBLY): $(FILES) $(srcdir)/../../../../data/resources/glade/Nemerle.glade
+ $(CSC) $(DLLS) $(build_sources) /out:$(ASSEMBLY) /target:library \
+ /resource:$(srcdir)/../../../../data/resources/glade/Nemerle.glade,Nemerle.glade \
+ && cp $(ASSEMBLY) ../../../../build/AddIns/AddIns/BackendBindings/.
+
+assemblydir = $(libdir)/monodevelop/AddIns/AddIns/BackendBindings/
+assembly_DATA = $(ASSEMBLY)
+
+CLEANFILES = $(ASSEMBLY)
+EXTRA_DIST = $(FILES)
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingCompilerServices.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingCompilerServices.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingCompilerServices.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,163 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.CodeDom.Compiler;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Internal.Project;
+
+namespace NemerleBinding
+{
+ public class NemerleBindingCompilerServices
+ {
+ FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ static string ncc = "ncc -q -no-color";
+
+ private string GetOptionsString(NemerleParameters cp)
+ {
+ string options = "";
+ if (cp.Nostdmacros)
+ options += " -no-stdmacros";
+ if (cp.Nostdlib)
+ options += " -no-stdlib";
+ if (cp.Ot)
+ options += " -Ot";
+ if (cp.Obcm)
+ options += " -Obcm";
+ if (cp.Oocm)
+ options += " -Oocm";
+ if (cp.Oscm)
+ options += " -Oscm";
+ if ((int)cp.Target == 1)
+ options += " -tdll";
+
+ return options;
+ }
+
+ public bool CanCompile(string fileName)
+ {
+ return Path.GetExtension(fileName) == ".n";
+ }
+
+ public ICompilerResult CompileFile(string fileName)
+ {
+ throw new ApplicationException("No CompileFile");
+ }
+
+ public string GetCompiledOutputName(string fileName)
+ {
+ throw new ApplicationException("No CompileFile");
+ }
+
+ public string GetCompiledOutputName(IProject project)
+ {
+ NemerleParameters cp = (NemerleParameters)project.ActiveConfiguration;
+
+ return fileUtilityService.GetDirectoryNameWithSeparator(cp.OutputPath)
+ + cp.AssemblyName + ((int)cp.Target == 0?".exe":".dll");
+ }
+
+ public ICompilerResult CompileProject(IProject project)
+ {
+ NemerleParameters cp = (NemerleParameters)project.ActiveConfiguration;
+
+ string references = "";
+ string files = "";
+
+ foreach (ProjectReference lib in project.ProjectReferences)
+ references += " -r \"" + lib.GetReferencedFileName(project) + "\"";
+
+ foreach (ProjectFile f in project.ProjectFiles)
+ if (f.Subtype != Subtype.Directory)
+ switch (f.BuildAction)
+ {
+ case BuildAction.Compile:
+ files += " \"" + f.Name + "\"";
+ break;
+ }
+
+ if (!Directory.Exists(cp.OutputPath))
+ Directory.CreateDirectory(cp.OutputPath);
+
+ string outstr = ncc + GetOptionsString(cp) + references + files + " -o " + GetCompiledOutputName(project);
+ string output = "";
+ string error = "";
+ TempFileCollection tf = new TempFileCollection ();
+// Executor.ExecWaitWithCapture(outstr, tf, ref error , ref output);
+ DoCompilation (outstr, tf, ref output, ref error);
+ ICompilerResult cr = ParseOutput (tf, output);
+ File.Delete(output);
+ File.Delete(error);
+ return cr;
+ }
+
+ private void DoCompilation(string outstr, TempFileCollection tf, ref string output, ref string error)
+ {
+ output = Path.GetTempFileName();
+ error = Path.GetTempFileName();
+
+ string arguments = outstr + " > " + output + " 2> " + error;
+ string command = arguments;
+ ProcessStartInfo si = new ProcessStartInfo("/bin/sh -c \"" + command + "\"");
+ si.RedirectStandardOutput = true;
+ si.RedirectStandardError = true;
+ si.UseShellExecute = false;
+ Process p = new Process();
+ p.StartInfo = si;
+ p.Start();
+ p.WaitForExit();
+ }
+
+ ICompilerResult ParseOutput(TempFileCollection tf, string file)
+ {
+ string compilerOutput = "";
+ string l;
+ StreamReader sr = new StreamReader(file, System.Text.Encoding.Default);
+ CompilerResults cr = new CompilerResults(tf);
+
+ while ((l = sr.ReadLine())!=null)
+ {
+ compilerOutput += l + "\n";
+
+ if ((l.IndexOf(".n:") < 0) &&
+ (l.IndexOf(":0:0:") < 0))
+ continue;
+
+ CompilerError error = new CompilerError();
+
+ int s1 = l.IndexOf(':')+1;
+ int s2 = l.IndexOf(':',s1)+1;
+ int s3 = l.IndexOf(':',s2)+1;
+ int s4 = l.IndexOf(':',s3)+1;
+
+ error.FileName = l.Substring(0, s1-1);
+ error.Line = Int32.Parse(l.Substring(s1, s2-s1-1));
+ error.Column = Int32.Parse(l.Substring(s2, s3-s2-1));
+ error.ErrorNumber = String.Empty;
+ error.ErrorText = "";
+ switch(l.Substring(s3+1, s4-s3-2))
+ {
+ case "error":
+ error.IsWarning = false;
+ break;
+ case "warning":
+ error.IsWarning = true;
+ break;
+ case "hint":
+ error.IsWarning = true;
+ error.ErrorText = "hint: ";
+ break;
+ default:
+ error.IsWarning = false;
+ error.ErrorText = "unknown: ";
+ break;
+ }
+ error.ErrorText += l.Substring(s4+1);
+
+ cr.Errors.Add(error);
+ }
+ sr.Close();
+ return new DefaultCompilerResult(cr, compilerOutput);
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingExecutionServices.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingExecutionServices.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleBindingExecutionServices.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,61 @@
+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 System.Threading;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+using MonoDevelop.Core.Services;
+
+namespace NemerleBinding
+{
+ public class NemerleBindingExecutionServices
+ {
+
+ public void Execute(string filename)
+ {
+ throw new ApplicationException("No ExecuteFile");
+ }
+
+ public void Execute(IProject project)
+ {
+
+ NemerleParameters p = (NemerleParameters)project.ActiveConfiguration;
+ FileUtilityService fus = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ string dir = fus.GetDirectoryNameWithSeparator(p.OutputPath);
+ string exe;
+
+ if (p.ExecuteCommand == String.Empty)
+ {
+ exe = "mono --debug";
+ } else
+ {
+ exe = p.ExecuteCommand;
+ }
+
+ exe += " " + p.AssemblyName + ".exe " + p.Parameters;
+
+ try {
+ string currentDir = Directory.GetCurrentDirectory();
+ Directory.SetCurrentDirectory(dir);
+
+ ProcessStartInfo psi = new ProcessStartInfo(exe);
+ psi.WorkingDirectory = dir;
+ psi.UseShellExecute = false;
+
+ Process pr = new Process();
+ pr.StartInfo = psi;
+ pr.Start();
+ Directory.SetCurrentDirectory(currentDir);
+ } catch (Exception) {
+ throw new ApplicationException("Can not execute");
+ }
+ }
+
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,79 @@
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections;
+using System.Reflection;
+using System.Resources;
+using System.Xml;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+using MonoDevelop.Gui;
+
+namespace NemerleBinding
+{
+ /// <summary>
+ /// This class describes the main functionalaty of a language binding
+ /// </summary>
+ public class NemerleLanguageBinding : ILanguageBinding
+ {
+ public const string LanguageName = "Nemerle";
+
+ NemerleBindingCompilerServices compilerServices = new NemerleBindingCompilerServices();
+ NemerleBindingExecutionServices executionServices = new NemerleBindingExecutionServices();
+
+ public string Language {
+ get { return LanguageName; }
+ }
+
+ public void Execute (string filename)
+ {
+ executionServices.Execute(filename);
+ }
+
+ public void Execute (IProject project)
+ {
+ executionServices.Execute (project);
+ }
+
+ public string GetCompiledOutputName(string fileName)
+ {
+ return compilerServices.GetCompiledOutputName(fileName);
+ }
+
+ public string GetCompiledOutputName(IProject project)
+ {
+ return compilerServices.GetCompiledOutputName(project);
+ }
+
+ public bool CanCompile(string fileName)
+ {
+ return compilerServices.CanCompile(fileName);
+ }
+
+ public ICompilerResult CompileFile(string fileName)
+ {
+ return compilerServices.CompileFile(fileName);
+ }
+
+ public ICompilerResult CompileProject(IProject project)
+ {
+ return compilerServices.CompileProject(project);
+ }
+
+ public ICompilerResult RecompileProject(IProject project)
+ {
+ return CompileProject(project);
+ }
+
+ public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
+ {
+ return new NemerleProject(info, projectOptions);
+ }
+
+ public void DebugProject (IProject project)
+ {
+ throw new ApplicationException("No Nemele debug");
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleParameters.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleParameters.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleParameters.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,122 @@
+using System;
+using System.Xml;
+using System.Diagnostics;
+
+using MonoDevelop.Internal.Project;
+
+namespace NemerleBinding
+{
+ public enum CompileTarget
+ {
+ Executable,
+ Library
+ };
+
+ public class NemerleParameters : AbstractProjectConfiguration
+ {
+ [XmlNodeName("CodeGeneration")]
+ class CodeGeneration
+ {
+ [XmlAttribute("target")]
+ public CompileTarget target = CompileTarget.Executable;
+ [XmlAttribute("nostdmacros")]
+ public bool nostdmacros = false;
+ [XmlAttribute("nostdlib")]
+ public bool nostdlib = false;
+ [XmlAttribute("ot")]
+ public bool ot = true;
+ [XmlAttribute("obcm")]
+ public bool obcm = true;
+ [XmlAttribute("oocm")]
+ public bool oocm = true;
+ [XmlAttribute("oscm")]
+ public bool oscm = true;
+
+ [XmlAttribute("assemblyname")]
+ public string assemblyname = String.Empty;
+ [XmlAttribute("outputpath")]
+ public string outputpath = String.Empty;
+ [XmlAttribute("parameters")]
+ public string parameters = String.Empty;
+ }
+
+ [XmlNodeName("Execution")]
+ class Execution
+ {
+ [XmlAttribute("executecommand")]
+ public string executecommand = String.Empty;
+ }
+
+
+ CodeGeneration codeGeneration = new CodeGeneration();
+
+ Execution execution = new Execution();
+
+ public CompileTarget Target
+ {
+ get { return codeGeneration.target; }
+ set { codeGeneration.target = value; }
+ }
+ public bool Nostdmacros
+ {
+ get { return codeGeneration.nostdmacros; }
+ set { codeGeneration.nostdmacros = value; }
+ }
+ public bool Nostdlib
+ {
+ get { return codeGeneration.nostdlib; }
+ set { codeGeneration.nostdlib = value; }
+ }
+ public bool Ot
+ {
+ get { return codeGeneration.ot; }
+ set { codeGeneration.ot = value; }
+ }
+ public bool Obcm
+ {
+ get { return codeGeneration.obcm; }
+ set { codeGeneration.obcm = value; }
+ }
+ public bool Oocm
+ {
+ get { return codeGeneration.oocm; }
+ set { codeGeneration.oocm = value; }
+ }
+ public bool Oscm
+ {
+ get { return codeGeneration.oscm; }
+ set { codeGeneration.oscm = value; }
+ }
+
+ public string AssemblyName
+ {
+ get { return codeGeneration.assemblyname; }
+ set { codeGeneration.assemblyname = value; }
+ }
+ public string OutputPath
+ {
+ get { return codeGeneration.outputpath; }
+ set { codeGeneration.outputpath = value; }
+ }
+ public string Parameters
+ {
+ get { return codeGeneration.parameters; }
+ set { codeGeneration.parameters = value; }
+ }
+
+ public string ExecuteCommand
+ {
+ get { return execution.executecommand; }
+ set { execution.executecommand = value; }
+ }
+
+
+ public NemerleParameters()
+ {
+ }
+ public NemerleParameters(string name)
+ {
+ this.name = name;
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleProject.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleProject.cs 2004-04-09 02:50:26 UTC (rev 1416)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/Project/NemerleProject.cs 2004-04-09 11:31:40 UTC (rev 1417)
@@ -0,0 +1,47 @@
+using System;
+using System.IO;
+using System.Collections;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Xml;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+
+namespace NemerleBinding
+{
+ public class NemerleProject : AbstractProject
+ {
+ public override string ProjectType {
+ get {
+ return NemerleLanguageBinding.LanguageName;
+ }
+ }
+
+ public override IConfiguration CreateConfiguration()
+ {
+ return new NemerleParameters();
+ }
+
+ public NemerleProject()
+ {
+ }
+
+ public NemerleProject(ProjectCreateInformation info, XmlElement projectOptions)
+ {
+ if (info != null)
+ {
+ Name = info.ProjectName;
+
+ Configurations.Add(CreateConfiguration("Debug"));
+ Configurations.Add(CreateConfiguration("Release"));
+
+ foreach (NemerleParameters p in Configurations)
+ {
+ p.OutputPath = info.BinPath + Path.DirectorySeparatorChar + p.Name;
+ p.AssemblyName = Name;
+ }
+ }
+ }
+ }
+}
More information about the Monodevelop-patches-list
mailing list