Skip to main content

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

https://bugs.eclipse.org/bugs/show_bug.cgi?id=329920

On Nov 3, 2010, at 11:32 AM, Shawn Minto wrote:

> Hi Raffi,
> 
> This condition is commented out since we can allow items to have
> negative interest in the context.  Mylyn currently will call this
> method with preserveUninteresting set to false when an item is removed
> from the context so that it is deleted.  The assumption that is made
> in the current implementation is that decrementing the interest is the
> same as removing the item from the context unless you would like to
> preserve the uninteresting elements.  If you have a use case for
> wanting items automatically deleted from the context based on some
> other manipulation threshold, feel free to open a bug describing this
> use case and we could consider adding support for it.
> 
> Shawn
> 
> On Tue, Oct 26, 2010 at 3:27 PM, Raffi Khatchadourian
> <khatchad@xxxxxxxxxxxxxxxxxx> wrote:
>> 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?
>> _______________________________________________
>> mylyn-dev mailing list
>> mylyn-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>> 
> 
> 
> 
> -- 
> Shawn Minto
> shawn.minto@xxxxxxxxxxx
> Tasktop Technologies, Inc.
> http://www.tasktop.com
> _______________________________________________
> mylyn-dev mailing list
> mylyn-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-dev



Back to the top