Search in sources :

Example 1 with MultiTargetRunnable

use of org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.MultiTargetRunnable 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)

Aggregations

ChooseClassAndPropertiesRouter (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesRouter)1 ChooseClassAndPropertiesUiContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassAndPropertiesUiContentProvider)1 ChooseClassConfiguration (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)1 ChooseClassRouter (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassRouter)1 LabelUiContentProvider (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.LabelUiContentProvider)1 MultiTargetRunnable (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.MultiTargetRunnable)1 DetailBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailBeanObservableInfo)1 TreeDetailUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeDetailUiContentProvider)1 TreeInputElementUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.TreeInputElementUiContentProvider)1