Using a ILightweightLabelDecorator decorator
问题 Having implemented one of the above, can anyone say how I might wire it up directly to a viewer? None of the usual sources explain. Martin. 回答1: As far as I can tell you need an ILabelDecorator and the only easy way to get one is to use the workbench UI: viewer.setLabelProvider( new DecoratingLabelProvider(new MyPlainLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); You then need to add your lightweight decorator to the decorators extension point in the