summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormianrui.chai2012-04-06 07:23:43 (EDT)
committer mwu2012-04-06 07:23:43 (EDT)
commit65b58c5ddcdfbcf44544035df6618d1cc65f836e (patch)
tree6f7f3a877e4448589cd9e685179294b9deacdbb6
parentba63768040cc1e9e72087d352ae05e39f9b2d1b9 (diff)
downloadorg.eclipse.birt-65b58c5ddcdfbcf44544035df6618d1cc65f836e.zip
org.eclipse.birt-65b58c5ddcdfbcf44544035df6618d1cc65f836e.tar.gz
org.eclipse.birt-65b58c5ddcdfbcf44544035df6618d1cc65f836e.tar.bz2
TED – Issue 48555
Need more precise API to define versatile layout for time period arguments
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/function/layout/ArgumentLayout.java53
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/providers/DefaultDataServiceProvider.java104
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/META-INF/MANIFEST.MF1
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/DataService.java7
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/IDataServiceProvider.java5
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/function/layout/IArgumentLayout.java22
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/ArgumentInfo.java7
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java11
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties9
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java6
10 files changed, 220 insertions, 5 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/function/layout/ArgumentLayout.java b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/function/layout/ArgumentLayout.java
new file mode 100644
index 0000000..e74a13d
--- /dev/null
+++ b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/function/layout/ArgumentLayout.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.birt.report.designer.data.ui.function.layout;
+
+import org.eclipse.birt.report.designer.internal.ui.data.function.layout.IArgumentLayout;
+
+
+public class ArgumentLayout implements IArgumentLayout
+{
+
+ private int layoutHint;
+ private String name;
+ public static final int ALIGN_BLOCK = 0x0;
+ public static final int ALIGN_INLINE = 0x10;
+ public static final int ALIGN_INLINE_BEFORE = 0x10;
+ public static final int LIGN_INLINEL_AFTER = 0x11;
+ public static final int ALIGN_INLINE_NONE = 0x12;
+
+ public ArgumentLayout( String name,int layoutHint )
+ {
+ this.name = name;
+ this.layoutHint=layoutHint;
+ }
+ public ArgumentLayout( String name)
+ {
+ this.name = name;
+ this.layoutHint=ALIGN_BLOCK;
+ }
+
+ public int getLayoutHint( )
+ {
+ return this.layoutHint;
+ }
+
+ public void setLayoutHint( int layoutHint )
+ {
+ this.layoutHint=layoutHint;
+ }
+
+ public String getName( )
+ {
+ return name;
+ }
+
+}
diff --git a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/providers/DefaultDataServiceProvider.java b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/providers/DefaultDataServiceProvider.java
index e2ed3ed..b57bd3f 100644
--- a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/providers/DefaultDataServiceProvider.java
+++ b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/providers/DefaultDataServiceProvider.java
@@ -11,17 +11,24 @@
package org.eclipse.birt.report.designer.data.ui.providers;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.data.adapter.api.DataRequestSession;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.BaseTimeFunction;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.IArgumentInfo;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.IBuildInBaseTimeFunction;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.ITimeFunction;
import org.eclipse.birt.report.designer.data.ui.actions.NewDataSetAction;
import org.eclipse.birt.report.designer.data.ui.dataset.AppContextPopulator;
import org.eclipse.birt.report.designer.data.ui.dataset.AppContextResourceReleaser;
import org.eclipse.birt.report.designer.data.ui.dataset.ExternalUIUtil;
+import org.eclipse.birt.report.designer.data.ui.function.layout.ArgumentLayout;
import org.eclipse.birt.report.designer.internal.ui.data.IDataServiceProvider;
+import org.eclipse.birt.report.designer.internal.ui.data.function.layout.IArgumentLayout;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.DataSourceHandle;
import org.eclipse.birt.report.model.api.Expression;
@@ -106,4 +113,101 @@ public class DefaultDataServiceProvider implements IDataServiceProvider
{
ExternalUIUtil.updateColumnCache( dataSetHandle, holdEvent );
}
+
+ public List<IArgumentLayout> getArgumentLayout( ITimeFunction function,
+ List<IArgumentInfo> infos )
+ {
+ IArgumentLayout layout1;
+ List<IArgumentLayout> layoutarguments = new ArrayList<IArgumentLayout>( );
+
+ layout1 = new ArgumentLayout( IArgumentInfo.PERIOD_1,ArgumentLayout.ALIGN_INLINE_NONE);
+ function = (BaseTimeFunction) function;
+ if ( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_MONTH ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1,ArgumentLayout.ALIGN_INLINE_NONE));
+ }
+ else
+ if( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_QUARTER ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1,ArgumentLayout.ALIGN_INLINE_NONE) );
+ }
+ else
+ if( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_YEAR ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1,ArgumentLayout.ALIGN_INLINE_NONE ));
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.WEEK_TO_DATE_LAST_YEAR ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1,ArgumentLayout.ALIGN_INLINE_NONE));
+ }
+ else
+ if( function.getName( ).equals( IBuildInBaseTimeFunction.MONTH_TO_DATE_LAST_YEAR ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1,ArgumentLayout.ALIGN_INLINE_NONE));
+ }
+ else
+ if( function.getName( ).equals( IBuildInBaseTimeFunction.QUARTER_TO_DATE_LAST_YEAR ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1) );
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_WEEK_TO_DATE ) )
+ {
+ layoutarguments.add( new ArgumentLayout(IArgumentInfo.N_PERIOD1));
+ }
+ else
+ if( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_MONTH_TO_DATE ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1));
+ }
+ else if( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_QUARTER_TO_DATE ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1));
+
+ }
+ else if( function.getName( ).equals( IBuildInBaseTimeFunction.PREVIOUS_YEAR_TO_DATE ))
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1 ) );
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO ) )
+ {
+
+ layoutarguments.add( layout1 );
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD2));
+
+
+ layoutarguments.add( new ArgumentLayout(IArgumentInfo.PERIOD_2,ArgumentLayout.LIGN_INLINEL_AFTER ));
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.PERIOD_TO_DATE_FROM_N_PERIOD_AGO ) )
+ {
+
+ layoutarguments.add( layout1 );
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD2 ) );
+
+ layoutarguments.add(new ArgumentLayout( IArgumentInfo.PERIOD_2,ArgumentLayout.LIGN_INLINEL_AFTER));
+ }
+ else if( function.getName( ).equals( IBuildInBaseTimeFunction.TRAILING_N_MONTHS ))
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1 ) );
+ }
+ else if( function.getName( ).equals( IBuildInBaseTimeFunction.TRAILING_N_DAYS ))
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1) );
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.TRAILING_N_PERIOD_FROM_N_PERIOD_AGO ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1 ) );
+
+ layoutarguments.add(new ArgumentLayout( IArgumentInfo.PERIOD_1, ArgumentLayout.ALIGN_INLINE_NONE));
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD2) );
+
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.PERIOD_2,ArgumentLayout.LIGN_INLINEL_AFTER) );
+ }
+ else if ( function.getName( ).equals( IBuildInBaseTimeFunction.NEXT_N_PERIODS ) )
+ {
+ layoutarguments.add( new ArgumentLayout( IArgumentInfo.N_PERIOD1) );
+
+ layoutarguments.add(new ArgumentLayout( IArgumentInfo.PERIOD_1,ArgumentLayout.ALIGN_INLINE_NONE));
+ }
+ return layoutarguments;
+ }
}
diff --git a/UI/org.eclipse.birt.report.designer.ui/META-INF/MANIFEST.MF b/UI/org.eclipse.birt.report.designer.ui/META-INF/MANIFEST.MF
index 4adf1c8..e39a874 100644
--- a/UI/org.eclipse.birt.report.designer.ui/META-INF/MANIFEST.MF
+++ b/UI/org.eclipse.birt.report.designer.ui/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@ Export-Package: org.eclipse.birt.report.designer.data.ui.aggregation,
org.eclipse.birt.report.designer.internal.ui.actions,
org.eclipse.birt.report.designer.internal.ui.command,
org.eclipse.birt.report.designer.internal.ui.data,
+ org.eclipse.birt.report.designer.internal.ui.data.function.layout,
org.eclipse.birt.report.designer.internal.ui.dialogs,
org.eclipse.birt.report.designer.internal.ui.dialogs.expression,
org.eclipse.birt.report.designer.internal.ui.dialogs.helper,
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/DataService.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/DataService.java
index fc47dc8..db3e51a 100644
--- a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/DataService.java
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/DataService.java
@@ -17,6 +17,9 @@ import java.util.List;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.data.adapter.api.DataRequestSession;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.IArgumentInfo;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.ITimeFunction;
+import org.eclipse.birt.report.designer.internal.ui.data.function.layout.IArgumentLayout;
import org.eclipse.birt.report.designer.ui.views.ElementAdapterManager;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.olap.CubeHandle;
@@ -137,4 +140,8 @@ public class DataService
provider.updateColumnCache( dataSetHandle, holdEvent );
}
+ public List<IArgumentLayout> getArgumentLayout(ITimeFunction function,List<IArgumentInfo> infos)
+ {
+ return provider.getArgumentLayout( function, infos );
+ }
}
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/IDataServiceProvider.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/IDataServiceProvider.java
index 482a788..a91afd9 100644
--- a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/IDataServiceProvider.java
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/IDataServiceProvider.java
@@ -16,6 +16,9 @@ import java.util.List;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.data.adapter.api.DataRequestSession;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.IArgumentInfo;
+import org.eclipse.birt.report.data.adapter.api.timeFunction.ITimeFunction;
+import org.eclipse.birt.report.designer.internal.ui.data.function.layout.IArgumentLayout;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.olap.CubeHandle;
import org.eclipse.birt.report.model.api.Expression;
@@ -59,4 +62,6 @@ public interface IDataServiceProvider
* @throws BirtException
*/
void unRegisterSession( DataRequestSession session ) throws BirtException;
+
+ List<IArgumentLayout> getArgumentLayout(ITimeFunction function,List<IArgumentInfo> infos);
}
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/function/layout/IArgumentLayout.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/function/layout/IArgumentLayout.java
new file mode 100644
index 0000000..a8c24d6
--- /dev/null
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/data/function/layout/IArgumentLayout.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.birt.report.designer.internal.ui.data.function.layout;
+
+
+public interface IArgumentLayout
+{
+
+ public int getLayoutHint( );
+
+ public void setLayoutHint( int layoutHint );
+
+ public String getName( );
+}
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/ArgumentInfo.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/ArgumentInfo.java
index 1b840f8..4cca6e6 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/ArgumentInfo.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/ArgumentInfo.java
@@ -78,4 +78,11 @@ public class ArgumentInfo implements IArgumentInfo
{
return this.displayName;
}
+ /**
+ * set display name for argument
+ */
+ public void setDisplayname( String displayName)
+ {
+ this.displayName = displayName;
+ }
}
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
index 5924913..b016ae9 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/timeFunction/BaseTimeFunction.java
@@ -181,12 +181,14 @@ public class BaseTimeFunction implements ITimeFunction
}
}
( (ArgumentInfo) period1 ).setPeriodChoices( period_type1 );
+ ( (ArgumentInfo) period1 ).setDisplayname( Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_CURRENT_DISPLAYNAME ) );
arguments.add( period1 );
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD2,
Message.getMessage( ResourceConstants.TIMEFUNCITON_N2_DISPLAYNAME ),
Message.getMessage( ResourceConstants.TIMEFUNCITON_N2 ),
false ) );
( (ArgumentInfo) period2 ).setPeriodChoices( period_type2 );
+ ( (ArgumentInfo) period2 ).setDisplayname(Message.getMessage(ResourceConstants.TIMEFUNCITON_N2_AGO_DISPLAYNAME));
arguments.add( period2 );
}
else if ( this.name.equals( IBuildInBaseTimeFunction.PERIOD_TO_DATE_FROM_N_PERIOD_AGO ) )
@@ -202,18 +204,20 @@ public class BaseTimeFunction implements ITimeFunction
}
}
( (ArgumentInfo) period1 ).setPeriodChoices( period_type1 );
+ ( (ArgumentInfo) period1 ).setDisplayname( (Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_PERIOD_DISPLAYNAME )) );
arguments.add( period1 );
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD2,
Message.getMessage( ResourceConstants.TIMEFUNCITON_N2_DISPLAYNAME ),
Message.getMessage( ResourceConstants.TIMEFUNCITON_N2 ),
false ) );
( (ArgumentInfo) period2 ).setPeriodChoices( period_type2 );
+ ( (ArgumentInfo) period2 ).setDisplayname(Message.getMessage(ResourceConstants.TIMEFUNCITON_N2_AGO_DISPLAYNAME));
arguments.add( period2);
}
else if( this.name.equals( IBuildInBaseTimeFunction.TRAILING_N_MONTHS ))
{
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_N1_MONTH_DISPLAYNAME ),
Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_MONTH ),
true ) );
}
@@ -228,7 +232,7 @@ public class BaseTimeFunction implements ITimeFunction
{
( (ArgumentInfo) period1 ).setPeriodChoices( period_type1 );
arguments.add( new ArgumentInfo( IArgumentInfo.N_PERIOD1,
- Message.getMessage( ResourceConstants.TIMEFUNCITON_N1_DISPLAYNAME ),
+ Message.getMessage( ResourceConstants.TIMEFUNCITON_TRAILING_N1_DISPLAYNAME ),
Message.getMessage( ResourceConstants.TIMEFUNCITON_N1 ),
false ) );
arguments.add( period1 );
@@ -237,7 +241,8 @@ public class BaseTimeFunction implements ITimeFunction
Message.getMessage( ResourceConstants.TIMEFUNCITON_N2 ),
false ) );
( (ArgumentInfo) period2 ).setPeriodChoices( period_type2 );
- arguments.add( period2 );
+ ( (ArgumentInfo) period2 ).setDisplayname(Message.getMessage(ResourceConstants.TIMEFUNCITON_N2_AGO_DISPLAYNAME));
+ arguments.add( period2 );
}
else if ( this.name.equals( IBuildInBaseTimeFunction.NEXT_N_PERIODS ) )
{
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
index f5f99d8..ef1b037 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/Messages.properties
@@ -112,8 +112,13 @@ timeFunction.N2 = N value for second period
timeFunction.PERIOD1.displayName = The &first period
timeFunction.PERIOD2.displayName = The second pe&riod
timeFunction.N1.displayName = Number of period Ago
-timeFunction.N2.displayName = Number of period Ago
-timeFunction.N1.next.displayName = Number of period Next
+timeFunction.N2.displayName = From
+timeFunction.N1.next.displayName = Next
+timeFunction.N2.Ago.displayName=Ago
+timeFunction.N1.current.displayName=Current
+timeFunction.N1.period.displayName= Period
+timeFunction.trailing.N1.period.displayName=Trailing
+timeFunction.trailing.N1.Month.displayName= Number of Trailing Month(s)
timeFunction.N1.Year.displayName = Number of Year(s) Ago
timeFunction.N2.Year.displayName = Number of Year(s) Ago
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
index c27e7ae..d73480a 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/i18n/ResourceConstants.java
@@ -126,6 +126,10 @@ public class ResourceConstants
public final static String TIMEFUNCITON_N1_DISPLAYNAME = "timeFunction.N1.displayName";
public final static String TIMEFUNCITON_N2_DISPLAYNAME = "timeFunction.N2.displayName";
public final static String TIMEFUNCTION_N1_NEXT_DISPLAYNAME = "timeFunction.N1.next.displayName";
+ public static final String TIMEFUNCITON_N2_AGO_DISPLAYNAME = "timeFunction.N2.Ago.displayName";
+ public static final String TIMEFUNCITON_N1_CURRENT_DISPLAYNAME = "timeFunction.N1.current.displayName";
+ public static final String TIMEFUNCITON_N1_PERIOD_DISPLAYNAME = "timeFunction.N1.period.displayName";
+ public static final String TIMEFUNCITON_TRAILING_N1_DISPLAYNAME = "timeFunction.trailing.N1.period.displayName";
public final static String TIMEFUNCITON_N1_YEAR_DISPLAYNAME = "timeFunction.N1.Year.displayName";
public final static String TIMEFUNCITON_N2_YEAR_DISPLAYNAME = "timeFunction.N2.Year.displayName";
@@ -136,6 +140,8 @@ public class ResourceConstants
public final static String TIMEFUNCITON_N1_WEEK_DISPLAYNAME = "timeFunction.N1.Week.displayName";
public final static String TIMEFUNCITON_N2_WEEK_DISPLAYNAME = "timeFunction.N2.Week.displayName";
public final static String TIMEFUNCITON_N1_DAY_DISPLAYNAME = "timeFunction.N1.Day.displayName";
+ public final static String TIMEFUNCITON_TRAILING_N1_MONTH_DISPLAYNAME = "timeFunction.trailing.N1.Month.displayName";
+
public final static String TIMEFUNCITON_PERIODCHOICE_YEAR_DISPLAYNAME = "timeFunction.PERIODCHOICE.YEAR_displayName";
public final static String TIMEFUNCITON_PERIODCHOICE_QUARTER_DISPLAYNAME = "timeFunction.PERIODCHOICE.QUARTER_displayName";