jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1728379 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/parser/ jspwiki-war/src/main/resources/plugin/ jspwiki-war/src/test/java/org/apache/wiki/parser/
Date Wed, 03 Feb 2016 21:35:35 GMT
Author: juanpablo
Date: Wed Feb  3 21:35:34 2016
New Revision: 1728379

URL: http://svn.apache.org/viewvc?rev=1728379&view=rev
Log:
* JSPWIKI-852: JSPWikiMarkupParser should report on which page a plugin was missing

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_de.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_es.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fi.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fr.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_it.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_nl.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_pt_BR.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_ru.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_zh_CN.properties
    jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Wed Feb  3 21:35:34 2016
@@ -1,3 +1,9 @@
+2016-02-02  Juan Pablo Santos (juanpablo AT apache DOT org)
+
+       * 2.10.2-svn-41
+
+       * JSPWIKI-852: JSPWikiMarkupParser should report on which page a plugin was missing
+
 2015-12-09  Juan Pablo Santos (juanpablo AT apache DOT org)
 
        * 2.10.2-svn-40

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Wed Feb  3 21:35:34
2016
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "40";
+    public static final String     BUILD         = "41";
 
     /**
      *  This is the generic version string you should use when printing out the version.
 It is of 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
Wed Feb  3 21:35:34 2016
@@ -1465,12 +1465,15 @@ public class JSPWikiMarkupParser extends
             }
             catch( PluginException e )
             {
-                log.info( "Failed to insert plugin: "+e.getMessage() );
+                log.info( m_context.getRealPage().getWiki() + " : " + m_context.getRealPage().getName()
+ " - Failed to insert plugin: " + e.getMessage() );
                 //log.info( "Root cause:",e.getRootThrowable() );
                 if( !m_wysiwygEditorMode )
                 {
                     ResourceBundle rbPlugin = Preferences.getBundle( m_context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE
);
-                    return addElement( makeError( MessageFormat.format( rbPlugin.getString(
"plugin.error.insertionfailed" ), e.getMessage() ) ) );
+                    return addElement( makeError( MessageFormat.format( rbPlugin.getString(
"plugin.error.insertionfailed" ), 
+                    		                                            m_context.getRealPage().getWiki(),

+                    		                                            m_context.getRealPage().getName(),

+                    		                                            e.getMessage() ) ) );
                 }
             }
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java Wed
Feb  3 21:35:34 2016
@@ -199,8 +199,10 @@ public class PluginContent extends Text
             } else {
                 // log.info("Failed to execute plugin",e);
                 ResourceBundle rb = Preferences.getBundle(context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE);
-                result = JSPWikiMarkupParser.makeError(
-                        MessageFormat.format(rb.getString("plugin.error.insertionfailed"),
e.getMessage())).getText();
+                result = JSPWikiMarkupParser.makeError( MessageFormat.format( rb.getString("plugin.error.insertionfailed"),

+                		                                                      context.getRealPage().getWiki(),

+                		                                                      context.getRealPage().getName(),

+                		                                                      e.getMessage())).getText();
             }
         }
 

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties Wed Feb
 3 21:35:34 2016
@@ -20,7 +20,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed = Plugin insertion failed: {0}
+plugin.error.insertionfailed = {0} : {1} - Plugin insertion failed: {2}
 plugin.error.cannotinstantiate = Cannot instantiate plugin {0} 
 plugin.error.notallowed = Not allowed to access plugin {0}
 plugin.error.instantationfailed = Instantiation of plugin {0} failed.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_de.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_de.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_de.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_de.properties Wed
Feb  3 21:35:34 2016
@@ -35,7 +35,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed=Einfügen eines Plugins fehlgeschlagen: {0}
+plugin.error.insertionfailed={0} : {1} - Einfügen eines Plugins fehlgeschlagen: {2}
 plugin.error.cannotinstantiate=Kann Plugin &#39;{0}&#39; nicht instanziieren.
 plugin.error.notallowed=Keine Zugriffsberechtigung auf Plugin &#39;{0}&#39;.
 plugin.error.instantationfailed=Instanziierung des Plugins &#39;{0}&#39; fehlgeschlagen.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_es.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_es.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_es.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_es.properties Wed
Feb  3 21:35:34 2016
@@ -21,7 +21,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed = Fallo en la inserción del Plugin: {0}
+plugin.error.insertionfailed = {0} : {1} - Fallo en la inserción del Plugin: {2}
 plugin.error.cannotinstantiate = No se pudo instantiar el plugin {0} 
 plugin.error.notallowed = No está permitido el acceso al plugin {0}
 plugin.error.instantationfailed = La instanciación del plugin {0} ha fallado.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fi.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fi.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fi.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fi.properties Wed
Feb  3 21:35:34 2016
@@ -59,7 +59,7 @@ formtextarea.namemissing = TextArea-elem
 plugin.error.cannotinstantiate = En voinut käynnistää laajennusta {0} 
 plugin.error.couldnotfind = En löytänyt laajennusta {0}
 plugin.error.failed = Laajennus epäonnistui
-plugin.error.insertionfailed = Laajennuksen käyttö epäonnistui: {0}
+plugin.error.insertionfailed = {0} : {1} - Laajennuksen käyttö epäonnistui: {2}
 plugin.error.instantationfailed = En voinut käynnistää laajennusta {0}.
 plugin.error.missingparameter = Missing parameter in plugin definition: {0}
 plugin.error.notallowed = Ei lupaa käyttää laajennusta {0}

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fr.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fr.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fr.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_fr.properties Wed
Feb  3 21:35:34 2016
@@ -30,7 +30,7 @@
 
 # Erreurs d'activation des plugins
 
-plugin.error.insertionfailed = Echec d\u0027\u0027insertion de plugin\u00A0: {0}
+plugin.error.insertionfailed = {0} : {1} - Echec d\u0027\u0027insertion de plugin\u00A0:
{2}
 plugin.error.cannotinstantiate = Impossible d\u0027\u0027instancier le plugin {0} 
 plugin.error.notallowed = Acc\u00E8s au plugin {0} refus\u00E9
 plugin.error.instantationfailed = Echec d\u0027\u0027instantiation du plugin {0}.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_it.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_it.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_it.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_it.properties Wed
Feb  3 21:35:34 2016
@@ -20,7 +20,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed = Caricamento del Plugin fallito: {0}
+plugin.error.insertionfailed = {0} : {1} - Caricamento del Plugin fallito: {2}
 plugin.error.cannotinstantiate = Non posso instanziare il plugin {0} 
 plugin.error.notallowed = Non &grave; possibile accedere al plugin {0}
 plugin.error.instantationfailed = Instanziazione del plugin {0} fallita.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_nl.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_nl.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_nl.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_nl.properties Wed
Feb  3 21:35:34 2016
@@ -24,7 +24,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed=Fout opgetreden bij invoegen van plugin: {0}
+plugin.error.insertionfailed={0} : {1} - Fout opgetreden bij invoegen van plugin: {2}
 plugin.error.cannotinstantiate=Kan plugin {0}  niet instantieren
 plugin.error.notallowed=Geen toegang tot plugin: {0}
 plugin.error.instantationfailed=Instantieren van plugin {0} mislukt

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_pt_BR.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_pt_BR.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_pt_BR.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_pt_BR.properties Wed
Feb  3 21:35:34 2016
@@ -20,7 +20,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed = Inserção de plugin falhou: {0}
+plugin.error.insertionfailed = {0} : {1} - Inserção de plugin falhou: {2}
 plugin.error.cannotinstantiate = Não foi possível instanciar o plugin {0} 
 plugin.error.notallowed = Não foi permitido acessar o plugin {0}
 plugin.error.instantationfailed = Instanciação do plugin {0} falhou.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_ru.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_ru.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_ru.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_ru.properties Wed
Feb  3 21:35:34 2016
@@ -20,7 +20,7 @@
 
 # Errors rendering plugins
 
-plugin.error.insertionfailed = \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438
\u043f\u043b\u0430\u0433\u0438\u043d\u0430: {0}
+plugin.error.insertionfailed = {0} : {1} - \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438
\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430:
{2}
 plugin.error.cannotinstantiate = \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e
\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d
{0} 
 plugin.error.notallowed = \u041d\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430
\u043a \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c {0}
 plugin.error.instantationfailed = \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430
\u043f\u043b\u0430\u0433\u0438\u043d\u0430 {0} \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u0430\u044f.

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_zh_CN.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_zh_CN.properties?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_zh_CN.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources_zh_CN.properties Wed
Feb  3 21:35:34 2016
@@ -21,7 +21,7 @@
 # Errors rendering plugins
 
 # NLS_MESSAGEFORMAT_VAR
-plugin.error.insertionfailed = \u63d2\u4ef6\u63d2\u5165\u5931\u8d25\uff1a{0}
+plugin.error.insertionfailed = {0} : {1} - \u63d2\u4ef6\u63d2\u5165\u5931\u8d25\uff1a{2}
 plugin.error.cannotinstantiate = \u4e0d\u80fd\u521d\u59cb\u5316\u63d2\u4ef6 {0} 
 plugin.error.notallowed = \u4e0d\u5141\u8bb8\u8bbf\u95ee\u63d2\u4ef6 {0}
 plugin.error.instantationfailed = \u63d2\u4ef6 {0} \u521d\u59cb\u5316\u5931\u8d25\u3002

Modified: jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java?rev=1728379&r1=1728378&r2=1728379&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
Wed Feb  3 21:35:34 2016
@@ -1836,6 +1836,14 @@ public class JSPWikiMarkupParserTest ext
 
         assertEquals( "Test {INSERT SamplePlugin\n\na+b{}\nGlob.\n}", translate(src) );
     }
+    
+    public void testMissingPlugin() throws Exception {
+    	String src="Test [{SamplePlugino foo='bar'}]";
+    	
+    	assertEquals( "Test JSPWiki : testpage - Plugin insertion failed: Could not find plugin
SamplePlugino" +
+    			      "<span class=\"error\">JSPWiki : testpage - Plugin insertion failed: Could
not find plugin SamplePlugino</span>", 
+    			      translate( src ) );
+    }
 
     public void testVariableInsert()
     throws Exception



Mime
View raw message