List of usage examples for org.eclipse.jface.dialogs IMessageProvider NONE
int NONE
To view the source code for org.eclipse.jface.dialogs IMessageProvider NONE.
Click Source Link
From source file:org.eclipse.datatools.connectivity.oda.design.internal.ui.profile.ProfileSelectionPageHelper.java
License:Open Source License
private void setupLinkCheckBox(Composite composite) { m_linkRefCheckBox = new Button(composite, SWT.CHECK); m_linkRefCheckBox.setToolTipText(Messages.profilePage_checkboxTooltip_maintainLink); GridData data = new GridData(); data.horizontalSpan = 3;/*from w w w .j a v a 2 s .co m*/ m_linkRefCheckBox.setLayoutData(data); m_linkRefCheckBox.setText(Messages.profilePage_checkboxLabel_maintainLink); m_linkRefCheckBox.setSelection(true); setExternalLinkDefaultState(); m_linkRefCheckBox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (!inEditMode() || m_odaDataSourceTree == null) return; // nothing to do // editing of selected profile is allowed only if a link is maintained boolean maintainLink = m_linkRefCheckBox.getSelection(); m_odaDataSourceTree.setEnabled(maintainLink); if (isPageComplete()) setMessage(EMPTY_STRING, IMessageProvider.NONE); else setDefaultMessageAsError(maintainLink); } }); }
From source file:org.eclipse.datatools.connectivity.oda.design.ui.pages.impl.DefaultDataSourcePageHelper.java
License:Open Source License
protected void validatePropertyFields() { for (int i = 0; i < getPropCount(); i++) { String propVal = null;//from w w w . j av a2 s . com if (m_propCtrls[i] instanceof Text) propVal = ((Text) m_propCtrls[i]).getText(); else if (m_propCtrls[i] instanceof Combo) { int index = ((Combo) m_propCtrls[i]).getSelectionIndex(); if (index == -1) propVal = EMPTY_STRING; else propVal = getPropChoiceSelection(i, index); } else if (m_propCtrls[i] == null) { // The property is hidden from the user. Therefore, just // return the default value. Notice that if the property // is a choice, the propVal will be the choice's name, not // the choice value. propVal = getPropDefaultValue(i); } else assert (false); if (isPropRequired(i) && isEmpty(propVal)) { setMessage(Messages.ui_requiredFieldsMissingValue, IMessageProvider.WARNING); return; } } // If the code reaches here, all the required fields are non-empty. setMessage(DEFAULT_MESSAGE, IMessageProvider.NONE); }
From source file:org.eclipse.datatools.engagement.marklogic.ui.wizards.ColumnMappingPage.java
License:Open Source License
protected void refresh(DataSetDesign dataSetDesign) { DEFAULT_PAGE_Message = Messages.getString("xPathChoosePage.messages.xmlColumnMapping"); //$NON-NLS-1$ if (XMLInformationHolder.hasDestroyed()) XMLInformationHolder.start(dataSetDesign); refresh();//from w w w. ja va2 s . c o m if (getMessageType() == IMessageProvider.NONE) { this.setMessage(DEFAULT_PAGE_Message); } }
From source file:org.eclipse.datatools.engagement.marklogic.ui.wizards.ColumnMappingPage.java
License:Open Source License
/** * check whether the column is duplicated * //w ww . j a v a 2 s. c o m * @param columnName * @return */ private boolean isUniqueName(String columnName, ColumnMappingElement actualElement) { boolean success = true; if (columnMap != null) { if (columnMap.containsKey(columnName) && columnMap.get(columnName) != null) { success = false; } else { setDetailsMessage(DEFAULT_PAGE_Message, IMessageProvider.NONE); } } else { setDetailsMessage(DEFAULT_PAGE_Message, IMessageProvider.NONE); columnMap = new HashMap(); columnMappingList = new ArrayList(); } return success; }
From source file:org.eclipse.datatools.engagement.marklogic.ui.wizards.XPathChoosePage.java
License:Open Source License
protected void refresh(DataSetDesign dataSetDesign) { pageDefaultMessage = Messages.getString("xPathChoosePage.messages.elementSelection.label"); //$NON-NLS-1$ if (XMLInformationHolder.hasDestroyed()) XMLInformationHolder.start(dataSetDesign); refresh();/* w w w . j av a 2s . c om*/ if (getMessageType() == IMessageProvider.NONE) { setMessage(pageDefaultMessage); } }
From source file:org.eclipse.dltk.freemarker.internal.ui.dialogs.OpenProjectLevelConfigurationDialog.java
License:Open Source License
public void removeMessage(Object key) { setMessage("", IMessageProvider.NONE); }
From source file:org.eclipse.dltk.freemarker.internal.ui.editor.validation.AbstractControlValidator.java
License:Open Source License
/** * @param status//from w w w .j a v a2s. c o m * @return */ public static int getMessageType(IStatus status) { int severity = status.getSeverity(); // Translate severity to the equivalent message provider type if (severity == IStatus.OK) { return IMessageProvider.NONE; } else if (severity == IStatus.ERROR) { return IMessageProvider.ERROR; } else if (severity == IStatus.WARNING) { return IMessageProvider.WARNING; } else if (severity == IStatus.INFO) { return IMessageProvider.INFORMATION; } // IStatus.CANCEL return IMessageProvider.NONE; }
From source file:org.eclipse.emf.converter.ui.ModelConverterDescriptorSelectionPage.java
License:Open Source License
public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (!selection.isEmpty() && selection instanceof IStructuredSelection) { Object selectedObject = ((IStructuredSelection) selection).getFirstElement(); if (selectedObject instanceof ModelConverterDescriptor) { descriptor = (ModelConverterDescriptor) selectedObject; if (modelConverterWizardNodeMap == null) { modelConverterWizardNodeMap = modelConverterManager .createModelConverterDescriptorWizardNodeMap(); }/*from w w w .j a va 2 s. c o m*/ setMessage(descriptor.getDescription(), IMessageProvider.NONE); setSelectedNode(modelConverterWizardNodeMap.get(descriptor)); return; } } setPageComplete(false); }
From source file:org.eclipse.emf.eef.runtime.ui.editors.pages.EEFDetailsPage.java
License:Open Source License
public void createContents(Composite parent) { toolkit = getManagedForm().getToolkit(); parent.setLayout(EEFFormLayoutFactory.createDetailsGridLayout(false, 1)); parent.setLayoutData(new GridData(GridData.FILL_BOTH)); Composite container = toolkit.createComposite(parent, SWT.FLAT); GridLayout containerLayout = new GridLayout(); container.setLayout(containerLayout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); messageManager = new PropertiesEditionMessageManager() { @Override//from ww w .j a v a2 s. c o m protected void updateStatus(String message) { if (message != null && !"".equals(message)) getManagedForm().getForm().setMessage(message, IMessageProvider.ERROR); else getManagedForm().getForm().setMessage(null, IMessageProvider.NONE); } }; this.viewer = new PropertiesEditionViewer(container, null, SWT.NONE, 1); viewer.setDynamicTabHeader(true); viewer.setToolkit(getManagedForm().getToolkit()); viewer.setContentProvider(new PropertiesEditionContentProvider(adapterFactory, IPropertiesEditionComponent.LIVE_MODE, editingDomain)); viewer.addPropertiesListener(this); }
From source file:org.eclipse.emf.eef.runtime.ui.widgets.masterdetails.eefviewer.PropertiesViewerMasterPart.java
License:Open Source License
/** * {@inheritDoc}//from w w w. j a v a 2 s . c o m * @see org.eclipse.emf.eef.runtime.ui.widgets.masterdetails.AbstractEEFMasterPart#createSectionClientContents(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ protected StructuredViewer createSectionClientContents(Composite parent, FormToolkit toolkit) { GridLayout containerLayout = new GridLayout(); parent.setLayout(containerLayout); new PropertiesEditionMessageManager() { @Override protected void updateStatus(String message) { if (message != null) getManagedForm().getForm().setMessage(message, IMessageProvider.ERROR); else getManagedForm().getForm().setMessage(null, IMessageProvider.NONE); } }; PropertiesEditionViewer viewer = new PropertiesEditionViewer(parent, null, SWT.NONE, 1); viewer.setDynamicTabHeader(true); viewer.setToolkit(toolkit); GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = 80; viewer.getControl().setLayoutData(gridData); return viewer; }