|
Lines 39-50
Link Here
|
| 39 |
import org.eclipse.mylyn.context.core.AbstractContextListener; |
39 |
import org.eclipse.mylyn.context.core.AbstractContextListener; |
| 40 |
import org.eclipse.mylyn.context.core.AbstractContextStructureBridge; |
40 |
import org.eclipse.mylyn.context.core.AbstractContextStructureBridge; |
| 41 |
import org.eclipse.mylyn.context.core.ContextChangeEvent; |
41 |
import org.eclipse.mylyn.context.core.ContextChangeEvent; |
|
|
42 |
import org.eclipse.mylyn.context.core.ContextChangeEvent.ContextChangeKind; |
| 42 |
import org.eclipse.mylyn.context.core.ContextCore; |
43 |
import org.eclipse.mylyn.context.core.ContextCore; |
| 43 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
44 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
| 44 |
import org.eclipse.mylyn.context.core.IInteractionContextManager; |
45 |
import org.eclipse.mylyn.context.core.IInteractionContextManager; |
| 45 |
import org.eclipse.mylyn.context.core.IInteractionElement; |
46 |
import org.eclipse.mylyn.context.core.IInteractionElement; |
| 46 |
import org.eclipse.mylyn.context.core.IInteractionRelation; |
47 |
import org.eclipse.mylyn.context.core.IInteractionRelation; |
| 47 |
import org.eclipse.mylyn.context.core.ContextChangeEvent.ContextChangeKind; |
|
|
| 48 |
import org.eclipse.mylyn.monitor.core.InteractionEvent; |
48 |
import org.eclipse.mylyn.monitor.core.InteractionEvent; |
| 49 |
import org.eclipse.mylyn.monitor.core.InteractionEvent.Kind; |
49 |
import org.eclipse.mylyn.monitor.core.InteractionEvent.Kind; |
| 50 |
|
50 |
|
|
Lines 804-811
Link Here
|
| 804 |
|
804 |
|
| 805 |
if (activityMetaContext == null) { |
805 |
if (activityMetaContext == null) { |
| 806 |
resetActivityMetaContext(); |
806 |
resetActivityMetaContext(); |
| 807 |
} else if (!ContextCorePlugin.getDefault().getPluginPreferences().getBoolean( |
807 |
} else if (!ContextCorePlugin.getDefault() |
| 808 |
PREFERENCE_ATTENTION_MIGRATED)) { |
808 |
.getPluginPreferences() |
|
|
809 |
.getBoolean(PREFERENCE_ATTENTION_MIGRATED)) { |
| 809 |
activityMetaContext = migrateLegacyActivity(activityMetaContext); |
810 |
activityMetaContext = migrateLegacyActivity(activityMetaContext); |
| 810 |
saveActivityMetaContext(); |
811 |
saveActivityMetaContext(); |
| 811 |
ContextCorePlugin.getDefault().getPluginPreferences().setValue(PREFERENCE_ATTENTION_MIGRATED, true); |
812 |
ContextCorePlugin.getDefault().getPluginPreferences().setValue(PREFERENCE_ATTENTION_MIGRATED, true); |
|
Lines 919-924
Link Here
|
| 919 |
/** |
920 |
/** |
| 920 |
* @return true if interest was manipulated successfully |
921 |
* @return true if interest was manipulated successfully |
| 921 |
*/ |
922 |
*/ |
|
|
923 |
public boolean manipulateInterestForElements(List<IInteractionElement> elements, boolean increment, |
| 924 |
boolean forceLandmark, boolean preserveUninteresting, String sourceId, IInteractionContext context, |
| 925 |
boolean isExplicitManipulation) { |
| 926 |
Set<IInteractionElement> changedElements = new HashSet<IInteractionElement>(); |
| 927 |
boolean manipulated = false; |
| 928 |
for (IInteractionElement element : elements) { |
| 929 |
manipulated |= manipulateInterestForElementHelper(element, increment, forceLandmark, preserveUninteresting, |
| 930 |
sourceId, context, changedElements, null, isExplicitManipulation); |
| 931 |
} |
| 932 |
if (manipulated) { |
| 933 |
if (preserveUninteresting || increment) { |
| 934 |
notifyInterestDelta(new ArrayList<IInteractionElement>(changedElements)); |
| 935 |
} else { |
| 936 |
notifyElementsDeleted(context, new ArrayList<IInteractionElement>(changedElements), |
| 937 |
isExplicitManipulation); |
| 938 |
} |
| 939 |
} |
| 940 |
return manipulated; |
| 941 |
} |
| 942 |
|
| 943 |
/** |
| 944 |
* @return true if interest was manipulated successfully |
| 945 |
*/ |
| 922 |
public boolean manipulateInterestForElement(IInteractionElement element, boolean increment, boolean forceLandmark, |
946 |
public boolean manipulateInterestForElement(IInteractionElement element, boolean increment, boolean forceLandmark, |
| 923 |
boolean preserveUninteresting, String sourceId, IInteractionContext context, boolean isExplicitManipulation) { |
947 |
boolean preserveUninteresting, String sourceId, IInteractionContext context, boolean isExplicitManipulation) { |
| 924 |
Set<IInteractionElement> changedElements = new HashSet<IInteractionElement>(); |
948 |
Set<IInteractionElement> changedElements = new HashSet<IInteractionElement>(); |
|
Lines 1491-1494
Link Here
|
| 1491 |
} |
1515 |
} |
| 1492 |
} |
1516 |
} |
| 1493 |
} |
1517 |
} |
|
|
1518 |
|
| 1494 |
} |
1519 |
} |