use of org.talend.dataprofiler.core.ui.editor.matchrule.MatchRuleMasterDetailsPage 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