use of org.talend.dataprofiler.core.ui.editor.TdEditorToolBar in project tdq-studio-se by Talend.
the class MatchAnalysisEditor method addPages.
@Override
protected void addPages() {
super.addPages();
TdEditorToolBar toolbar = getToolBar();
if (toolbar != null) {
importMatchRuleAction = new ImportMatchRuleAction(getMasterPage());
// $NON-NLS-1$
importMatchRuleAction.setToolTipText(DefaultMessagesImpl.getString("MatchAnalysisEditor.importMatchRule"));
toolbar.addActions(importMatchRuleAction);
// when there are some keys in the analysis
if (getMasterPage().getCurrentModelElement().getResults() != null) {
exportMatchRuleAction = new ExportMatchRuleAction(MatchRuleAnlaysisUtils.getRecordMatchIndicatorFromAna(getMasterPage().getCurrentModelElement()));
// $NON-NLS-1$
exportMatchRuleAction.setToolTipText(DefaultMessagesImpl.getString("MatchAnalysisEditor.exportMatchRule"));
toolbar.addActions(exportMatchRuleAction);
}
}
}
use of org.talend.dataprofiler.core.ui.editor.TdEditorToolBar in project tdq-studio-se by Talend.
the class IndicatorEditor method addPages.
/*
* (non-Javadoc)
*
* @see org.talend.dataprofiler.core.ui.editor.CommonFormEditor#addPages()
*/
@Override
protected void addPages() {
// TDQ-8453 according to the type to use IndicatorDefinition or UDI master page
if (isSystemIndicator()) {
// $NON-NLS-1$
masterPage = new IndicatorDefinitionMaterPage(this, ID, "Indicator Definition");
} else {
// $NON-NLS-1$
masterPage = new UDIMasterPage(this, ID, "User Define Indicator Definition");
}
try {
addPage(masterPage);
setPartName(masterPage.getIntactElemenetName());
} catch (PartInitException e) {
ExceptionHandler.process(e, Level.ERROR);
}
TdEditorToolBar toolbar = getToolBar();
if (toolbar != null && masterPage != null) {
saveAction = new DefaultSaveAction(this);
toolbar.addActions(saveAction);
setSaveActionButtonState(false);
}
}
use of org.talend.dataprofiler.core.ui.editor.TdEditorToolBar in project tdq-studio-se by Talend.
the class PatternEditor method addPages.
@Override
protected void addPages() {
// $NON-NLS-1$
masterPage = new PatternMasterDetailsPage(this, ID, DefaultMessagesImpl.getString("PatternEditor.patternSettings"));
// MOD qiongli 2011-3-21,bug 19472.set method 'setPartName(...)' behind method 'addPage(...)'
try {
addPage(masterPage);
setPartName(masterPage.getIntactElemenetName());
} catch (PartInitException e) {
ExceptionHandler.process(e, Level.ERROR);
}
TdEditorToolBar toolbar = getToolBar();
if (toolbar != null && masterPage != null) {
saveAction = new DefaultSaveAction(this);
toolbar.addActions(saveAction);
}
}
use of org.talend.dataprofiler.core.ui.editor.TdEditorToolBar in project tdq-studio-se by Talend.
the class AnalysisEditor method addPages.
@Override
protected void addPages() {
TdEditorToolBar toolbar = getToolBar();
if (toolbar != null) {
saveAction = new DefaultSaveAction(this);
runAction = new RunAnalysisAction();
toolbar.addActions(saveAction, runAction);
}
switch(analysisType) {
case COLUMN_CORRELATION:
masterPage = new CorrelationAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new CorrelationAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case MULTIPLE_COLUMN:
masterPage = new ColumnAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new ColumnAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case CONNECTION:
masterPage = new ConnectionAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new OverviewResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case CATALOG:
masterPage = new CatalogAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new OverviewResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case SCHEMA:
masterPage = new SchemaAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new OverviewResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case COLUMNS_COMPARISON:
masterPage = new RedundancyAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new RedundancyAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case TABLE:
masterPage = new BusinessRuleAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new BusinessRuleAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case TABLE_FUNCTIONAL_DEPENDENCY:
masterPage = new FunctionalDependencyAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new FunctionalDependencyAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case COLUMN_SET:
masterPage = new ColumnSetAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new ColumnSetAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
case // Added 20130724 TDQ-7504
MATCH_ANALYSIS:
masterPage = new MatchAnalysisDetailsPage(this, MASTER_PAGE, ANALYSIS_SETTINGS);
resultPage = new MatchAnalysisResultPage(this, RESULT_PAGE, ANALYSIS_RESULTS);
break;
default:
}
try {
if (masterPage != null) {
addPage(masterPage);
setPartName(masterPage.getIntactElemenetName());
initContext();
// Added 20130930 TDQ-8117, yyin
// init the run analysis action, to give it the analysis item and listener
this.runAction.setAnalysisItems(new TDQAnalysisItem[] { (TDQAnalysisItem) getMasterPage().getCurrentRepNode().getObject().getProperty().getItem() });
}
if (resultPage != null) {
addPage(resultPage);
}
} catch (PartInitException e) {
ExceptionHandler.process(e, Level.ERROR);
}
// Added 20130725 TDQ-7639 yyin : register the run analysis event, which need to refresh the pages
registerUpdateExecutionEvent();
}
use of org.talend.dataprofiler.core.ui.editor.TdEditorToolBar in project tdq-studio-se by Talend.
the class DQRuleEditor method addPages.
@Override
protected void addPages() {
ModelElement currentRuleModelElement = getCurrentModelElement();
try {
if (currentRuleModelElement != null) {
if (currentRuleModelElement instanceof ParserRule) {
parserPage = new ParserRuleMasterDetailsPage(this, ID, // $NON-NLS-1$
DefaultMessagesImpl.getString("DQRuleEditor.parserRuleSettings"));
addPage(parserPage);
setPartName(parserPage.getIntactElemenetName());
} else if (currentRuleModelElement instanceof MatchRuleDefinition) {
matchPage = new MatchRuleMasterDetailsPage(this);
addPage(matchPage);
setPartName(matchPage.getIntactElemenetName());
setTitleImage(ImageLib.getImage(ImageLib.MATCH_RULE_WHITE_ICON));
} else {
masterPage = new DQRuleMasterDetailsPage(this, ID, // $NON-NLS-1$
DefaultMessagesImpl.getString("DQRuleEditor.dqRuleSettings"));
addPage(masterPage);
setPartName(masterPage.getIntactElemenetName());
}
}
} catch (PartInitException e) {
ExceptionHandler.process(e, Level.ERROR);
}
// ADD xqliu 2009-07-02 bug 7687
TdEditorToolBar toolbar = getToolBar();
// MOD msjian 2011-9-22 TDQ-3372: Add a "save" button in the parser rule editor
if (toolbar != null && (masterPage != null || parserPage != null || matchPage != null)) {
// TDQ-3372 ~
saveAction = new DefaultSaveAction(this);
saveAction.setEnabled(false);
toolbar.addActions(saveAction);
}
// ~
}
Aggregations