List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION
int INFORMATION
To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.
Click Source Link
From source file:org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog.java
License:Open Source License
private void handleDetectPressedForInstall() { boolean deployed = checkInstalledStatusInMaven(); if (deployed) { setMessage(Messages.getString("InstallModuleDialog.error.jarexsit"), IMessageProvider.ERROR); } else {/*w w w . ja v a2 s . co m*/ setMessage(Messages.getString("ConfigModuleDialog.install.message", moduleName), IMessageProvider.INFORMATION); } }
From source file:org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog.java
License:Open Source License
private void handleDetectPressedForFindExsting() { boolean deployed = checkInstalledStatusInMaven(); if (deployed) { setMessage(Messages.getString("ConfigModuleDialog.message", moduleName), IMessageProvider.INFORMATION); } else {/*w ww . j a v a2s . c o m*/ setMessage(Messages.getString("ConfigModuleDialog.jarNotInstalled.error"), IMessageProvider.ERROR); } }
From source file:org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog.java
License:Open Source License
private boolean checkFieldsError() { if (repositoryRadioBtn.getSelection()) { if (installRadioBtn.getSelection()) { boolean statusOK = checkErrorForInstall(); if (!statusOK) { return false; }// ww w .ja v a 2s . c o m } else if (findByNameRadioBtn.getSelection()) { boolean statusOK = checkErrorForFindExistingByName(); if (!statusOK) { return false; } } else if (findByURIRadioBtn.getSelection()) { boolean statusOK = checkInstallStatusErrorForFindExisting(); if (!statusOK) { return false; } } } setMessage(Messages.getString("ConfigModuleDialog.message", moduleName), IMessageProvider.INFORMATION); getButton(IDialogConstants.OK_ID).setEnabled(true); return true; }
From source file:org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog.java
License:Open Source License
private boolean checkErrorForInstall() { if (!new File(jarPathTxt.getText()).exists()) { setMessage(Messages.getString("InstallModuleDialog.error.jarPath"), IMessageProvider.ERROR); return false; }//from w w w .j a va2 s.c om String originalText = defaultUriTxt.getText().trim(); String customURIWithType = MavenUrlHelper.addTypeForMavenUri(customUriText.getText(), moduleName); ELibraryInstallStatus status = null; String mvnURI2Detect = ""; if (useCustomBtn.getSelection()) { // if use custom uri:validate custom uri + check deploy status String errorMessage = ModuleMavenURIUtils.validateCustomMvnURI(originalText, customURIWithType); if (errorMessage != null) { setMessage(errorMessage, IMessageProvider.ERROR); return false; } status = ModuleStatusProvider.getDeployStatus(customURIWithType); if (status == ELibraryInstallStatus.DEPLOYED) { setMessage(Messages.getString("InstallModuleDialog.error.jarexsit"), IMessageProvider.ERROR); return false; } mvnURI2Detect = customURIWithType; } else { status = ModuleStatusProvider.getDeployStatus(originalText); if (status == ELibraryInstallStatus.DEPLOYED) { setMessage(Messages.getString("InstallModuleDialog.error.jarexsit"), IMessageProvider.ERROR); return false; } mvnURI2Detect = originalText; } // check deploy status from remote boolean statusOK = checkDetectButtonStatus(status, mvnURI2Detect); if (!statusOK) { return false; } setMessage(Messages.getString("InstallModuleDialog.message"), IMessageProvider.INFORMATION); return true; }
From source file:org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog.java
License:Open Source License
private boolean checkInstallStatusErrorForFindExisting() { String originalText = defaultUriTxt.getText().trim(); String customURIWithType = MavenUrlHelper.addTypeForMavenUri(customUriText.getText(), moduleName); ELibraryInstallStatus status = null; String mavenURI2Detect = ""; if (useCustomBtn.getSelection()) { // if use custom uri: validate custom uri + check deploy status String message = ModuleMavenURIUtils.validateCustomMvnURI(originalText, customURIWithType); if (message != null) { setMessage(message, IMessageProvider.ERROR); return false; }// w ww . j a va2 s. co m status = ModuleStatusProvider.getDeployStatus(customURIWithType); mavenURI2Detect = customURIWithType; } else { status = ModuleStatusProvider.getDeployStatus(originalText); mavenURI2Detect = originalText; } if (status == null) { setMessage(Messages.getString("InstallModuleDialog.error.detectMvnURI", mavenURI2Detect), IMessageProvider.ERROR); return false; } if (status != ELibraryInstallStatus.DEPLOYED) { ArtifactRepositoryBean customNexusServer = TalendLibsServerManager.getInstance().getCustomNexusServer(); if (customNexusServer != null) { setMessage(Messages.getString("InstallModuleDialog.error.detectMvnURI", mavenURI2Detect), IMessageProvider.ERROR); return false; } else { setMessage(Messages.getString("ConfigModuleDialog.jarNotInstalled.error"), IMessageProvider.ERROR); return false; } } setMessage(Messages.getString("ConfigModuleDialog.message", moduleName), IMessageProvider.INFORMATION); return true; }
From source file:org.talend.librariesmanager.ui.dialogs.InstallModuleDialog.java
License:Open Source License
private void handleDetectPressed() { boolean deployed = checkInstalledStatusInMaven(); if (!"".equals(jarPathTxt.getText())) { if (deployed) { setMessage(Messages.getString("InstallModuleDialog.error.jarexsit"), IMessageProvider.ERROR); } else {/*from w w w .ja v a 2 s .c o m*/ setMessage(Messages.getString("ConfigModuleDialog.message", this.moduleName), IMessageProvider.INFORMATION); } } else { if (deployed) { setMessage(Messages.getString("ConfigModuleDialog.message", this.moduleName), IMessageProvider.INFORMATION); } else { setMessage(Messages.getString("InstallModuleDialog.error.notInstalled"), IMessageProvider.WARNING); } } }
From source file:org.talend.librariesmanager.ui.dialogs.InstallModuleDialog.java
License:Open Source License
private boolean checkFieldsError() { String originalText = defaultUriTxt.getText().trim(); String customURIWithType = MavenUrlHelper.addTypeForMavenUri(customUriText.getText(), moduleName); ELibraryInstallStatus status = null; String mvnURI2Detect = ""; if (useCustomBtn.getSelection()) { // if use custom uri:validate custom uri + check deploy status String errorMessage = ModuleMavenURIUtils.validateCustomMvnURI(originalText, customURIWithType); if (errorMessage != null) { detectButton.setEnabled(false); setMessage(errorMessage, IMessageProvider.ERROR); return false; }//from w w w . j av a 2s.co m detectButton.setEnabled(true); status = ModuleStatusProvider.getDeployStatus(customURIWithType); mvnURI2Detect = customURIWithType; } else { status = ModuleStatusProvider.getDeployStatus(originalText); mvnURI2Detect = originalText; } if (!"".equals(jarPathTxt.getText())) { if (!new File(jarPathTxt.getText()).exists()) { setMessage(Messages.getString("InstallModuleDialog.error.jarPath"), IMessageProvider.ERROR); return false; } if (status == ELibraryInstallStatus.DEPLOYED) { setMessage(Messages.getString("InstallModuleDialog.error.jarexsit"), IMessageProvider.ERROR); return false; } // check deploy status from remote boolean statusOK = checkDetectButtonStatus(status, mvnURI2Detect); if (!statusOK) { return false; } } setMessage(Messages.getString("InstallModuleDialog.message"), IMessageProvider.INFORMATION); return true; }
From source file:org.talend.librariesmanager.ui.dialogs.InstallModuleDialog.java
License:Open Source License
@Override protected Control createContents(Composite parent) { Control control = super.createContents(parent); setMessage(Messages.getString("InstallModuleDialog.message"), IMessageProvider.INFORMATION); getButton(IDialogConstants.OK_ID).setEnabled(false); return control; }
From source file:org.talend.sqlbuilder.ui.SQLPropertyDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { Composite area = (Composite) super.createDialogArea(parent); Composite container = new Composite(area, SWT.NONE); final GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2;// w w w. j av a 2 s .c om container.setLayout(gridLayout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); final Label nameLabel = new Label(container, SWT.NONE); nameLabel.setText(Messages.getString("SQLEditor.SQLPropertyDialog.Name")); //$NON-NLS-1$ nameText = new Text(container, SWT.BORDER); nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); final Label commentLabel = new Label(container, SWT.NONE); commentLabel.setText(Messages.getString("SQLEditor.SQLPropertyDialog.Comment")); //$NON-NLS-1$ commentText = new Text(container, SWT.BORDER); commentText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); if (showQueryProperty && query != null) { this.setMessage(Messages.getString("SQLEditor.SQLPropertyDialog.ShowQueryProperty.message"), //$NON-NLS-1$ IMessageProvider.INFORMATION); nameText.setText(query.getLabel()); nameText.setEditable(false); commentText.setText(query.getComment()); // commentText.setEditable(false); } else { this.setTitle(Messages.getString("SQLEditor.Actions.SaveSQL")); //$NON-NLS-1$ this.setMessage(Messages.getString("SQLEditor.Actions.InputMessage"), IMessageProvider.INFORMATION); //$NON-NLS-1$ } this.addListener(); return area; }