Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mylyn-dev] Question about interest manipulation code

In the method org.eclipse.mylyn.internal.context.core.InteractionContextManager.manipulateInterestForElementHelper(IInteractionElement, boolean, boolean, boolean, String, IInteractionContext, Set<IInteractionElement>, AbstractContextStructureBridge, boolean), there is a snippet of code as follows:

if (increment || preserveUninteresting) {
	InteractionEvent interactionEvent = new InteractionEvent(InteractionEvent.Kind.MANIPULATION,
		element.getContentType(), element.getHandleIdentifier(), sourceId, changeValue);
	List<IInteractionElement> interestDelta = internalProcessInteractionEvent(interactionEvent, context, true,
			isExplicitManipulation);
	changedElements.addAll(interestDelta);
//	notifyInterestDelta(interestDelta);
} else { //if (changeValue < context.getScaling().getInteresting()) {
	changedElements.add(element);
	delete(element, context);
}

The comment adjacent to the else clause above makes sense. That is, if the change value (the value to change the interest by) is less than some threshold, the element should be deleted from the context. However, why is this condition in a comment? Why not keep the threshold enforcement here? Thus, if the manipulation being done is a decrement and we are not preserving uninterestingness, we simply remove the element from the context. Why is that?

Back to the top