Search in sources :

Example 1 with LabelUiContentProvider

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);
}
Also used : ChooseClassAndPropertiesRouter(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesRouter) LabelUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider) TreeDetailUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeDetailUiContentProvider) ChooseClassRouter(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassRouter) TreeInputElementUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeInputElementUiContentProvider) ChooseClassAndPropertiesUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesUiContentProvider) MultiTargetRunnable(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.MultiTargetRunnable) DetailBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailBeanObservableInfo) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Example 2 with LabelUiContentProvider

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);
}
Also used : ChooseClassAndPropertiesRouter(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesRouter) LabelUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider) InputElementUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.InputElementUiContentProvider) ChooseClassAndPropertiesConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesConfiguration) DetailBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailBeanObservableInfo)

Example 3 with LabelUiContentProvider

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));
}
Also used : SeparatorUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.SeparatorUiContentProvider) LabelUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider) ChooseClassAndPropertiesConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesConfiguration)

Example 4 with LabelUiContentProvider

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()));
}
Also used : SeparatorUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.SeparatorUiContentProvider) LabelUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider) BindingContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.BindingContentProvider)

Example 5 with LabelUiContentProvider

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()));
}
Also used : ConverterUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ConverterUiContentProvider) ValidatorUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ValidatorUiContentProvider) SeparatorUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.SeparatorUiContentProvider) EditableUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.EditableUiContentProvider) LabelUiContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider) BindingNameUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.BindingNameUiContentProvider) ColumnBindingUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ColumnBindingUiContentProvider) ColumnNameUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ColumnNameUiContentProvider) BindingContentProvider(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.BindingContentProvider) ColumnClassUiContentProvider(org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ColumnClassUiContentProvider)

Aggregations

LabelUiContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider)9 SeparatorUiContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.SeparatorUiContentProvider)5 BindingContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.BindingContentProvider)4 BindingNameUiContentProvider (org.eclipse.wb.internal.swing.databinding.ui.contentproviders.BindingNameUiContentProvider)3 ConverterUiContentProvider (org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ConverterUiContentProvider)3 ValidatorUiContentProvider (org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ValidatorUiContentProvider)3 ChooseClassAndPropertiesConfiguration (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesConfiguration)2 ChooseClassAndPropertiesRouter (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesRouter)2 ChooseClassConfiguration (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)2 DetailBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailBeanObservableInfo)2 ChooseClassAndPropertiesUiContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesUiContentProvider)1 ChooseClassRouter (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassRouter)1 MultiTargetRunnable (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.MultiTargetRunnable)1 InputElementUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.InputElementUiContentProvider)1 TreeDetailUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeDetailUiContentProvider)1 TreeInputElementUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeInputElementUiContentProvider)1 ModeContentProvider (org.eclipse.wb.internal.rcp.databinding.xwt.ui.contentproviders.ModeContentProvider)1 TriggerContentProvider (org.eclipse.wb.internal.rcp.databinding.xwt.ui.contentproviders.TriggerContentProvider)1 ColumnBindingUiContentProvider (org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ColumnBindingUiContentProvider)1 ColumnClassUiContentProvider (org.eclipse.wb.internal.swing.databinding.ui.contentproviders.ColumnClassUiContentProvider)1