use of org.talend.designer.components.exchange.ui.views.ExchangeEditorInput in project tdi-studio-se by Talend.
the class ExchangeService method openExchangeEditor.
@Override
public void openExchangeEditor() {
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
if (activePage != null) {
Project proj = ProjectManager.getInstance().getCurrentProject();
if (proj.getExchangeUser() == null || checkUserAndPass(proj.getExchangeUser().getUsername(), proj.getExchangeUser().getPassword()) != null) {
if (proj != null) {
if (proj.getExchangeUser().getUsername() == "" && proj.getExchangeUser().getPassword() == "") {
String userEmail = null;
if (proj.getAuthor() != null) {
userEmail = proj.getAuthor().getLogin();
}
TalendForgeDialog tfDialog = new TalendForgeDialog(DisplayUtils.getDefaultShell(), userEmail);
tfDialog.open();
}
// MessageDialog.openError(null, "Exchange", Messages.getString("Exchange.logon.error"));
return;
}
}
try {
ExchangeEditorInput input = new ExchangeEditorInput();
IEditorPart findEditor = activePage.findEditor(input);
if (findEditor == null) {
activePage.openEditor(input, "org.talend.designer.components.exchange.ui.views.ExchangeView");
} else {
activePage.activate(findEditor);
}
} catch (PartInitException e) {
ExceptionHandler.process(e);
}
}
}
Aggregations