use of org.talend.dataquality.indicators.DatePatternFreqIndicator in project tdq-studio-se by Talend.
the class IndicatorSelectDialog method isMatchCurrentIndicator.
public boolean isMatchCurrentIndicator(ModelElementIndicator currentIndicator, IIndicatorNode indicatorNode) {
boolean returnValueForCurrentIndicator = true;
IIndicatorNode parentNode = indicatorNode.getParent();
boolean isParentPhoneStatistics = parentNode != null && parentNode.getIndicatorInstance() != null && parentNode.getIndicatorInstance() instanceof PhoneNumbStatisticsIndicator;
if (!ModelElementIndicatorRule.match(indicatorNode, currentIndicator, this.language)) {
returnValueForCurrentIndicator = false;
}
Indicator indicatorInstance = indicatorNode.getIndicatorInstance();
if (null != indicatorInstance && !(indicatorInstance instanceof DatePatternFreqIndicator) && null != indicatorInstance.getIndicatorDefinition() && indicatorInstance.getIndicatorDefinition().getSqlGenericExpression().size() < 1 && ExecutionLanguage.SQL.equals(language) && !UDIHelper.isJavaUDI(indicatorInstance) && !indicatorNode.hasChildren() && !(currentIndicator instanceof DelimitedFileIndicator) && !isParentPhoneStatistics) {
returnValueForCurrentIndicator = false;
}
return returnValueForCurrentIndicator;
}
use of org.talend.dataquality.indicators.DatePatternFreqIndicator in project tdq-studio-se by Talend.
the class IndicatorCommonUtil method handleFrequency.
/**
* DOC xqliu Comment method "handleFrequency".
*
* @param indicator
* @return
*/
private static Object handleFrequency(Indicator indicator) {
FrequencyExt[] frequencyExt = null;
if (UDIHelper.isUDI(indicator)) {
UserDefIndicator udi = (UserDefIndicator) indicator;
Set<Object> valueSet = udi.getDistinctValues();
if (valueSet == null) {
return null;
}
frequencyExt = new FrequencyExt[valueSet.size()];
int i = 0;
for (Object o : valueSet) {
frequencyExt[i] = new FrequencyExt();
frequencyExt[i].setKey(o);
frequencyExt[i].setValue(udi.getCount(o));
frequencyExt[i].setFrequency(udi.getFrequency(o));
i++;
}
} else if (IndicatorEnum.DatePatternFreqIndicatorEnum.getIndicatorType().isInstance(indicator)) {
DatePatternFreqIndicator datePatternFrequency = (DatePatternFreqIndicator) indicator;
Map<String, Long> results = datePatternFrequency.getResult();
frequencyExt = new FrequencyExt[results.size()];
int i = 0;
for (String key : results.keySet()) {
Long value = results.get(key);
Double frequency = datePatternFrequency.getFrequency(key);
frequencyExt[i] = new FrequencyExt();
frequencyExt[i].setKey(key);
frequencyExt[i].setValue(value);
frequencyExt[i].setFrequency(frequency);
i++;
}
} else {
FrequencyIndicator frequency = (FrequencyIndicator) indicator;
Set<Object> valueSet = frequency.getDistinctValues();
if (valueSet == null) {
return null;
}
frequencyExt = new FrequencyExt[valueSet.size()];
int i = 0;
for (Object o : valueSet) {
frequencyExt[i] = new FrequencyExt();
frequencyExt[i].setKey(o);
if (IndicatorsPackage.eINSTANCE.getSoundexFreqIndicator().equals(frequency.eClass()) || IndicatorsPackage.eINSTANCE.getSoundexLowFreqIndicator().equals(frequency.eClass())) {
// MOD scorreia 2009-03-23 display distinct count when working with Soundex
frequencyExt[i].setValue(((SoundexFreqIndicator) frequency).getDistinctCount(o));
} else {
frequencyExt[i].setValue(frequency.getCount(o));
}
frequencyExt[i].setFrequency(frequency.getFrequency(o));
i++;
}
}
return frequencyExt;
}
use of org.talend.dataquality.indicators.DatePatternFreqIndicator in project tdq-studio-se by Talend.
the class IndicatorParametersImplTest method testEBasicSetContainerInternalEObjectInt.
/**
* Test method for
* {@link org.talend.dataquality.indicators.impl.IndicatorParametersImpl#eBasicSetContainer(org.eclipse.emf.ecore.InternalEObject, int)}
* .
*/
@Test
public void testEBasicSetContainerInternalEObjectInt() {
IndicatorDefaultValueServiceUtil.getIstance().getIndicatorDVService().setFrequencyLimitResult(FREQUENCYRESULTLIMIT);
IndicatorDefaultValueServiceUtil.getIstance().getIndicatorDVService().setLowFrequencyLimitResult(LOWFREQUENCYRESULTLIMIT);
// freqyency value indicator
FrequencyIndicator createFrequencyIndicator = IndicatorsFactory.eINSTANCE.createFrequencyIndicator();
createFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createFrequencyIndicator.getParameters().getTopN());
// low freqyency value indicator
LowFrequencyIndicator createLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createLowFrequencyIndicator();
createLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createLowFrequencyIndicator.getParameters().getTopN());
// date freqyency value indicator
DateFrequencyIndicator createDateFrequencyIndicator = IndicatorsFactory.eINSTANCE.createDateFrequencyIndicator();
createDateFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createDateFrequencyIndicator.getParameters().getTopN());
// date low freqyency value indicator
DateLowFrequencyIndicator createDateLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createDateLowFrequencyIndicator();
createDateLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createDateLowFrequencyIndicator.getParameters().getTopN());
// week freqyency value indicator
WeekFrequencyIndicator createWeekFrequencyIndicator = IndicatorsFactory.eINSTANCE.createWeekFrequencyIndicator();
createWeekFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createWeekFrequencyIndicator.getParameters().getTopN());
// week low freqyency value indicator
WeekLowFrequencyIndicator createWeekLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createWeekLowFrequencyIndicator();
createWeekLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createWeekLowFrequencyIndicator.getParameters().getTopN());
// Month freqyency value indicator
MonthFrequencyIndicator createMonthFrequencyIndicator = IndicatorsFactory.eINSTANCE.createMonthFrequencyIndicator();
createMonthFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createMonthFrequencyIndicator.getParameters().getTopN());
// Month low freqyency value indicator
MonthLowFrequencyIndicator createMonthLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createMonthLowFrequencyIndicator();
createMonthLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createMonthLowFrequencyIndicator.getParameters().getTopN());
// quarter freqyency value indicator
QuarterFrequencyIndicator createQuarterFrequencyIndicator = IndicatorsFactory.eINSTANCE.createQuarterFrequencyIndicator();
createQuarterFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createQuarterFrequencyIndicator.getParameters().getTopN());
// quarter low freqyency value indicator
QuarterLowFrequencyIndicator createQuarterLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createQuarterLowFrequencyIndicator();
createQuarterLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createQuarterLowFrequencyIndicator.getParameters().getTopN());
// year freqyency value indicator
YearFrequencyIndicator createYearFrequencyIndicator = IndicatorsFactory.eINSTANCE.createYearFrequencyIndicator();
createYearFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createYearFrequencyIndicator.getParameters().getTopN());
// year low freqyency value indicator
YearLowFrequencyIndicator createYearLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createYearLowFrequencyIndicator();
createYearLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createYearLowFrequencyIndicator.getParameters().getTopN());
// bin freqyency value indicator
BinFrequencyIndicator createBinFrequencyIndicator = IndicatorsFactory.eINSTANCE.createBinFrequencyIndicator();
createBinFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createBinFrequencyIndicator.getParameters().getTopN());
// bin low freqyency value indicator
BinLowFrequencyIndicator createBinLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createBinLowFrequencyIndicator();
createBinLowFrequencyIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createBinLowFrequencyIndicator.getParameters().getTopN());
// pattern freqyency value indicator
PatternFreqIndicator createPatternFreqIndicator = IndicatorsFactory.eINSTANCE.createPatternFreqIndicator();
createPatternFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createPatternFreqIndicator.getParameters().getTopN());
// pattern low freqyency value indicator
PatternLowFreqIndicator createPatternLowFreqIndicator = IndicatorsFactory.eINSTANCE.createPatternLowFreqIndicator();
createPatternLowFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createPatternLowFreqIndicator.getParameters().getTopN());
// east asia freqyency value indicator
EastAsiaPatternFreqIndicator createEastAsiaPatternFreqIndicator = IndicatorsFactory.eINSTANCE.createEastAsiaPatternFreqIndicator();
createEastAsiaPatternFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createEastAsiaPatternFreqIndicator.getParameters().getTopN());
// east asia low freqyency value indicator
EastAsiaPatternLowFreqIndicator createEastAsiaPatternLowFreqIndicator = IndicatorsFactory.eINSTANCE.createEastAsiaPatternLowFreqIndicator();
createEastAsiaPatternLowFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createEastAsiaPatternLowFreqIndicator.getParameters().getTopN());
// soundex freqyency value indicator
SoundexFreqIndicator createSoundexFreqIndicator = IndicatorsFactory.eINSTANCE.createSoundexFreqIndicator();
createSoundexFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createSoundexFreqIndicator.getParameters().getTopN());
// soundex low freqyency value indicator
SoundexLowFreqIndicator createSoundexLowFreqIndicator = IndicatorsFactory.eINSTANCE.createSoundexLowFreqIndicator();
createSoundexLowFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(LOWFREQUENCYRESULTLIMIT, createSoundexLowFreqIndicator.getParameters().getTopN());
// Date pattern freqyency value indicator
DatePatternFreqIndicator createDatePatternFreqIndicator = IndicatorsFactory.eINSTANCE.createDatePatternFreqIndicator();
createDatePatternFreqIndicator.setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
Assert.assertEquals(FREQUENCYRESULTLIMIT, createDatePatternFreqIndicator.getParameters().getTopN());
}
use of org.talend.dataquality.indicators.DatePatternFreqIndicator in project tdq-studio-se by Talend.
the class DrillDownEditorInput method filterAdaptDataList.
/**
* @return get the data which will be displayed on the drill down editor.
*/
public List<Object[]> filterAdaptDataList() {
// get columnValue
List<Object[]> newColumnElementList = new ArrayList<Object[]>();
AnalyzedDataSet analysisDataSet = this.getAnalysis().getResults().getIndicToRowMap().get(currIndicator);
// TDQ-10545 : when restart studio and without run analysis, analysisDataSet is null
if (analysisDataSet == null) {
return newColumnElementList;
}
// TDQ-10545~
if (analysisDataSet.getData() != null && analysisDataSet.getData().size() > 0) {
List<Object[]> dataList = analysisDataSet.getData();
newColumnElementList.addAll(getDesignatedData(dataList));
} else if (analysisDataSet.getFrequencyData() != null && analysisDataSet.getFrequencyData().size() > 0) {
String selectValue = this.getSelectValue();
if (currIndicator instanceof LengthIndicator) {
selectValue = ((LengthIndicator) currIndicator).getLength().toString();
}
// MOD yyi 2011-12-14 TDQ-4166:View rows for Date Pattern Frequency Indicator.
if (currIndicator instanceof DatePatternFreqIndicator) {
for (Object expression : analysisDataSet.getFrequencyData().keySet()) {
if (Pattern.matches(((DatePatternFreqIndicator) currIndicator).getRegex(selectValue), expression.toString())) {
newColumnElementList.addAll(analysisDataSet.getFrequencyData().get(expression));
}
}
} else {
// MOD msjian TDQ-4617 2012-2-8: fixed a NPE
List<Object[]> list = analysisDataSet.getFrequencyData().get(selectValue);
if (list != null && list.size() > 0) {
newColumnElementList.addAll(list);
}
// TDQ-4617 ~
}
} else if (analysisDataSet.getPatternData() != null && analysisDataSet.getPatternData().size() > 0) {
if (DrillDownUtils.judgeMenuType(getMenuType(), DrillDownUtils.MENU_INVALID_TYPE)) {
newColumnElementList.addAll(getDesignatedData((List<Object[]>) analysisDataSet.getPatternData().get(AnalyzedDataSetImpl.INVALID_VALUE)));
} else if (DrillDownUtils.judgeMenuType(getMenuType(), DrillDownUtils.MENU_VALID_TYPE)) {
newColumnElementList.addAll(getDesignatedData((List<Object[]>) analysisDataSet.getPatternData().get(AnalyzedDataSetImpl.VALID_VALUE)));
}
}
return newColumnElementList;
}
use of org.talend.dataquality.indicators.DatePatternFreqIndicator in project tdq-studio-se by Talend.
the class ChartTableFactory method addMenuAndTip.
public static void addMenuAndTip(final TableViewer tbViewer, final IDataExplorer explorer, final Analysis analysis) {
final Table table = tbViewer.getTable();
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
// MOD xqliu 2009-05-11 bug 6561
if (table.getMenu() != null) {
table.getMenu().setVisible(false);
}
if (e.button == 3) {
StructuredSelection selection = (StructuredSelection) tbViewer.getSelection();
final ChartDataEntity dataEntity = (ChartDataEntity) selection.getFirstElement();
final Indicator indicator = dataEntity != null ? dataEntity.getIndicator() : null;
if (indicator != null && dataEntity != null) {
Menu menu = new Menu(table.getShell(), SWT.POP_UP);
table.setMenu(menu);
MenuItemEntity[] itemEntities = ChartTableMenuGenerator.generate(explorer, analysis, dataEntity);
if (ExecutionLanguage.SQL == analysis.getParameters().getExecutionLanguage()) {
boolean showExtraMenu = false;
for (final MenuItemEntity itemEntity : itemEntities) {
MenuItem item = new MenuItem(menu, SWT.PUSH);
item.setText(itemEntity.geti18nLabel());
item.setImage(itemEntity.getIcon());
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e1) {
// DBMSLanguage.
if (isPatternMatchingIndicator(indicator) && !((PatternExplorer) explorer).isImplementRegexFunction(itemEntity.getLabel())) {
MessageDialog.openInformation(null, itemEntity.getLabel(), // $NON-NLS-1$
DefaultMessagesImpl.getString("ChartTableFactory.NoSupportPatternTeradata"));
return;
}
String query = itemEntity.getQuery();
String editorName = indicator.getName();
Connection tdDataProvider = (Connection) analysis.getContext().getConnection();
SqlExplorerUtils.getDefault().runInDQViewer(tdDataProvider, query, editorName);
}
});
// condition columns
if (IndicatorHelper.isWhereRuleIndicator(indicator)) {
// MOD yyin 20121126 TDQ-6477,show the menu only when Join condition exists
WhereRuleIndicator ind = (WhereRuleIndicator) indicator;
EList<JoinElement> joinConditions = ind.getJoinConditions();
if (joinConditions.size() > 0) {
showExtraMenu = true;
}
}
if (isPatternFrequencyIndicator(indicator) && !isEastAsiaPatternFrequencyIndicator(indicator)) {
createMenuOfGenerateRegularPattern(analysis, menu, dataEntity);
}
}
// show extra menu to create simple analysis, help user to find the duplicated rows
if (showExtraMenu) {
MenuItem itemCreateWhereRule = new MenuItem(menu, SWT.PUSH);
itemCreateWhereRule.setText(DefaultMessagesImpl.getString(// $NON-NLS-1$
"ChartTableFactory.JoinConditionColumnsAnalysis"));
itemCreateWhereRule.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e1) {
final StructuredSelection selectionOne = (StructuredSelection) tbViewer.getSelection();
// MOD xqliu 2012-05-11 TDQ-5314
Object firstElement = selectionOne.getFirstElement();
if (firstElement instanceof WhereRuleChartDataEntity) {
// get the WhereRuleIndicator
WhereRuleChartDataEntity wrChartDataEntity = (WhereRuleChartDataEntity) firstElement;
WhereRuleIndicator wrInd = (WhereRuleIndicator) wrChartDataEntity.getIndicator();
// run the CreateDuplicatesAnalysisAction
CreateDuplicatesAnalysisAction action = new CreateDuplicatesAnalysisAction(buildColumnsMap(wrInd));
action.run();
}
// ~ TDQ-5314
}
/**
* DOC xqliu Comment method "buildColumnsMap".
*
* @param wrInd
* @return
*/
private Map<ColumnSet, List<TdColumn>> buildColumnsMap(WhereRuleIndicator wrInd) {
Map<ColumnSet, List<TdColumn>> map = new HashMap<ColumnSet, List<TdColumn>>();
// get all columns from the WhereRuleIndicator
List<TdColumn> columns = new ArrayList<TdColumn>();
EList<JoinElement> joinConditions = wrInd.getJoinConditions();
for (JoinElement joinElement : joinConditions) {
// add left column
TdColumn tempColumn = (TdColumn) joinElement.getColA();
if (!columns.contains(tempColumn)) {
columns.add(tempColumn);
}
// add right column
tempColumn = (TdColumn) joinElement.getColB();
if (!columns.contains(tempColumn)) {
columns.add(tempColumn);
}
}
// build the map
for (TdColumn column : columns) {
ColumnSet columnSet = ColumnHelper.getColumnOwnerAsColumnSet(column);
List<TdColumn> list = map.get(columnSet);
if (list == null) {
list = new ArrayList<TdColumn>();
map.put(columnSet, list);
}
list.add(column);
}
// get the user selected map
return getUserSelectedMap(map);
}
/**
* DOC xqliu Comment method "getUserSelectedMap".
*
* @param map
* @return
*/
private Map<ColumnSet, List<TdColumn>> getUserSelectedMap(Map<ColumnSet, List<TdColumn>> map) {
Map<ColumnSet, List<TdColumn>> userMap = new HashMap<ColumnSet, List<TdColumn>>();
// get the column nodes
List<RepositoryNode> columnNodes = getColumnNodes(map);
// get the connection node
RepositoryNode rootNode = getConnectionNode(map);
// show the dialog, let user select the columns
if (!columnNodes.isEmpty() && rootNode != null) {
ColumnsMapSelectionDialog dialog = new ColumnsMapSelectionDialog(null, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), // $NON-NLS-1$
DefaultMessagesImpl.getString("ColumnsMapSelectionDialog.columnSelection"), // $NON-NLS-1$
columnNodes, // $NON-NLS-1$
rootNode, // $NON-NLS-1$
DefaultMessagesImpl.getString("ColumnsMapSelectionDialog.columnSelections"));
dialog.setAllMap(map);
if (dialog.open() == Window.OK) {
userMap = dialog.getUserMap();
}
}
return userMap;
}
/**
* DOC xqliu Comment method "getConnectionNode".
*
* @param map
* @return
*/
private RepositoryNode getConnectionNode(Map<ColumnSet, List<TdColumn>> map) {
RepositoryNode node = null;
if (map != null && !map.isEmpty()) {
Connection connection = ConnectionHelper.getConnection(map.keySet().iterator().next());
if (connection != null) {
node = RepositoryNodeHelper.recursiveFind(connection);
}
}
return node;
}
/**
* DOC xqliu Comment method "getColumnNodes".
*
* @param map
* @return
*/
private List<RepositoryNode> getColumnNodes(Map<ColumnSet, List<TdColumn>> map) {
List<RepositoryNode> nodes = new ArrayList<RepositoryNode>();
if (map != null && !map.isEmpty()) {
List<TdColumn> columns = new ArrayList<TdColumn>();
Set<ColumnSet> keySet = map.keySet();
for (ColumnSet cs : keySet) {
columns.addAll(map.get(cs));
}
if (!columns.isEmpty()) {
for (TdColumn column : columns) {
nodes.add(RepositoryNodeHelper.recursiveFind(column));
}
}
}
return nodes;
}
});
}
} else {
if (analysis.getParameters().isStoreData()) {
// if allow drill down
if (indicator.isUsedMapDBMode()) {
DrillDownUtils.createDrillDownMenuForMapDB(dataEntity, menu, itemEntities, analysis);
} else {
DrillDownUtils.createDrillDownMenuForJava(dataEntity, menu, itemEntities, analysis);
}
if (isPatternFrequencyIndicator(indicator) && !isEastAsiaPatternFrequencyIndicator(indicator)) {
for (final MenuItemEntity itemEntity : itemEntities) {
createMenuOfGenerateRegularPattern(analysis, menu, dataEntity);
}
}
}
// MOD by zshen feature 11574:add menu "Generate regular pattern" to date pattern
if (isDatePatternFrequencyIndicator(indicator)) {
final DatePatternFreqIndicator dateIndicator = (DatePatternFreqIndicator) indicator;
MenuItem itemCreatePatt = new MenuItem(menu, SWT.PUSH);
// $NON-NLS-1$
itemCreatePatt.setText(DefaultMessagesImpl.getString("ChartTableFactory.GenerateRegularPattern"));
itemCreatePatt.setImage(ImageLib.getImage(ImageLib.PATTERN_REG));
itemCreatePatt.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e1) {
DbmsLanguage language = DbmsLanguageFactory.createDbmsLanguage(analysis);
IFolder folder = ResourceManager.getPatternRegexFolder();
String model = dataEntity.getLabel();
String regex = dateIndicator.getRegex(model);
new CreatePatternAction(folder, ExpressionType.REGEXP, "'" + regex + "'", model == null ? "" : "match \"" + model + "\"", language.getDbmsName()).run();
}
});
}
}
addJobGenerationMenu(menu, analysis, indicator);
// ~11574
menu.setVisible(true);
}
}
}
});
// add tooltip
TableUtils.addTooltipForTable(table);
TableUtils.addActionTooltip(table);
}
Aggregations