Search in sources :

Example 1 with SimpleClassUiContentProvider

use of org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider 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);
}
Also used : IObservableMap(org.eclipse.core.databinding.observable.map.IObservableMap) SimpleClassUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Example 2 with SimpleClassUiContentProvider

use of org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider in project windowbuilder by eclipse.

the class ObservableCollectionTreeContentProviderInfo method createContentProviders.

// //////////////////////////////////////////////////////////////////////////
// 
// Editing
// 
// //////////////////////////////////////////////////////////////////////////
/**
 * Create {@link IUiContentProvider} content providers for edit this model.
 */
public final void createContentProviders(List<IUiContentProvider> providers, DatabindingsProvider provider, boolean useClear) {
    ChooseClassConfiguration configuration = new ChooseClassConfiguration();
    configuration.setDialogFieldLabel(Messages.ObservableCollectionTreeContentProviderInfo_chooseLabel);
    configure(configuration, useClear);
    configuration.setConstructorParameters(new Class[] { IObservableFactory.class, TreeStructureAdvisor.class });
    configuration.setEmptyClassErrorMessage(Messages.ObservableCollectionTreeContentProviderInfo_chooseEmptyMessage);
    configuration.setErrorMessagePrefix(Messages.ObservableCollectionTreeContentProviderInfo_chooseMessagePrefix);
    providers.add(new SimpleClassUiContentProvider(configuration, this));
}
Also used : SimpleClassUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Example 3 with SimpleClassUiContentProvider

use of org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider in project windowbuilder by eclipse.

the class ObservableFactoryInfo method createContentProviders.

// //////////////////////////////////////////////////////////////////////////
// 
// Editing
// 
// //////////////////////////////////////////////////////////////////////////
/**
 * Create {@link IUiContentProvider} content providers for edit this model.
 */
public final void createContentProviders(List<IUiContentProvider> providers, DatabindingsProvider provider) {
    ChooseClassConfiguration configuration = new ChooseClassConfiguration();
    configuration.setDialogFieldLabel(Messages.ObservableFactoryInfo_label);
    configure(configuration);
    configuration.setEmptyClassErrorMessage(Messages.ObservableFactoryInfo_emptyMessage);
    configuration.setErrorMessagePrefix(Messages.ObservableFactoryInfo_errorPrefix);
    providers.add(new SimpleClassUiContentProvider(configuration, this));
}
Also used : SimpleClassUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Example 4 with SimpleClassUiContentProvider

use of org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider in project windowbuilder by eclipse.

the class TreeStructureAdvisorInfo method createContentProviders.

// //////////////////////////////////////////////////////////////////////////
// 
// Editing
// 
// //////////////////////////////////////////////////////////////////////////
/**
 * Create {@link IUiContentProvider} content providers for edit this model.
 */
public final void createContentProviders(List<IUiContentProvider> providers, DatabindingsProvider provider) {
    ChooseClassConfiguration configuration = new ChooseClassConfiguration();
    configuration.setDialogFieldLabel(Messages.TreeStructureAdvisorInfo_label);
    configure(configuration);
    configuration.setEmptyClassErrorMessage(Messages.TreeStructureAdvisorInfo_errorMessage);
    configuration.setErrorMessagePrefix(Messages.TreeStructureAdvisorInfo_errorMessagePrefix);
    providers.add(new SimpleClassUiContentProvider(configuration, this));
}
Also used : SimpleClassUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Example 5 with SimpleClassUiContentProvider

use of org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider in project windowbuilder by eclipse.

the class LabelProviderInfo method createContentProviders.

// //////////////////////////////////////////////////////////////////////////
// 
// Editing
// 
// //////////////////////////////////////////////////////////////////////////
/**
 * Create {@link IUiContentProvider} content providers for edit this model.
 */
@Override
public final void createContentProviders(List<IUiContentProvider> providers, DatabindingsProvider provider, boolean useClear) {
    ChooseClassConfiguration configuration = new ChooseClassConfiguration();
    configuration.setDialogFieldLabel(Messages.LabelProviderInfo_label);
    configure(configuration, useClear);
    configuration.setEmptyClassErrorMessage(Messages.LabelProviderInfo_errorMessage);
    configuration.setErrorMessagePrefix(Messages.LabelProviderInfo_errorMessagePrefix);
    providers.add(new SimpleClassUiContentProvider(configuration, this));
}
Also used : SimpleClassUiContentProvider(org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider) ChooseClassConfiguration(org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)

Aggregations

ChooseClassConfiguration (org.eclipse.wb.internal.core.databinding.ui.editor.contentproviders.ChooseClassConfiguration)5 SimpleClassUiContentProvider (org.eclipse.wb.internal.rcp.databinding.ui.contentproviders.SimpleClassUiContentProvider)5 IObservableMap (org.eclipse.core.databinding.observable.map.IObservableMap)1