Java 类org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider 实例源码

项目:slr-toolkit    文件:TaxonomyCheckboxListView.java   
/**
 * This is a callback that will allow us to create the viewer and initialize
 * it.
 */
@Override
public void createPartControl(Composite parent) {
    Optional<Model> m = ModelRegistryPlugin.getModelRegistry().getActiveTaxonomy();
    contentProvider = new ViewContentProvider(viewer);
    viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    viewer.setContentProvider(contentProvider);
    viewer.setLabelProvider(new DefaultEObjectLabelProvider());
    viewer.addCheckStateListener(this);
    viewer.setSorter(null);
    if(m.isPresent()){
        viewer.setInput(m.get());
    }
    viewer.expandAll();

    getSite().setSelectionProvider(viewer);
    // Create the help context id for the viewer's control
    PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "de.tudresden.slr.model.taxonomy.ui.viewer");
    getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(this);
}
项目:bts    文件:EmfUiModule.java   
public Class<? extends ILabelProvider> bindILabelProvider() {
    return DefaultEObjectLabelProvider.class;
}
项目:bts    文件:DefaultUiModule.java   
public Class<? extends ILabelProvider> bindILabelProvider() {
    return DefaultEObjectLabelProvider.class;
}