From 43af21aa7b9dab98a129727f16bcc7c46b66a7f0 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 16 Dec 2013 18:09:51 +0000 Subject: [PATCH] Updated to JAVA 7 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@86998 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 3 +- .settings/org.eclipse.jdt.core.prefs | 6 +- .settings/org.eclipse.wst.common.component | 27 +- ....eclipse.wst.common.project.facet.core.xml | 2 +- pom.xml | 293 +++++++++++------- .../user/td/client/TabularDataController.java | 32 +- .../user/td/client/TabularDataPortlet.java | 4 +- .../user/td/client/ribbon/ChartsToolBar.java | 9 +- .../user/td/client/ribbon/FileToolBar.java | 13 +- .../td/client/ribbon/FormulasToolBar.java | 11 +- .../user/td/client/ribbon/ReviewToolBar.java | 9 +- 11 files changed, 223 insertions(+), 186 deletions(-) diff --git a/.classpath b/.classpath index 0dece42..cc134f7 100644 --- a/.classpath +++ b/.classpath @@ -22,8 +22,7 @@ - - + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 69c31cd..8ad6fb0 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 031c963..21b1394 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -10,10 +10,35 @@ uses - + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + uses + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index 7895606..7893960 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -3,5 +3,5 @@ - + diff --git a/pom.xml b/pom.xml index c21efe4..ae9655a 100644 --- a/pom.xml +++ b/pom.xml @@ -88,8 +88,8 @@ gwt-user - - + + @@ -270,7 +270,7 @@ **/*.* - + @@ -294,139 +294,206 @@ - - + + + + + org.apache.maven.plugins + maven-war-plugin + 2.1.1 + + + compile + + exploded + + + + + ${webappDirectory} + + + + lib + + *.jar + + WEB-INF/lib + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.16 + + false + + + + org.apache.maven.surefire + surefire-junit47 + 2.16 + + + + + + + + maven-resources-plugin + 2.6 + + + copy-profile + process-resources + + copy-resources + + + ${configDirectory} + + + ${templatesDirectory} + + profile.xml + + true + + + + + + copy-distro-resources + process-resources + + copy-resources + + + ${distroDirectory} + + + ${templatesDirectory} + + profile.xml + descriptor.xml + + true + + + + + + + + + + + maven-clean-plugin + 2.5 + + + + ${distroDirectory} + + ** + + false + + + ${configDirectory} + + ** + + false + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2 + + + ${templatesDirectory}/descriptor.xml + + + + + servicearchive + package + + single + + + + + + - - - lib - - *.jar - - WEB-INF/lib - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.16 - - false - - - - org.apache.maven.surefire - surefire-junit47 - 2.16 - - - - - - - - maven-resources-plugin - 2.6 - - - copy-profile - process-resources - - copy-resources - - - ${configDirectory} - - - ${templatesDirectory} - - profile.xml - - true - - - - - - copy-distro-resources - process-resources - - copy-resources - - - ${distroDirectory} - - - ${templatesDirectory} - - profile.xml - descriptor.xml - - true - - - - - - - - maven-clean-plugin - 2.5 - - - - ${distroDirectory} - - ** - - false - - - ${configDirectory} - - ** - - false - - + 1.7 + 1.7 + + SA Plugin org.apache.maven.plugins maven-assembly-plugin 2.2 - ${templatesDirectory}/descriptor.xml + ${distroDirectory}/descriptor.xml servicearchive - package + install single + + org.apache.maven.plugins + maven-resources-plugin + 2.5 + + + copy-profile + install + + copy-resources + + + target + + + ${distroDirectory} + true + + profile.xml + + + + + + + + --> - + diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java index 7f11c0a..40ec217 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java @@ -116,7 +116,7 @@ public class TabularDataController { eventBus.addHandler(RibbonEvent.TYPE, new RibbonEvent.RibbonEventHandler() { - @Override + public void onRibbon(RibbonEvent event) { doRibbonCommand(event); @@ -131,7 +131,6 @@ public class TabularDataController { AlertMessageBox d = new AlertMessageBox(reason, details); d.addHideHandler(new HideHandler() { - @Override public void onHide(HideEvent event) { // } @@ -180,13 +179,12 @@ public class TabularDataController { Log.debug("Remove TR:" + trId); TDGWTServiceAsync.INSTANCE.removeTabularResource(trId, new AsyncCallback() { - @Override + public void onFailure(Throwable caught) { alertMessage("Error", "Error on remove TabResource: " + caught.getLocalizedMessage()); } - @Override public void onSuccess(Void result) { closeTabularResource(); } @@ -256,24 +254,21 @@ public class TabularDataController { protected void openSDMXImportWizard() { GWT.runAsync(new RunAsyncCallback() { - @Override + public void onSuccess() { openWizard(); SDMXImportWizardTD importWizard = new SDMXImportWizardTD( "SDMX Import"); importWizard.addListener(new WizardListener() { - @Override public void completed(TRId tabularResourceId) { openTable(tabularResourceId); } - @Override public void aborted() { resumeUIState(); } - @Override public void failed(Throwable throwable, String reason, String details) { alertMessage(reason, details); @@ -285,7 +280,6 @@ public class TabularDataController { importWizard.show(); } - @Override public void onFailure(Throwable reason) { asyncCodeLoadingFailed(reason); } @@ -296,27 +290,23 @@ public class TabularDataController { protected void openCSVExportWizard() { GWT.runAsync(new RunAsyncCallback() { - @Override public void onSuccess() { openWizard(); CSVExportWizardTD exportWizard = new CSVExportWizardTD( "CSV Export"); exportWizard.addListener(new WizardListener() { - @Override public void failed(Throwable throwable, String reason, String details) { alertMessage(reason, details); resumeUIState(); } - @Override public void completed(TRId id) { resumeUIState(); } - @Override public void aborted() { resumeUIState(); } @@ -325,7 +315,6 @@ public class TabularDataController { exportWizard.show(); } - @Override public void onFailure(Throwable reason) { asyncCodeLoadingFailed(reason); } @@ -336,27 +325,23 @@ public class TabularDataController { protected void openSDMXExportWizard() { GWT.runAsync(new RunAsyncCallback() { - @Override public void onSuccess() { openWizard(); SDMXExportWizardTD exportWizard = new SDMXExportWizardTD( "SDMX Export"); exportWizard.addListener(new WizardListener() { - @Override public void failed(Throwable throwable, String reason, String details) { alertMessage(reason, details); resumeUIState(); } - @Override public void completed(TRId id) { resumeUIState(); } - @Override public void aborted() { resumeUIState(); } @@ -365,7 +350,6 @@ public class TabularDataController { exportWizard.show(); } - @Override public void onFailure(Throwable reason) { asyncCodeLoadingFailed(reason); } @@ -381,26 +365,22 @@ public class TabularDataController { GWT.runAsync(new RunAsyncCallback() { - @Override public void onSuccess() { openWizard(); TDOpen tdOpen = new TDOpen("Open Tabular Resource"); tdOpen.addListener(new WizardListener() { - @Override public void aborted() { resumeUIState(); } - @Override public void failed(Throwable throwable, String reason, String details) { alertMessage(reason, details); resumeUIState(); } - @Override public void completed(TRId tabularResourceId) { openTable(tabularResourceId); @@ -411,7 +391,6 @@ public class TabularDataController { tdOpen.show(); } - @Override public void onFailure(Throwable reason) { asyncCodeLoadingFailed(reason); } @@ -422,7 +401,6 @@ public class TabularDataController { protected void openCSVImportWizard() { GWT.runAsync(new RunAsyncCallback() { - @Override public void onSuccess() { openWizard(); CSVImportWizardTD importWizard = new CSVImportWizardTD( @@ -430,20 +408,17 @@ public class TabularDataController { importWizard.addListener(new WizardListener() { - @Override public void failed(Throwable throwable, String reason, String details) { alertMessage(reason, details); resumeUIState(); } - @Override public void completed(TRId id) { openTable(id); } - @Override public void aborted() { resumeUIState(); } @@ -452,7 +427,6 @@ public class TabularDataController { importWizard.show(); } - @Override public void onFailure(Throwable reason) { asyncCodeLoadingFailed(reason); } diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java index e16a40e..64ff0d8 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java @@ -83,7 +83,6 @@ public class TabularDataPortlet implements EntryPoint { /** * {@inheritDoc} */ - @Override public void onModuleLoad() { /* @@ -95,7 +94,6 @@ public class TabularDataPortlet implements EntryPoint { // use deferred command to catch initialization exceptions in // onModuleLoad2 Scheduler.get().scheduleDeferred(new ScheduledCommand() { - @Override public void execute() { loadMainPanel(); } @@ -111,7 +109,7 @@ public class TabularDataPortlet implements EntryPoint { tabularData = new TabularDataX(Constants.TDX_DATASOURCE_FACTORY_ID); tabularData.addFailureHandler(new FailureEventHandler() { - @Override + public void onFailure(FailureEvent event) { Info.display("Error: " + event.getMessage(), event.getCaught() .getMessage()); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java index f8d818d..627897b 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java @@ -74,7 +74,7 @@ public class ChartsToolBar { pieButton.setArrowAlign(ButtonArrowAlign.BOTTOM); pieButton.addSelectHandler(new SelectHandler() { - @Override + public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -91,7 +91,6 @@ public class ChartsToolBar { barButton.setArrowAlign(ButtonArrowAlign.BOTTOM); barButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -108,7 +107,6 @@ public class ChartsToolBar { curveButton.setArrowAlign(ButtonArrowAlign.BOTTOM); curveButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -124,7 +122,6 @@ public class ChartsToolBar { bullsButton.setArrowAlign(ButtonArrowAlign.BOTTOM); bullsButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -155,7 +152,7 @@ public class ChartsToolBar { gisButton.setArrowAlign(ButtonArrowAlign.BOTTOM); gisButton.addSelectHandler(new SelectHandler() { - @Override + public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -174,7 +171,6 @@ public class ChartsToolBar { rstudioButton.setArrowAlign(ButtonArrowAlign.BOTTOM); rstudioButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON)); @@ -192,7 +188,6 @@ public class ChartsToolBar { statisticalButton.setArrowAlign(ButtonArrowAlign.BOTTOM); statisticalButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON)); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java index 2be4d9d..15843f3 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java @@ -85,7 +85,7 @@ public class FileToolBar { openButton.addSelectHandler(new SelectHandler() { - @Override + public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.OPEN)); } @@ -105,7 +105,6 @@ public class FileToolBar { closeButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.CLOSE)); } @@ -123,7 +122,6 @@ public class FileToolBar { dataLayout.setWidget(0, 2, deleteButton); deleteButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.DELETE)); } @@ -138,7 +136,6 @@ public class FileToolBar { dataLayout.setWidget(1, 2, propertiesButton); propertiesButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.PROPERTIES)); } @@ -164,7 +161,6 @@ public class FileToolBar { importSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM); importSDMXButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTSDMX)); } @@ -178,7 +174,6 @@ public class FileToolBar { importCSVButton.setToolTip("Import table from CSV source"); importCSVButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTCSV)); } @@ -191,7 +186,6 @@ public class FileToolBar { importJSONButton.setToolTip("Import table from JSON source"); importJSONButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTJSON)); } @@ -220,7 +214,6 @@ public class FileToolBar { exportSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM); exportSDMXButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.EXPORTSDMX)); } @@ -235,7 +228,6 @@ public class FileToolBar { exportCSVButton.setToolTip("Export CSV document"); exportCSVButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.EXPORTCSV)); } @@ -248,7 +240,6 @@ public class FileToolBar { exportJSONButton.setToolTip("Export JSON document"); exportJSONButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { eventBus.fireEvent(new RibbonEvent(RibbonType.EXPORTJSON)); } @@ -275,7 +266,6 @@ public class FileToolBar { templateButton.setArrowAlign(ButtonArrowAlign.BOTTOM); templateButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new RibbonEvent( // RibbonType.EXPORTSDMX)); @@ -290,7 +280,6 @@ public class FileToolBar { eventBus.addHandler(UIStateEvent.TYPE, new UIStateEvent.UIStateHandler() { - @Override public void onUIState(UIStateEvent event) { setUI(event); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FormulasToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FormulasToolBar.java index e5e2640..873271a 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FormulasToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FormulasToolBar.java @@ -83,7 +83,7 @@ public class FormulasToolBar { filterButton.setArrowAlign(ButtonArrowAlign.BOTTOM); filterButton.addSelectHandler(new SelectHandler() { - @Override + public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -99,7 +99,6 @@ public class FormulasToolBar { unionButton.setArrowAlign(ButtonArrowAlign.BOTTOM); unionButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -116,7 +115,6 @@ public class FormulasToolBar { denormalizeButton.setArrowAlign(ButtonArrowAlign.BOTTOM); denormalizeButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -134,7 +132,6 @@ public class FormulasToolBar { aggregateButton.setArrowAlign(ButtonArrowAlign.BOTTOM); aggregateButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -163,7 +160,6 @@ public class FormulasToolBar { modifyLabelButton.setArrowAlign(ButtonArrowAlign.BOTTOM); modifyLabelButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -180,7 +176,6 @@ public class FormulasToolBar { modifyColumnTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM); modifyColumnTypeButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -196,7 +191,6 @@ public class FormulasToolBar { modifyColumnValuesButton.setArrowAlign(ButtonArrowAlign.BOTTOM); modifyColumnValuesButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -226,7 +220,6 @@ public class FormulasToolBar { historyButton.setArrowAlign(ButtonArrowAlign.BOTTOM); historyButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } @@ -241,7 +234,6 @@ public class FormulasToolBar { historyLayout.setWidget(0, 1, discardButton); discardButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.CSV)); } @@ -252,7 +244,6 @@ public class FormulasToolBar { historyLayout.setWidget(1, 1, discardAllButton); discardAllButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { //eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON)); } diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java index 6c47d1b..c5bcd1f 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java @@ -20,8 +20,10 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.toolbar.ToolBar; /** - * @author "Federico De Faveri defaveri@isti.cnr.it" * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * */ public class ReviewToolBar { @@ -67,7 +69,7 @@ public class ReviewToolBar { rulesButton.setArrowAlign(ButtonArrowAlign.BOTTOM); rulesButton.addSelectHandler(new SelectHandler() { - @Override + public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON));taskButton @@ -85,7 +87,6 @@ public class ReviewToolBar { manageRulesButton.setArrowAlign(ButtonArrowAlign.BOTTOM); manageRulesButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON));taskButton @@ -104,7 +105,6 @@ public class ReviewToolBar { validationButton.setArrowAlign(ButtonArrowAlign.BOTTOM); validationButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON)); @@ -135,7 +135,6 @@ public class ReviewToolBar { operationsButton.setArrowAlign(ButtonArrowAlign.BOTTOM); operationsButton.addSelectHandler(new SelectHandler() { - @Override public void onSelect(SelectEvent event) { // eventBus.fireEvent(new // ImportTableEvent(ImportTableType.JSON));