use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration in project windowbuilder by eclipse.
the class ObservableMapLabelProviderInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
/**
* Create {@link IUiContentProvider} content providers for edit this model.
*/
@Override
public void createContentProviders(List<IUiContentProvider> providers, DatabindingsProvider provider, boolean useClear) {
ChooseClassConfiguration configuration = new ChooseClassConfiguration();
configuration.setDialogFieldLabel(Messages.ObservableMapLabelProviderInfo_title);
configuration.setValueScope(MAP_PROVIDER_CLASS);
if (useClear) {
configuration.setClearValue(MAP_PROVIDER_CLASS);
configuration.setBaseClassNames(MAP_PROVIDER_CLASS, "org.eclipse.jface.databinding.viewers.ObservableMapCellLabelProvider");
configuration.setConstructorsParameters(new Class[] { IObservableMap[].class }, new Class[] { IObservableMap.class });
} else {
configuration.setBaseClassName("org.eclipse.jface.viewers.IBaseLabelProvider");
}
configuration.setEmptyClassErrorMessage(Messages.ObservableMapLabelProviderInfo_emptyMessage);
configuration.setErrorMessagePrefix(Messages.ObservableMapLabelProviderInfo_errorPrefix);
//
SimpleClassUiContentProvider contentProvider = new SimpleClassUiContentProvider(configuration, this);
contentProvider.getDialogField().setEnabled(m_binding.getCodeSupport() == null);
providers.add(contentProvider);
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration in project windowbuilder by eclipse.
the class TreeViewerInputBindingInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public void createContentProviders(List<IUiContentProvider> providers, IPageListener listener, DatabindingsProvider provider) throws Exception {
// configure page
listener.setTitle(Messages.TreeViewerInputBindingInfo_title);
listener.setMessage(Messages.TreeViewerInputBindingInfo_errorMessage);
//
providers.add(new LabelUiContentProvider(Messages.TreeViewerInputBindingInfo_viewerLabel, m_viewerBindable.getPresentation().getTextForBinding()));
providers.add(new LabelUiContentProvider(Messages.TreeViewerInputBindingInfo_inputLabel, m_inputObservable.getPresentationText()));
//
TreeInputElementUiContentProvider inputEditor = new TreeInputElementUiContentProvider(this, listener, provider);
//
if (m_inputObservable instanceof DetailBeanObservableInfo) {
m_inputObservable.createContentProviders(providers, null, provider);
//
ChooseClassAndPropertiesUiContentProvider masterUIContentProvider = (ChooseClassAndPropertiesUiContentProvider) providers.get(providers.size() - 1);
//
ChooseClassConfiguration configuration = new ChooseClassConfiguration();
configuration.setDialogFieldLabel(Messages.TreeViewerInputBindingInfo_chooseLabel);
configuration.setValueScope("beans1");
configuration.setChooseInterfaces(true);
configuration.setEmptyClassErrorMessage(Messages.TreeViewerInputBindingInfo_chooseEmptyMessage);
configuration.setErrorMessagePrefix(Messages.TreeViewerInputBindingInfo_chooseErrorPrefix);
//
TreeDetailUiContentProvider detailUIContentProvider = new TreeDetailUiContentProvider(configuration, (DetailBeanObservableInfo) m_inputObservable);
providers.add(detailUIContentProvider);
//
new ChooseClassAndPropertiesRouter(masterUIContentProvider, detailUIContentProvider);
new ChooseClassRouter(detailUIContentProvider, new MultiTargetRunnable(detailUIContentProvider, inputEditor.getElementTypeUIProviders()));
}
//
providers.add(inputEditor);
//
super.createContentProviders(providers, listener, provider);
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration in project windowbuilder by eclipse.
the class CheckedElementsObservableInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public void createContentProviders(List<IUiContentProvider> providers, BindingUiContentProviderContext context, DatabindingsProvider provider) throws Exception {
super.createContentProviders(providers, context, provider);
//
ChooseClassConfiguration configuration = new ChooseClassConfiguration();
configuration.setDialogFieldLabel(Messages.CheckedElementsObservableInfo_label);
configuration.setValueScope("beans");
configuration.setChooseInterfaces(true);
configuration.setEmptyClassErrorMessage(MessageFormat.format(Messages.CheckedElementsObservableInfo_emptyMessage, context.getDirection()));
configuration.setErrorMessagePrefix(MessageFormat.format(Messages.CheckedElementsObservableInfo_errorPrefix, context.getDirection()));
//
providers.add(new CheckedElementsUiContentProvider(configuration, this, provider));
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration in project windowbuilder by eclipse.
the class UpdateListStrategyInfo method createConfiguration.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
protected ChooseClassConfiguration createConfiguration(BindingUiContentProviderContext context) {
ChooseClassConfiguration configuration = super.createConfiguration(context);
configuration.setDialogFieldLabel(Messages.UpdateListStrategyInfo_title);
configuration.setDefaultValues(new String[] { "POLICY_UPDATE", "POLICY_NEVER", "POLICY_ON_REQUEST" });
return configuration;
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration in project windowbuilder by eclipse.
the class UpdateStrategyInfo method createConfiguration.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
/**
* Create configuration for edit this strategy.
*/
protected ChooseClassConfiguration createConfiguration(BindingUiContentProviderContext context) {
ChooseClassConfiguration configuration = new ChooseClassConfiguration();
configuration.setValueScope(getStrategyClass());
configuration.setRetargetClassName(getStrategyClass(), "POLICY_UPDATE");
configuration.setBaseClassName(getStrategyClass());
configuration.setConstructorParameters(ArrayUtils.EMPTY_CLASS_ARRAY);
configuration.setEmptyClassErrorMessage(MessageFormat.format(Messages.UpdateStrategyInfo_errorMessage, context.getDirection()));
configuration.setErrorMessagePrefix(MessageFormat.format(Messages.UpdateStrategyInfo_errorMessagePrefix, context.getDirection()));
//
if (m_strategyType == StrategyType.ExtendetClass && m_strategyValue.toString().indexOf('(') != -1) {
configuration.addDefaultStart(m_strategyValue.toString());
}
//
return configuration;
}
Aggregations