Bug 536186 - Element delta kind constants cannot be combined in a bit mask
Summary: Element delta kind constants cannot be combined in a bit mask
Status: RESOLVED FIXED
Alias: None
Product: Handly
Classification: Technology
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 enhancement
Target Milestone: 1.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: breakingchange
Keywords: api
Depends on:
Blocks:
 
Reported: 2018-06-22 09:52 EDT by Vladimir Piskarev CLA
Modified: 2018-06-22 10:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Piskarev CLA 2018-06-22 09:52:24 EDT
Currently, delta kind values defined in IElementDeltaConstants (ADDED, REMOVED, CHANGED) cannot be used in a bit mask operation. Although there is no pressing need for that now, this would make it impossible to define APIs like getAffectedChildren(int kindMask) when/if such need arises.

I think it would be safer to follow the pattern set by IResourceDelta and its values for ADDED, REMOVED, CHANGED, which can be combined in a bit mask. Practically, this means that we should change the CHANGED constant value from 3 to 4. Formally, this is a breaking change, but despite being very late in the cycle, I think it would be better to do it before 1.0 is released, since the impact on existing clients is expected to be low (given that the change breaks binary compatibility but does not break source compatibility).