|
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; |
|
|
| 43 |
import org.eclipse.mylyn.context.core.ContextCore; |
42 |
import org.eclipse.mylyn.context.core.ContextCore; |
| 44 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
43 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
| 45 |
import org.eclipse.mylyn.context.core.IInteractionContextManager; |
44 |
import org.eclipse.mylyn.context.core.IInteractionContextManager; |
| 46 |
import org.eclipse.mylyn.context.core.IInteractionElement; |
45 |
import org.eclipse.mylyn.context.core.IInteractionElement; |
| 47 |
import org.eclipse.mylyn.context.core.IInteractionRelation; |
46 |
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-812
Link Here
|
| 804 |
|
804 |
|
| 805 |
if (activityMetaContext == null) { |
805 |
if (activityMetaContext == null) { |
| 806 |
resetActivityMetaContext(); |
806 |
resetActivityMetaContext(); |
| 807 |
} else if (!ContextCorePlugin.getDefault() |
807 |
} else if (!ContextCorePlugin.getDefault().getPluginPreferences().getBoolean( |
| 808 |
.getPluginPreferences() |
808 |
PREFERENCE_ATTENTION_MIGRATED)) { |
| 809 |
.getBoolean(PREFERENCE_ATTENTION_MIGRATED)) { |
|
|
| 810 |
activityMetaContext = migrateLegacyActivity(activityMetaContext); |
809 |
activityMetaContext = migrateLegacyActivity(activityMetaContext); |
| 811 |
saveActivityMetaContext(); |
810 |
saveActivityMetaContext(); |
| 812 |
ContextCorePlugin.getDefault().getPluginPreferences().setValue(PREFERENCE_ATTENTION_MIGRATED, true); |
811 |
ContextCorePlugin.getDefault().getPluginPreferences().setValue(PREFERENCE_ATTENTION_MIGRATED, true); |
|
Lines 1010-1017
Link Here
|
| 1010 |
// reduce interest of children |
1009 |
// reduce interest of children |
| 1011 |
for (String childHandle : bridge.getChildHandles(element.getHandleIdentifier())) { |
1010 |
for (String childHandle : bridge.getChildHandles(element.getHandleIdentifier())) { |
| 1012 |
IInteractionElement childElement = context.get(childHandle); |
1011 |
IInteractionElement childElement = context.get(childHandle); |
| 1013 |
if (childElement != null /*&& childElement.getInterest().isInteresting()*/ |
1012 |
if (childElement != null && isAPartOfContext(childElement) && !childElement.equals(element)) { |
| 1014 |
&& !childElement.equals(element)) { |
|
|
| 1015 |
manipulateInterestForElementHelper(childElement, increment, forceLandmark, |
1013 |
manipulateInterestForElementHelper(childElement, increment, forceLandmark, |
| 1016 |
preserveUninteresting, sourceId, context, changedElements, forcedBridge, |
1014 |
preserveUninteresting, sourceId, context, changedElements, forcedBridge, |
| 1017 |
isExplicitManipulation); |
1015 |
isExplicitManipulation); |
|
Lines 1044-1049
Link Here
|
| 1044 |
return true; |
1042 |
return true; |
| 1045 |
} |
1043 |
} |
| 1046 |
|
1044 |
|
|
|
1045 |
private boolean isAPartOfContext(IInteractionElement childElement) { |
| 1046 |
if (childElement instanceof CompositeContextElement) { |
| 1047 |
CompositeContextElement element = (CompositeContextElement) childElement; |
| 1048 |
return element.getNodes() != null && element.getNodes().size() > 0; |
| 1049 |
} |
| 1050 |
return true; |
| 1051 |
} |
| 1052 |
|
| 1047 |
/** |
1053 |
/** |
| 1048 |
* Used to migrate old activity to new activity events |
1054 |
* Used to migrate old activity to new activity events |
| 1049 |
* |
1055 |
* |