use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider 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.LabelUiContentProvider in project windowbuilder by eclipse.
the class ViewerInputBindingInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public void createContentProviders(List<IUiContentProvider> providers, IPageListener listener, DatabindingsProvider provider) throws Exception {
// configure page
listener.setTitle(Messages.ViewerInputBindingInfo_title);
listener.setMessage(Messages.ViewerInputBindingInfo_message);
//
providers.add(new LabelUiContentProvider(Messages.ViewerInputBindingInfo_viewerLabel, m_viewerBindable.getPresentation().getTextForBinding()));
providers.add(new LabelUiContentProvider(Messages.ViewerInputBindingInfo_inputLabel, m_inputObservable.getPresentationText()));
m_labelProvider.createContentProviders(providers, provider, true);
// element type editor
ChooseClassAndPropertiesConfiguration configuration = new ChooseClassAndPropertiesConfiguration();
configuration.setDialogFieldLabel(Messages.ViewerInputBindingInfo_elementClassLabel);
configuration.setValueScope("beans");
configuration.setChooseInterfaces(true);
configuration.setEmptyClassErrorMessage(Messages.ViewerInputBindingInfo_elementClassEmptyMessage);
configuration.setErrorMessagePrefix(Messages.ViewerInputBindingInfo_elementClassErrorPrefix);
configuration.setPropertiesLabel(Messages.ViewerInputBindingInfo_elementClassPropertiesLabel);
configuration.setPropertiesMultiChecked(true);
configuration.setReorderMode(true);
configuration.setShowSelectionButtons(false);
configuration.setLoadedPropertiesCheckedStrategy(ChooseClassAndPropertiesConfiguration.LoadedPropertiesCheckedStrategy.None);
configuration.setPropertiesErrorMessage(Messages.ViewerInputBindingInfo_elementClassPropertiesErrorMessage);
//
if (m_inputObservable instanceof DetailBeanObservableInfo) {
configuration.setDialogFieldEnabled(false);
configuration.setValueScope("beans0");
m_inputObservable.createContentProviders(providers, null, provider);
}
//
GlobalFactoryHelper.configureChooseElementForViewerInput(m_inputObservable, configuration);
//
InputElementUiContentProvider inputUIContentProvider = new InputElementUiContentProvider(configuration, this);
//
if (m_inputObservable instanceof DetailBeanObservableInfo) {
new ChooseClassAndPropertiesRouter((ChooseClassAndPropertiesUiContentProvider) providers.get(providers.size() - 1), inputUIContentProvider);
}
//
providers.add(inputUIContentProvider);
//
super.createContentProviders(providers, listener, provider);
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider in project windowbuilder by eclipse.
the class VirtualEditingSupportInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
public void createContentProviders(List<IUiContentProvider> providers) throws Exception {
// CellEditor
providers.add(new LabelUiContentProvider(Messages.VirtualEditingSupportInfo_cellEditorLabel, getCellEditorPresentationText()));
//
ChooseClassAndPropertiesConfiguration cellEditorConfiguration = new ChooseClassAndPropertiesConfiguration();
cellEditorConfiguration.setBaseClassName("org.eclipse.jface.viewers.CellEditor");
cellEditorConfiguration.setDialogFieldLabel(Messages.VirtualEditingSupportInfo_chooseLabel);
cellEditorConfiguration.setEmptyClassErrorMessage(Messages.VirtualEditingSupportInfo_chooseEmptyMessage);
cellEditorConfiguration.setErrorMessagePrefix(Messages.VirtualEditingSupportInfo_chooseErrorPrefix);
cellEditorConfiguration.setPropertiesLabel(Messages.VirtualEditingSupportInfo_choosePropertiesLabel);
cellEditorConfiguration.setLoadedPropertiesCheckedStrategy(ChooseClassAndPropertiesConfiguration.LoadedPropertiesCheckedStrategy.None);
cellEditorConfiguration.setPropertiesErrorMessage(Messages.VirtualEditingSupportInfo_choosePropertyMessage);
cellEditorConfiguration.setDefaultValues(new String[] { "org.eclipse.jface.viewers.TextCellEditor", "org.eclipse.jface.viewers.ComboBoxCellEditor", "org.eclipse.jface.viewers.CheckboxCellEditor" });
//
providers.add(new CellEditorUiContentProvider(cellEditorConfiguration));
//
providers.add(new SeparatorUiContentProvider());
// Element property
providers.add(new LabelUiContentProvider(Messages.VirtualEditingSupportInfo_elementProperty, getElementPropertyPresentationText()));
//
ChooseClassAndPropertiesConfiguration elementConfiguration = new ChooseClassAndPropertiesConfiguration();
elementConfiguration.setDialogFieldLabel(Messages.VirtualEditingSupportInfo_chooseBeanLabel);
elementConfiguration.setEmptyClassErrorMessage(Messages.VirtualEditingSupportInfo_chooseBeanEmptyMessage);
elementConfiguration.setErrorMessagePrefix(Messages.VirtualEditingSupportInfo_chooseBeanErrorPrefix);
elementConfiguration.setPropertiesLabel(Messages.VirtualEditingSupportInfo_chooseBeanPropertiesLabel);
elementConfiguration.setLoadedPropertiesCheckedStrategy(ChooseClassAndPropertiesConfiguration.LoadedPropertiesCheckedStrategy.None);
elementConfiguration.setPropertiesErrorMessage(Messages.VirtualEditingSupportInfo_chooseBeanPropertiesErrorMessage);
//
providers.add(new ElementPropertyUiContentProvider(elementConfiguration));
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider in project windowbuilder by eclipse.
the class BindingInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public final void createContentProviders(List<IUiContentProvider> providers, IPageListener listener, DatabindingsProvider provider) throws Exception {
// configure page
listener.setTitle(Messages.BindingInfo_listenerTitle);
listener.setMessage(Messages.BindingInfo_listenerMessage);
//
BindingUiContentProviderContext context = new BindingUiContentProviderContext();
// add target editors
context.setDirection("Target");
providers.add(new LabelUiContentProvider(Messages.BindingInfo_targetLabel, m_target.getPresentationText()));
m_target.createContentProviders(providers, context, provider);
m_targetStrategy.createContentProviders(providers, context);
//
providers.add(new SeparatorUiContentProvider());
// add model editors
context.setDirection("Model");
providers.add(new LabelUiContentProvider(Messages.BindingInfo_modelLabel, m_model.getPresentationText()));
m_model.createContentProviders(providers, context, provider);
m_modelStrategy.createContentProviders(providers, context);
//
// binding self properties
providers.add(new SeparatorUiContentProvider());
providers.add(new BindingContentProvider(this, provider.getJavaInfoRoot()));
}
use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider in project windowbuilder by eclipse.
the class ColumnBindingInfo method createContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// Editing
//
// //////////////////////////////////////////////////////////////////////////
/**
* Create {@link IUiContentProvider} content providers for edit this model.
*/
@Override
public void createContentProviders(List<BindingInfo> bindings, List<IUiContentProvider> providers, IPageListener listener, DatabindingsProvider provider) throws Exception {
// configure page
listener.setTitle(Messages.ColumnBindingInfo_listenerTitle);
listener.setMessage(Messages.ColumnBindingInfo_listenerMessage);
// add target
providers.add(new LabelUiContentProvider(Messages.ColumnBindingInfo_componentLabel, m_target.getPresentation().getTextForBinding()));
// add model
providers.add(new LabelUiContentProvider(Messages.ColumnBindingInfo_modelLabel, getModelPresentationText(false)));
providers.add(new ColumnBindingUiContentProvider(this));
// binding self properties
providers.add(new SeparatorUiContentProvider());
providers.add(new ColumnNameUiContentProvider(this));
providers.add(new EditableUiContentProvider(this));
providers.add(new ColumnClassUiContentProvider(createColumnConfiguration(), this));
providers.add(new ConverterUiContentProvider(createConverterConfiguration(), this));
providers.add(new ValidatorUiContentProvider(createValidatorConfiguration(), this));
providers.add(new BindingNameUiContentProvider(this));
providers.add(new BindingContentProvider(this, provider.getJavaInfoRoot()));
}
Aggregations