Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-08-16 07:14:15 +0000
committerAlexander Kurtakov2017-08-16 07:14:15 +0000
commitad9b589b389150a90287d2b720e51d85c3604c99 (patch)
tree43933164ab894d09d9f4a6db5a0144ce28747e12 /tests
parent3c2de318a32bc45cf1c26d87ac73dec8a99ceeb9 (diff)
downloadeclipse.platform.team-ad9b589b389150a90287d2b720e51d85c3604c99.tar.gz
eclipse.platform.team-ad9b589b389150a90287d2b720e51d85c3604c99.tar.xz
eclipse.platform.team-ad9b589b389150a90287d2b720e51d85c3604c99.zip
Bump service release for changes in o.e.compare.tests.
Change-Id: I518f05535ccafc85baa5795cafb09afa3654e78e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.compare.tests/META-INF/MANIFEST.MF2
-rw-r--r--tests/org.eclipse.compare.tests/pom.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/org.eclipse.compare.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.compare.tests/META-INF/MANIFEST.MF
index 84b5c456d..e2dffabb1 100644
--- a/tests/org.eclipse.compare.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.compare.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.compare.tests;singleton:=true
-Bundle-Version: 3.6.100.qualifier
+Bundle-Version: 3.6.200.qualifier
Require-Bundle: org.junit,
org.eclipse.compare,
org.eclipse.jface.text,
diff --git a/tests/org.eclipse.compare.tests/pom.xml b/tests/org.eclipse.compare.tests/pom.xml
index 58b7d0eae..51ef6594d 100644
--- a/tests/org.eclipse.compare.tests/pom.xml
+++ b/tests/org.eclipse.compare.tests/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.compare</groupId>
<artifactId>org.eclipse.compare.tests</artifactId>
- <version>3.6.100-SNAPSHOT</version>
+ <version>3.6.200-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>

Back to the top

