I have added a custom LabelDecorator to an Eclipse 3.6, which replaces the cryptic usernames added by the SVN Team Text Decorations. The SVN Team Decorator allows you to add an author tag. What I did was adding another Decorator replacing these author strings (which are company specific shortnames with numbers) with the actual name of the user.
While SVN Team Text Decorations extends the Package Explorer with:
... com.company.package · XY9723 · [30.02.11 19:11]
I replace that by
... com.company.package · Neil Diamond · [30.02.11 19:11]
Now, to complete the mission, I added a preference page, where users are able to specify the attributes (name, forename, birthdate, company name, telephone, etc.), which should be used as replacement. I’d like to update the package explorer (or whereever svn team decorates ressources) with the newly selected attributes whenever “Apply” or “Ok” is pressed.
At the moment the ressources are only updated after you have pressed “Apply” or “Ok” and manually collapse/expand one of the ressource in the explorer.
Is there some event I could fire?
Use the IDecorationManager interface:
inside of the prefernce pages LabelProvider:
-> see Understanding Decorators
without a LabelProvider
-> see DecoratorManager.java