Permalink
Browse files

Add implementations for do_syntax_check in all providers

  • Loading branch information...
1 parent aaf49c2 commit dbb89d2f5d3b7dfc830624adf533cb52deae0780 @pepeleproso pepeleproso committed Mar 24, 2011
Showing with 59 additions and 10 deletions.
  1. +8 −1 src/language_cobol.c
  2. +8 −1 src/language_css.c
  3. +8 −1 src/language_cxx.c
  4. +9 −2 src/language_perl.c
  5. +8 −1 src/language_python.c
  6. +8 −1 src/language_sql.c
  7. +10 −3 src/language_untitled.c
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gcoboledit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,6 +57,7 @@ enum
static void language_cobol_language_provider_init(Language_ProviderInterface *iface, gpointer user_data);
static void language_cobol_trigger_completion (Language_Provider *lgcobol, guint ch);
static void language_cobol_setup_lexer(Language_Provider *lgcobol);
+static gchar *language_cobol_do_syntax_check(Language_Provider *lgcobol);
G_DEFINE_TYPE_WITH_CODE(Language_COBOL, language_cobol, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -72,6 +73,7 @@ static void language_cobol_language_provider_init(Language_ProviderInterface *if
iface->trigger_completion = language_cobol_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_cobol_setup_lexer;
+ iface->do_syntax_check = language_cobol_do_syntax_check;
}
static void
@@ -341,6 +343,11 @@ static void language_cobol_trigger_completion (Language_Provider *lgcobol, guint
}
}
+static gchar *language_cobol_do_syntax_check(Language_Provider *lgcobol)
+{
+ return NULL;
+}
+
static void language_cobol_setup_lexer(Language_Provider *lgcobol)
{
g_return_if_fail(lgcobol);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gcssedit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,6 +61,7 @@ static void language_css_language_provider_init(Language_ProviderInterface *ifac
static void language_css_trigger_completion (Language_Provider *lgcss, guint ch);
static void show_calltip (Language_Provider *lgcss);
static void language_css_setup_lexer(Language_Provider *lgcss);
+static gchar *language_css_do_syntax_check(Language_Provider *lgcss);
G_DEFINE_TYPE_WITH_CODE(Language_CSS, language_css, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -71,6 +72,7 @@ static void language_css_language_provider_init(Language_ProviderInterface *ifac
iface->trigger_completion = language_css_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_css_setup_lexer;
+ iface->do_syntax_check = language_css_do_syntax_check;
}
static void
@@ -430,6 +432,11 @@ static void language_css_trigger_completion (Language_Provider *lgcss, guint ch)
}
}
+static gchar *language_css_do_syntax_check(Language_Provider *lgcss)
+{
+ return NULL;
+}
+
static void language_css_setup_lexer(Language_Provider *lgcss)
{
g_return_if_fail(lgcss);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gcxxedit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,6 +61,7 @@ static void language_cxx_language_provider_init(Language_ProviderInterface *ifac
static void language_cxx_trigger_completion (Language_Provider *lgcxx, guint ch);
static void show_calltip (Language_Provider *lgcxx);
static void language_cxx_setup_lexer(Language_Provider *lgcxx);
+static gchar *language_cxx_do_syntax_check(Language_Provider *lgcxx);
G_DEFINE_TYPE_WITH_CODE(Language_CXX, language_cxx, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -71,6 +72,7 @@ static void language_cxx_language_provider_init(Language_ProviderInterface *ifac
iface->trigger_completion = language_cxx_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_cxx_setup_lexer;
+ iface->do_syntax_check = language_cxx_do_syntax_check;
}
static void
@@ -470,6 +472,11 @@ static void language_cxx_trigger_completion (Language_Provider *lgcxx, guint ch)
}
}
+static gchar *language_cxx_do_syntax_check(Language_Provider *lgcxx)
+{
+ return NULL;
+}
+
static void language_cxx_setup_lexer(Language_Provider *lgcxx)
{
g_return_if_fail(lgcxx);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gperledit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,7 +60,8 @@ enum
static void language_perl_language_provider_init(Language_ProviderInterface *iface, gpointer user_data);
static void language_perl_trigger_completion (Language_Provider *lgperl, guint ch);
static void show_calltip (Language_Provider *lgperl);
-static void language_perl_setup_lexer(Language_Provider *lgcss);
+static void language_perl_setup_lexer(Language_Provider *lgperl);
+static gchar *language_perl_do_syntax_check(Language_Provider *lgperl);
G_DEFINE_TYPE_WITH_CODE(Language_PERL, language_perl, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -71,6 +72,7 @@ static void language_perl_language_provider_init(Language_ProviderInterface *ifa
iface->trigger_completion = language_perl_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_perl_setup_lexer;
+ iface->do_syntax_check = language_perl_do_syntax_check;
}
static void
@@ -503,6 +505,11 @@ static void language_perl_trigger_completion (Language_Provider *lgperl, guint c
}
}
+static gchar *language_perl_do_syntax_check(Language_Provider *lgperl)
+{
+ return NULL;
+}
+
static void language_perl_setup_lexer(Language_Provider *lgperl)
{
g_return_if_fail(lgperl);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gpythonedit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,6 +61,7 @@ static void language_python_language_provider_init(Language_ProviderInterface *i
static void language_python_trigger_completion (Language_Provider *lgpython, guint ch);
static void show_calltip (Language_Provider *lgpython);
static void language_python_setup_lexer(Language_Provider *lgpython);
+static gchar *language_python_do_syntax_check(Language_Provider *lgpython);
G_DEFINE_TYPE_WITH_CODE(Language_PYTHON, language_python, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -71,6 +72,7 @@ static void language_python_language_provider_init(Language_ProviderInterface *i
iface->trigger_completion = language_python_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_python_setup_lexer;
+ iface->do_syntax_check = language_python_do_syntax_check;
}
static void
@@ -431,6 +433,11 @@ static void language_python_trigger_completion (Language_Provider *lgpython, gui
}
}
+static gchar *language_python_do_syntax_check(Language_Provider *lgpython)
+{
+ return NULL;
+}
+
static void language_python_setup_lexer(Language_Provider *lgpython)
{
g_return_if_fail(lgpython);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.gsqledit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,6 +57,7 @@ enum
static void language_sql_language_provider_init(Language_ProviderInterface *iface, gpointer user_data);
static void language_sql_trigger_completion (Language_Provider *lgsql, guint ch);
static void language_sql_setup_lexer(Language_Provider *lgsql);
+static gchar *language_sql_do_syntax_check(Language_Provider *lgsql);
G_DEFINE_TYPE_WITH_CODE(Language_SQL, language_sql, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -72,6 +73,7 @@ static void language_sql_language_provider_init(Language_ProviderInterface *ifac
iface->trigger_completion = language_sql_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_sql_setup_lexer;
+ iface->do_syntax_check = language_sql_do_syntax_check;
}
static void
@@ -341,6 +343,11 @@ static void language_sql_trigger_completion (Language_Provider *lgsql, guint ch)
}
}
+static gchar *language_sql_do_syntax_check(Language_Provider *lgsql)
+{
+ return NULL;
+}
+
static void language_sql_setup_lexer(Language_Provider *lgsql)
{
g_return_if_fail(lgsql);
View
@@ -4,7 +4,7 @@
Copyright (C) 2009, 2011 José Rostagno (for vijona.com.ar)
For more information or to find the latest release, visit our
- website at http://www.gphpedit.org/
+ website at http://www.guntitlededit.org/
gPHPEdit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,6 +50,7 @@ enum
static void language_untitled_language_provider_init(Language_ProviderInterface *iface, gpointer user_data);
static void language_untitled_trigger_completion (Language_Provider *lguntitled, guint ch);
static void language_untitled_setup_lexer(Language_Provider *lguntitled);
+static gchar *language_untitled_do_syntax_check(Language_Provider *lguntitled);
G_DEFINE_TYPE_WITH_CODE(Language_Untitled, language_untitled, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IFACE_TYPE_LANGUAGE_PROVIDER,
@@ -65,6 +66,7 @@ static void language_untitled_language_provider_init(Language_ProviderInterface
iface->trigger_completion = language_untitled_trigger_completion;
iface->show_calltip = show_calltip;
iface->setup_lexer = language_untitled_setup_lexer;
+ iface->do_syntax_check = language_untitled_do_syntax_check;
}
static void
@@ -178,13 +180,18 @@ static void language_untitled_trigger_completion (Language_Provider *lguntitled,
wordEnd = gtk_scintilla_word_end_position(lguntitleddet->sci, current_pos-1, TRUE);
member_function_buffer = gtk_scintilla_get_text_range (lguntitleddet->sci, wordStart-2, wordEnd, &member_function_length);
- /* if we type <?php then we are in a php file so force php syntax mode */
- if (g_strcmp0(member_function_buffer,"<?php")==0) {
+ /* if we type <?untitled then we are in a untitled file so force untitled syntax mode */
+ if (g_strcmp0(member_function_buffer,"<?untitled")==0) {
documentable_set_type(DOCUMENTABLE(lguntitleddet->doc), TAB_PHP);
}
g_free(member_function_buffer);
}
+static gchar *language_untitled_do_syntax_check(Language_Provider *lguntitled)
+{
+ return NULL;
+}
+
static void language_untitled_setup_lexer(Language_Provider *lguntitled)
{
g_return_if_fail(lguntitled);

0 comments on commit dbb89d2

Please sign in to comment.