git/diff/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/DataItem.java?id=827c4ebda8ad0f823879d1bf7f6f98a7c1320e4b'>org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/DataItem.java69
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/DataUtils.java42
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/GridItem.java31
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/ImageItem.java10
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/LabelItem.java6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/PageFooterItem.java7
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/PageHeaderItem.java7
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/TableItem.java143
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/TextDataItem.java194
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/item/TextItem.java251
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/exception/NotExistingPrintServiceNameException.java14
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/formatting/ReportDSLFormatter.xtend6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/imports/ShouldImportProvider.java16
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/jvmmodel/ReportDSLJvmModelInferrer.xtend76
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/jvmmodel/ReportGeneratorWorkSet.java18
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/jvmmodel/ReportModelGenerator.xtend189
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/jvmmodel/Utilities.java6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/scoping/ReportDSLScopeProvider.xtend6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/validation/NamesAreUniqueValidator.java6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/validation/ReportDSLValidator.xtend6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/valueconverter/ReportQualifiedNameProvider.java6
-rw-r--r--org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/valueconverter/ReportValueConverterService.java6
59 files changed, 1175 insertions, 535 deletions
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/GenerateReportDSL.mwe2 b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/GenerateReportDSL.mwe2
index f86d20f..4203545 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/GenerateReportDSL.mwe2
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/GenerateReportDSL.mwe2
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSL.xtext b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSL.xtext
index 7624644..ccc7603 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSL.xtext
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSL.xtext
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceRuntimeModule.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceRuntimeModule.java
index b3e1716..e3a2237 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceRuntimeModule.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceRuntimeModule.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceStandaloneSetup.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceStandaloneSetup.java
index 4f535f4..b68e89f 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceStandaloneSetup.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLBundleSpaceStandaloneSetup.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLRuntimeModule.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLRuntimeModule.java
index ca819be..feb569e 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLRuntimeModule.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLRuntimeModule.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLStandaloneSetup.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLStandaloneSetup.java
index 5d775c5..296ea82 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLStandaloneSetup.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/ReportDSLStandaloneSetup.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/XcoreResourceFactory.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/XcoreResourceFactory.java
index cfb216f..6ef5d8e 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/XcoreResourceFactory.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/XcoreResourceFactory.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/AbstractReportBean.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/AbstractReportBean.java
index 3653500..433011f 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/AbstractReportBean.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/AbstractReportBean.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/Activator.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/Activator.java
index c063c26..c31f004 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/Activator.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/Activator.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BaseReport.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BaseReport.java
index 4fa3be5..105f3e1 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BaseReport.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BaseReport.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
@@ -47,10 +49,13 @@ import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement;
import org.eclipse.osbp.dsl.semantic.entity.LEntity;
import org.eclipse.osbp.osgi.hybrid.api.AbstractHybridVaaclipseView;
+import org.eclipse.osbp.preferences.ProductConfiguration;
import org.eclipse.osbp.runtime.common.event.EventDispatcherEvent;
import org.eclipse.osbp.runtime.common.event.EventDispatcherEvent.EventDispatcherCommand;
import org.eclipse.osbp.runtime.common.event.EventDispatcherEvent.EventDispatcherDataTag;
+import org.eclipse.osbp.runtime.common.event.IDualData;
import org.eclipse.osbp.runtime.common.event.IEventDispatcher;
+import org.eclipse.osbp.runtime.common.filter.IDTOServiceWithMutablePersistence;
import org.eclipse.osbp.ui.api.customfields.IBlobService;
import org.eclipse.osbp.ui.api.datamart.DatamartFilter;
import org.eclipse.osbp.ui.api.datamart.DatamartPrimary;
@@ -63,6 +68,7 @@ import org.eclipse.osbp.ui.api.themes.IThemeResourceService;
import org.eclipse.osbp.ui.api.user.IUser;
import org.eclipse.osbp.utils.common.EntityUtils;
import org.eclipse.osbp.utils.constants.ExtendedDate;
+import org.eclipse.osbp.utils.entityhelper.DataType;
import org.eclipse.osbp.utils.vaadin.PropertyLookup;
import org.eclipse.osbp.utils.vaadin.ViewLayoutManager;
import org.eclipse.osbp.xtext.action.ReportActionEnum;
@@ -75,6 +81,7 @@ import org.eclipse.osbp.xtext.datamartdsl.DatamartEntity;
import org.eclipse.osbp.xtext.datamartdsl.DatamartNavigation;
import org.eclipse.osbp.xtext.reportdsl.common.item.BodyItem;
import org.eclipse.osbp.xtext.reportdsl.jvmmodel.ReportGeneratorWorkSet;
+import org.eclipse.xtext.xbase.lib.Extension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -117,16 +124,19 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
protected StreamResource reportResource;
protected transient Map<String, IDataMart> datamartInstanceMap = new HashMap<>();
- /** needs to be equivalent to the datamata ODA bundle symbolic name */
+ /** needs to be equivalent to the dataMart ODA bundle symbolic name */
public static final String DATASOURCE_EXTENSION_ID = "org.eclipse.osbp.xtext.reportdsl.oda.datamart";
/**
- * in order to have data in header and foooter areas we must provide them as
+ * in order to have data in header and footer areas we must provide them as
* translations. to get not mixed up with attribute name translations, this
* prefix must be used
*/
public static final String ATTRIBUTE_TRANSLATION_PREFIX = "$$$";
@Inject
+ private IEclipseContext eclipseContext;
+
+ @Inject
protected IThemeResourceService themeResourceService;
@Inject
@@ -141,6 +151,8 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
@Inject
private IEventDispatcher eventDispatcher;
+ private Object selectedId = null;
+
@Inject
public BaseReport() {
super();
@@ -192,6 +204,10 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
return false;
}
+ protected Object getSelectedId() {
+ return selectedId;
+ }
+
protected abstract List<String> getStaticData();
public void addCss(ReportDesignHandle designHandle) {
@@ -241,12 +257,11 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
protected final void createFilter() {
datamartInstanceMap = getDatamartInstanceMap(user);
- DatamartUiFilterFactory filterFactory = new DatamartUiFilterFactory();
for (Entry<String, IDataMart> datamartInstanceEntry : datamartInstanceMap.entrySet()) {
if (filterGeneratorMap.get(datamartInstanceEntry.getKey()) == null) {
DatamartFilterGenerator filterGenerator = new DatamartFilterGenerator(datamartInstanceEntry.getValue(),
- dslMetadataService);
- filterGenerator.createUIFilters(layoutManager, filterFactory);
+ getContext(), isShowCaption(), Integer.max(10, getNumMultiRows()));
+ filterGenerator.createUIFilters(layoutManager);
filterGeneratorMap.put(datamartInstanceEntry.getKey(), filterGenerator);
}
}
@@ -257,6 +272,10 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
}
protected abstract Map<String, IDataMart> getDatamartInstanceMap(IUser user);
+
+ protected abstract int getNumMultiRows();
+
+ protected abstract boolean isShowCaption();
/**
* @return the explicit given file name of the report design file
@@ -340,23 +359,47 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
@Override
protected final void createComponents() {
- // remove any previous component
- if (frame != null) {
- layoutManager.getDataArea().removeComponent(frame);
- frame = null;
- }
- frame = new BrowserFrame(null, null);
- frame.setAlternateText("unable to display report");
- frame.setSizeFull();
- layoutManager.getDataArea().addComponent(frame);
- layoutManager.getDataArea().setExpandRatio(frame, 1);
+ if (renderAllowed()){
- String filename = getReportFilename() + getFileExtension();
- reportResource = new StreamResource(this, filename);
- reportResource.setCacheTime(0);
- frame.setSource(reportResource);
+ // remove any previous component
+ if (frame != null) {
+ layoutManager.getDataArea().removeComponent(frame);
+ frame = null;
+ }
+ frame = new BrowserFrame(null, null);
+ frame.setAlternateText("unable to display report");
+ frame.setSizeFull();
+ layoutManager.getDataArea().addComponent(frame);
+ layoutManager.getDataArea().setExpandRatio(frame, 1);
+
+ String filename = getReportFilename() + getFileExtension();
+ reportResource = new StreamResource(this, filename);
+ reportResource.setCacheTime(0);
+ frame.setSource(reportResource);
+ }
+ }
+
+ private boolean renderAllowed(){
+ if (getSelectById() && getSelectedId()==null) {
+ for (IDataMart datamartInstance : getDatamartInstanceMap().values()) {
+ for (DatamartFilter filter : datamartInstance.getFilters()) {
+ List<IDualData> selectedData = filter.getSelectedData();
+ if (!selectedData.isEmpty()) {
+ for (IDualData iDualData : selectedData) {
+ if (!"*".equals(iDualData.getFormattedValue()) || !"*".equals(iDualData.getSelectionValue())){
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+ }
+ return false;
+ }
+ return true;
}
+
@SuppressWarnings("serial")
public void addPDFDownload(IToolbarAction target) {
MToolBar toolbar = target.getToolBar();
@@ -384,7 +427,10 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
@Override
public void buttonClick(ClickEvent event) {
- PdfPrintService.printReportAsPdf(BaseReport.this, user.getPrintService());
+ String reportPrinterPref = ProductConfiguration.prefs().getReportPrinter(getReportName());
+ String printer = (reportPrinterPref.length()!=0)?reportPrinterPref:user.getPrintService();
+
+ PdfPrintService.printReportAsPdf(BaseReport.this, printer);
}
});
}
@@ -527,6 +573,10 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
return null;
}
+ public IEclipseContext getEclipseContext() {
+ return eclipseContext;
+ }
+
public IDSLMetadataService getDslMetadataService() {
return dslMetadataService;
}
@@ -571,21 +621,22 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
case SELECT:
if (!event.getSender().equals(getClass().getCanonicalName())) {
for (IDatamartFilterGenerator filterGenerator : filterGeneratorMap.values()) {
- if(filterGenerator.selectItem(event, getSelectById())) {
+ if(filterGenerator.isPrimaryFilterId(event) && filterGenerator.selectItem(event, getSelectById())) {
+ selectedId = event.getData().get(EventDispatcherDataTag.ID);
renderData();
}
}
}
break;
case REFRESH:
- if (!event.getSender().equals(getClass().getCanonicalName())) {
+ if (!event.getSender().equals(getClass().getCanonicalName()) && matchTopic(event)) {
for(Entry<String, IDataMart> entrySet:datamartInstanceMap.entrySet()) {
entrySet.getValue().clearCache();
}
renderData();
for (IDatamartFilterGenerator filterGenerator : filterGeneratorMap.values()) {
if (filterGenerator != null) {
- filterGenerator.createUIFilters(layoutManager);
+ filterGenerator.updateFilter();
}
}
}
@@ -604,6 +655,17 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
}
}
+ private boolean matchTopic (final EventDispatcherEvent event) {
+ for (LEntity entity : getEntities()) {
+ String entityFQName = EntityUtils.getFQNForLEntity(entity);
+ if ((event.getTopic() != null) && (event.getTopic().equals(entityFQName))){
+ return true;
+ }
+ }
+ return false;
+ }
+
+
@SuppressWarnings({ "rawtypes", "unchecked" })
private void detectDeletion(final EventDispatcherEvent event, LEntity entity, String entityName) {
if (entityName.equals(event.getTopic())) {
@@ -615,7 +677,7 @@ public abstract class BaseReport extends AbstractHybridVaaclipseView
renderData();
for (IDatamartFilterGenerator filterGenerator : filterGeneratorMap.values()) {
if (filterGenerator != null) {
- filterGenerator.createUIFilters(layoutManager);
+ filterGenerator.updateFilter();
}
}
}
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BirtEngine.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BirtEngine.java
index d419b9e..d1ec7cb 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BirtEngine.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/BirtEngine.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
@@ -200,16 +202,15 @@ public class BirtEngine {
return get(report, renderer, null);
}
- @SuppressWarnings("unchecked")
public static ByteArrayInputStream get(BaseReport report, Rendering renderer, String path) {
IReportEngine reportEngine = getReportEngine(report);
IReportRunnable design = null;
if(isTaskRunning) {
- LOGGER.debug("get ignored as task is running");
+ LOGGER.debug("{}", "get ignored as task is running");
return null;
}
- LOGGER.debug("get called");
+ LOGGER.debug("{}", "get called");
isTaskRunning = true;
// Open report design
Object object = report.getRunnableOrFilename();
@@ -261,16 +262,14 @@ public class BirtEngine {
return null;
}
+ @SuppressWarnings("unchecked")
private static ByteArrayInputStream taskAndRun(BaseReport report, Rendering renderer, String path,
IReportEngine reportEngine, IReportRunnable design)
throws EngineException, IOException, DocumentException {
ByteArrayInputStream bis = null;
IRunAndRenderTask task = reportEngine.createRunAndRenderTask(design);
task.getAppContext().put(IReportProvider.APPCONTEXT_REPORT, report);
- task.getAppContext().put(IReportProvider.APPCONTEXT_THEMERESOURCESERVICE, report.getThemeResourceService());
- task.getAppContext().put(IReportProvider.APPCONTEXT_DSLMETADATASERVICE, report.getDslMetadataService());
- task.getAppContext().put(IReportProvider.APPCONTEXT_BLOBSERVICE, report.getBlobService());
- task.getAppContext().put(IReportProvider.APPCONTEXT_USER, report.getUser());
+ task.getAppContext().put(IReportProvider.APPCONTEXT_ECLIPSECONTEXT, report.getEclipseContext());
task.getAppContext().put(IReportProvider.APPCONTEXT_DATAMARTINSTANCE, report.getDatamartInstanceMap());
task.getAppContext().put(IReportProvider.APPCONTEXT_PROPERTYLOOKUP, report.getPropertyLookupMap());
task.setLocale(report.getUser().getLocale());
@@ -300,7 +299,6 @@ public class BirtEngine {
task.setRenderOption(options);
// run report
task.run();
- @SuppressWarnings("unchecked")
List<EngineException> errorList = task.getErrors();
for (EngineException error : errorList){
LOGGER.error(task.getClass().getName() + ": " + error.getLocalizedMessage());
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/ColorUtilities.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/ColorUtilities.java
index e181aa9..07c466a 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/ColorUtilities.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/ColorUtilities.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DataTypes.java b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DataTypes.java
index 542b225..79bc777 100644
--- a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DataTypes.java
+++ b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DataTypes.java
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
@@ -40,8 +42,8 @@ public enum DataTypes {
// ??? CLOB(DesignChoiceConstants.COLUMN_DATA_TYPE_CLOB, "Clob", Types.CLOB /*, .class*/),
INTEGER(DataType.INTEGER_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, "Integer", Types.INTEGER, Integer.class),
INT(DataType.INTEGER_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, "Int", Types.INTEGER, Integer.class),
-// ??? why not this ??? LONG(DataType.DECIMAL_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL, "Long", Types.DECIMAL, Long.class),
- LONG(DataType.INTEGER_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, "Long", Types.INTEGER, Long.class, Integer.class, Short.class),
+/* ??? why not this ??? */LONG(DataType.DECIMAL_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL, "Long", Types.DECIMAL, Long.class),
+// LONG(DataType.INTEGER_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, "Long", Types.INTEGER, Long.class, Integer.class, Short.class),
SHORT(DataType.INTEGER_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, "Short", Types.INTEGER, Short.class),
DATE(DataType.SQL_DATE_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_DATE, "Date", Types.DATE, Date.class),
TIME(DataType.SQL_TIME_TYPE, DesignChoiceConstants.COLUMN_DATA_TYPE_TIME, "Time", Types.TIME, Time.class),
@@ -274,6 +276,7 @@ public enum DataTypes {
public static DataTypes typeFor(EType eType) {
switch (eType) {
case BOOLEAN:
+ case BOOLEAN_CHECKBOX:
return DataTypes.BOOLEAN;
case DATE:
return DataTypes.DATE;
@@ -288,13 +291,18 @@ public enum DataTypes {
case LONG:
return DataTypes.LONG;
case STRING:
+ case RICHTEXTAREA:
return DataTypes.STRING;
case TIME:
return DataTypes.TIME;
+ case TIMESTAMP:
+ return DataTypes.TIMESTAMP;
case BLOPMAPPING:
return DataTypes.BLOBMAPPING;
case LENUM:
return DataTypes.INT;
+ default:
+ break;
}
return DataTypes.ANY;
}
diff --git a/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DatatypeUtilities.xtend b/org.eclipse.osbp.xtext.reportdsl/src/org/eclipse/osbp/xtext/reportdsl/common/DatatypeUtilities.xtend
new file mode 100644