1452: Implement a GUI for StatMan Algorithms Importer

Task-Url: https://support.d4science.org/issues/1452

Fixed Parser

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@122337 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-01-20 09:45:44 +00:00
parent 01acfe16d4
commit 0c8ad1cfba
11 changed files with 37 additions and 30 deletions

View File

@ -61,7 +61,7 @@ public class StatAlgoImporter implements EntryPoint {
}
protected void loadMainPanel() {
StatAlgoImporterResources.INSTANCE.srCSS().ensureInjected();
StatAlgoImporterResources.INSTANCE.saiStyles().ensureInjected();
// ScriptInjector.fromString(AccountingManagerResources.INSTANCE.jqueryJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
StatAlgoImporterController controller = new StatAlgoImporterController();

View File

@ -33,6 +33,10 @@ public class CodeParser {
if (parameter.contains("<-")) {
String[] varDescription = parameter.split("<-");
String checkDataTypeValue=varDescription[1].trim();
if (checkDataTypeValue.endsWith(";"))
checkDataTypeValue = checkDataTypeValue.substring(0,
checkDataTypeValue.length() - 1);
String defaultValue = varDescription[1].trim();
if (defaultValue.endsWith(";"))
defaultValue = defaultValue.substring(0,
@ -45,11 +49,15 @@ public class CodeParser {
selectedRowsVariables = new InputOutputVariables(
varDescription[0].trim(), varDescription[0].trim(),
defaultValue, checkDataType(varDescription[1].trim()),
defaultValue, checkDataType(checkDataTypeValue),
ioType, parameter);
} else {
if (parameter.contains("=")) {
String[] varDescription = parameter.split("=");
String checkDataTypeValue=varDescription[1].trim();
if (checkDataTypeValue.endsWith(";"))
checkDataTypeValue = checkDataTypeValue.substring(0,
checkDataTypeValue.length() - 1);
String defaultValue = varDescription[1].trim();
if (defaultValue.endsWith(";"))
defaultValue = defaultValue.substring(0,
@ -61,7 +69,7 @@ public class CodeParser {
defaultValue.length() - 1);
selectedRowsVariables = new InputOutputVariables(
varDescription[0].trim(), varDescription[0].trim(),
defaultValue, checkDataType(varDescription[1].trim()),
defaultValue, checkDataType(checkDataTypeValue),
ioType, parameter);
} else {

View File

@ -0,0 +1,9 @@
@CHARSET "UTF-8";
.ribbon {
line-height: 13px;
font-size: 11px;
}

View File

@ -11,10 +11,11 @@ import com.google.gwt.resources.client.CssResource;
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface StatAlgoImporterCSS extends CssResource {
public interface SAIStyles extends CssResource {
@ClassName("ribbon")
public String getRibbon();
}

View File

@ -1,12 +0,0 @@
@CHARSET "UTF-8";
.ribbon {
line-height: 13px;
font-size: 11px;
}
#drop_target_inner {
background-image: url("statalgoimporter/images/explorer_dragndrop.png") !important;
}

View File

@ -19,8 +19,8 @@ public interface StatAlgoImporterResources extends ClientBundle {
public static final StatAlgoImporterResources INSTANCE = GWT
.create(StatAlgoImporterResources.class);
@Source("StatAlgoImporter.css")
StatAlgoImporterCSS srCSS();
@Source("SAIStyles.css")
SAIStyles saiStyles();
@Source("WikiLink.txt")
ExternalTextResource wikiLink();

View File

@ -0,0 +1,9 @@
@CHARSET "UTF-8";
.ribbon {
line-height: 13px;
font-size: 11px;
}

View File

@ -1,11 +0,0 @@
@CHARSET "UTF-8";
.ribbon {
line-height: 13px;
font-size: 11px;
}
#drop_target_inner {
background-image: url("statalgoimporter/images/explorer_dragndrop.png") !important;
}

View File

@ -5,3 +5,6 @@
}*/
#drop_target_inner {
background-image: url("statalgoimporter/images/upload_128.png") !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB