use of org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus in project tdi-studio-se by Talend.
the class JSONFileStep1Form method setVisible.
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.widgets.Control#setVisible(boolean)
*/
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (isReadOnly() != readOnly) {
adaptFormToReadOnly();
}
if (super.isVisible()) {
String JSONFilePath = getConnection().getJSONFilePath();
// Fields to the Group Delimited File Settings
if (getConnection().getEncoding() != null && !getConnection().getEncoding().equals("")) {
//$NON-NLS-1$
encodingCombo.setText(getConnection().getEncoding());
isModifing = false;
fileFieldJSON.setText(JSONFilePath);
} else {
encodingCombo.select(0);
}
if (isContextMode()) {
ContextType contextType = ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection(), connectionItem.getConnection().getContextName());
JSONFilePath = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, JSONFilePath));
}
if (!creation) {
updateTreeNodes(JSONFilePath);
JSONWizard wizard = ((JSONWizard) getPage().getWizard());
if (wizard.getTreeRootNode() == null) {
wizard.setTreeRootNode(treeNode);
}
}
if (LanguageManager.getCurrentLanguage() == ECodeLanguage.PERL && GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
ILibrariesService moduleService = (ILibrariesService) GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
try {
ELibraryInstallStatus status = moduleService.getLibraryStatus("JSON::LibJSON");
if (status != ELibraryInstallStatus.INSTALLED) {
new ErrorDialogWidthDetailArea(getShell(), PID, "The Perl Module" + " JSON::LibJSON " + "is not installed", "For more information, check out Talend's Wiki website at http\\://talendforge.org/wiki/doku.php.");
log.error("The Perl Module" + " JSON::LibJSONL " + "is not installed");
}
} catch (BusinessException e) {
new ErrorDialogWidthDetailArea(getShell(), PID, "The Perl Module" + " JSON::LibJSON " + "is not installed", "For more information, check out Talend's Wiki website at http\\://talendforge.org/wiki/doku.php.");
log.error("The Perl Module" + " JSON::LibJSONL " + "is not installed");
}
}
adaptFormToEditable();
}
}
Aggregations