From b289d6718f1e4ba032a45c8c3ba7d406f9d07e55 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 28 Jan 2016 12:21:47 +0000 Subject: [PATCH] 1452: Implement a GUI for StatMan Algorithms Importer Task-Url: https://support.d4science.org/issues/1452 Fixed double quote problem in parameters git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@122590 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/codeparser/CodeParser.java | 16 +++++++++++++++- .../client/tools/input/GlobalVariablesPanel.java | 2 +- .../tools/input/InputOutputVariablesPanel.java | 4 ++-- .../statalgoimporter.gwt.xml | 9 +++++---- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java index 8720335..ac5a546 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java @@ -46,7 +46,14 @@ public class CodeParser { if (defaultValue.endsWith("\"")) defaultValue = defaultValue.substring(0, defaultValue.length() - 1); - + String[] def=defaultValue.split("\""); + if(def.length>2){ + defaultValue=def[0]; + for(int i=1; i2){ + defaultValue=def[0]; + for(int i=1; i( diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java index e604d1f..b9eb11f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java @@ -266,9 +266,9 @@ public class InputOutputVariablesPanel extends ContentPanel { descriptionColumnEditing.addValidator(new RegExValidator("^[^\"]*$", "Attention character \" is not allowed")); TextField defaultValueColumnEditing = new TextField(); - defaultValueColumnEditing.addValidator(new RegExValidator("^[^\"]*$", + defaultValueColumnEditing.addValidator(new RegExValidator("^[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*$", "Attention character \" is not allowed")); - + gridInputOutputVariablesEditing = new GridRowEditing( gridInputOutputVariables); gridInputOutputVariablesEditing diff --git a/src/main/resources/org/gcube/portlets/user/statisticalalgorithmsimporter/statalgoimporter.gwt.xml b/src/main/resources/org/gcube/portlets/user/statisticalalgorithmsimporter/statalgoimporter.gwt.xml index 5b5d407..d69f04f 100644 --- a/src/main/resources/org/gcube/portlets/user/statisticalalgorithmsimporter/statalgoimporter.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/statisticalalgorithmsimporter/statalgoimporter.gwt.xml @@ -51,18 +51,19 @@ name="locale" values="es" /> --> - + /> --> - + - +