use of org.talend.designer.core.model.utils.emf.talendfile.ParametersType in project tdi-studio-se by Talend.
the class StatsAndLogsHelper method loadPreferenceToProject.
/**
*
* Load StatsAndLogs Preference setting to Project Only load Once
*
* @param pro
*/
static void loadPreferenceToProject(Project pro) {
TalendFileFactory talendF = TalendFileFactory.eINSTANCE;
StatAndLogsSettings stats = PropertiesFactory.eINSTANCE.createStatAndLogsSettings();
pro.getEmfProject().setStatAndLogsSettings(stats);
stats.setParameters(talendF.createParametersType());
ParametersType pType = stats.getParameters();
StatsAndLogsElement elem = new StatsAndLogsElement();
pro.setStatsAndLog(elem);
StatsAndLogsHelper.createStatsAndLogsParameters(elem);
ElementParameter2ParameterType.saveElementParameters(elem, pType);
}
use of org.talend.designer.core.model.utils.emf.talendfile.ParametersType in project tdi-studio-se by Talend.
the class StatLogsAndImplicitcontextTreeViewPage method isUseProjectSetting.
private boolean isUseProjectSetting(RepositoryNode node) {
Property property = node.getObject().getProperty();
ProcessItem pItem = (ProcessItem) property.getItem();
ParametersType pType = pItem.getProcess().getParameters();
String implictB = ElementParameter2ParameterType.getParameterValue(pType, EParameterName.IMPLICITCONTEXT_USE_PROJECT_SETTINGS.getName());
if (implictB != null && "true".equals(implictB)) {
//$NON-NLS-1$
return true;
} else {
return false;
}
}
use of org.talend.designer.core.model.utils.emf.talendfile.ParametersType in project tdi-studio-se by Talend.
the class StatLogsAndImplicitcontextTreeViewPage method isStatUseProjectSetting.
private boolean isStatUseProjectSetting(RepositoryNode node) {
Property property = node.getObject().getProperty();
ProcessItem pItem = (ProcessItem) property.getItem();
ParametersType pType = pItem.getProcess().getParameters();
String statB = ElementParameter2ParameterType.getParameterValue(pType, EParameterName.STATANDLOG_USE_PROJECT_SETTINGS.getName());
if (statB != null && "true".equals(statB)) {
//$NON-NLS-1$
return true;
} else {
return false;
}
}
use of org.talend.designer.core.model.utils.emf.talendfile.ParametersType in project tdi-studio-se by Talend.
the class ProjectSettingManager method reloadStatsAndLogFromProjectSettings.
public static void reloadStatsAndLogFromProjectSettings(Element process, Project pro, StatsAndLogsComposite statsComposite) {
Element elem = createStatsAndLogsElement(pro);
ParametersType stats = pro.getEmfProject().getStatAndLogsSettings().getParameters();
ElementParameterType eleType = ElementParameter2ParameterType.findElementParameterType(stats, //$NON-NLS-1$
EParameterName.PROPERTY_TYPE.getName() + ":" + EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
if (eleType != null) {
String value = eleType.getValue();
if (value != null && !"".equals(value) && !RepositoryNode.NO_ID.equals(value)) {
//$NON-NLS-1$
ElementParameterType propertyType = ElementParameter2ParameterType.findElementParameterType(stats, //$NON-NLS-1$
EParameterName.PROPERTY_TYPE.getName() + ":" + EParameterName.PROPERTY_TYPE.getName());
if (propertyType != null) {
String propertyTypeValue = propertyType.getValue();
if (//$NON-NLS-1$
propertyTypeValue != null && !"".equals(propertyTypeValue) && !EmfComponent.BUILTIN.equals(propertyTypeValue)) {
IRepositoryViewObject lastVersion = UpdateRepositoryUtils.getRepositoryObjectById(value);
if (lastVersion == null || lastVersion.getProperty() == null || lastVersion.getProperty().getItem() == null) {
ChangeValuesFromRepository changeValuesFromRepository = new ChangeValuesFromRepository(elem, null, //$NON-NLS-1$
EParameterName.PROPERTY_TYPE.getName() + ":" + EParameterName.PROPERTY_TYPE.getName(), EmfComponent.BUILTIN);
changeValuesFromRepository.execute();
saveStatsAndLogToProjectSettings(elem, pro);
}
}
}
}
// load the project settings to process
ElementParameter2ParameterType.loadElementParameters(process, stats, //$NON-NLS-1$
EParameterName.PROPERTY_TYPE.getName() + ":" + EParameterName.PROPERTY_TYPE.getName());
// change repository item
// TODO
// StatsAndLogsHelper.changeRepositoryConnection(process, statsComposite);
}
}
use of org.talend.designer.core.model.utils.emf.talendfile.ParametersType in project tdi-studio-se by Talend.
the class ProjectSettingManager method reloadImplicitValuesFromProjectSettings.
public static void reloadImplicitValuesFromProjectSettings(Element process, Project pro, ExtraComposite extraComposite) {
createImplicitContextLoadElement(pro);
ParametersType implicitType = pro.getEmfProject().getImplicitContextSettings().getParameters();
// load the project settings to process
ElementParameter2ParameterType.loadElementParameters(process, implicitType, JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTY_TYPE.getName()) + ":" + EParameterName.PROPERTY_TYPE.getName());
// TODO
// changeImplicitContextRepositoryItem(process, extraComposite);
}
Aggregations