| Summary: | Add event.mask as API to IResourceChangeListener/IWorkspace | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alex Blewitt <alex.blewitt> |
| Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | laeubi |
| Version: | 4.17 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=564876 | ||
| Whiteboard: | |||
|
Description
Alex Blewitt
There's an interesting question as to whether this should be API on IResourceChangeListener or IWorkspace. The event mask itself really belongs on the IWorkspace, since that's where the addResourceChangeListener() method lives, but it will be practically undiscoverable there, so it may be better (if slightly less correct) to add it to the IResourceChangeListener, where it's likely to be used at the point of declaration.
interface IResourceChangeListener {
String EVENT_MASK = "event.mask";
...
}
// use site
IResourceChangeListener service = new IResourceChangeListener() { ... };
Hashtable properties = new Hashtable();
properties.add(IResourceChangeListener.EVENT_MASK,IResourceChangeListener.POST_BUILD);
context.registerService(IResourceChangeListener.class, service, properties);
|