Commit 60959dc9 authored by Christian Hergert's avatar Christian Hergert

mono: add simple mono plugin

This just adds an error regex to extract build warnings when
projects are compiled with gmcs/mcs.
parent ee814271
......@@ -314,6 +314,7 @@ m4_include([plugins/make/configure.ac])
m4_include([plugins/meson/configure.ac])
m4_include([plugins/meson-templates/configure.ac])
m4_include([plugins/mingw/configure.ac])
m4_include([plugins/mono/configure.ac])
m4_include([plugins/project-tree/configure.ac])
m4_include([plugins/python-gi-imports-completion/configure.ac])
m4_include([plugins/python-pack/configure.ac])
......@@ -596,6 +597,7 @@ echo " JHBuild .............................. : ${enable_jhbuild_plugin}"
echo " Make ................................. : ${enable_make_plugin}"
echo " Meson ................................ : ${enable_meson_plugin}"
echo " MinGW ................................ : ${enable_mingw_plugin}"
echo " Mono ................................. : ${enable_mono_plugin}"
echo " Project Creation ..................... : ${enable_create_project_plugin}"
echo " Project Tree ......................... : ${enable_project_tree_plugin}"
echo " Python GObject Introspection ......... : ${enable_python_gi_imports_completion_plugin}"
......
......@@ -45,6 +45,7 @@ option('with_make', type: 'boolean')
option('with_meson', type: 'boolean')
option('with_meson_templates', type: 'boolean', value: false)
option('with_mingw', type: 'boolean')
option('with_mono', type: 'boolean')
option('with_project_tree', type: 'boolean')
option('with_python_gi_imports_completion', type: 'boolean')
option('with_python_pack', type: 'boolean')
......
......@@ -25,9 +25,10 @@ SUBDIRS = \
jedi \
jhbuild \
make \
mingw \
meson \
meson-templates \
mingw \
mono \
project-tree \
python-gi-imports-completion \
python-pack \
......
......@@ -39,6 +39,7 @@ subdir('make')
subdir('meson')
subdir('meson-templates')
subdir('mingw')
subdir('mono')
subdir('project-tree')
subdir('python-gi-imports-completion')
subdir('python-pack')
......
if ENABLE_MONO_PLUGIN
EXTRA_DIST = $(plugin_DATA)
plugindir = $(libdir)/gnome-builder/plugins
dist_plugin_DATA = mono.plugin
moduledir = $(libdir)/gnome-builder/plugins
dist_module_DATA = mono_plugin.py
endif
-include $(top_srcdir)/git.mk
# --enable-mono-plugin=yes/no
AC_ARG_ENABLE([mono-plugin],
[AS_HELP_STRING([--enable-mono-plugin=@<:@yes/no@:>@],
[Build with support for mono])],
[enable_mono_plugin=$enableval],
[enable_mono_plugin=yes])
# for if ENABLE_MONO_PLUGIN in Makefile.am
AM_CONDITIONAL(ENABLE_MONO_PLUGIN, test x$enable_mono_plugin = xyes)
# Ensure our makefile is generated by autoconf
AC_CONFIG_FILES([plugins/mono/Makefile])
if get_option('with_mono')
install_data('mono.plugin', install_dir: plugindir)
install_data('mono_plugin.py', install_dir: plugindir)
endif
[Plugin]
Module=mono_plugin
Loader=python3
Name=Mono
Description=Provides integration with Mono
Authors=Christian Hergert <chergert@redhat.com>
Copyright=Copyright © 2017 Christian Hergert
Builtin=true
Hidden=false
#!/usr/bin/env python3
import gi
from gi.repository import Ide
from gi.repository import GLib
_ERROR_REGEX = ("(?<filename>[a-zA-Z0-9\\-\\.\\/]+.cs)" +
"\\((?<line>\\d+),(?<column>\\d+)\\): " +
"(?<level>[\\w\\s]+) " +
"(?<code>CS[0-9]+): " +
"(?<message>.*)")
class MonoPipelineAddin(Ide.Object, Ide.BuildPipelineAddin):
def do_load(self, pipeline):
self.error_format = pipeline.add_error_format(_ERROR_REGEX, GLib.RegexCompileFlags.OPTIMIZE)
def do_unload(self, pipeline):
pipeline.remove_error_format(self.error_format)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment