|
Lines 86-91
Link Here
|
| 86 |
*/ |
86 |
*/ |
| 87 |
private Collection fRegisteredShells; |
87 |
private Collection fRegisteredShells; |
| 88 |
|
88 |
|
|
|
89 |
private ContextActivation SEND_ACTIVATION; |
| 90 |
|
| 91 |
private ContextActivation DEFER_ACTIVATION; |
| 92 |
|
| 89 |
/** |
93 |
/** |
| 90 |
* Construct the new slave. |
94 |
* Construct the new slave. |
| 91 |
* |
95 |
* |
|
Lines 109-114
Link Here
|
| 109 |
fContextManagerListeners = new ArrayList(); |
113 |
fContextManagerListeners = new ArrayList(); |
| 110 |
fSourceProviders = new ArrayList(); |
114 |
fSourceProviders = new ArrayList(); |
| 111 |
fRegisteredShells = new ArrayList(); |
115 |
fRegisteredShells = new ArrayList(); |
|
|
116 |
SEND_ACTIVATION = new ContextActivation(ContextAuthority.SEND_EVENTS, null, this); |
| 117 |
DEFER_ACTIVATION = new ContextActivation(ContextAuthority.DEFER_EVENTS, null, this); |
| 112 |
} |
118 |
} |
| 113 |
|
119 |
|
| 114 |
/* |
120 |
/* |
|
Lines 117-124
Link Here
|
| 117 |
* @see org.eclipse.ui.contexts.IContextService#activateContext(java.lang.String) |
123 |
* @see org.eclipse.ui.contexts.IContextService#activateContext(java.lang.String) |
| 118 |
*/ |
124 |
*/ |
| 119 |
public IContextActivation activateContext(String contextId) { |
125 |
public IContextActivation activateContext(String contextId) { |
| 120 |
ContextActivation activation = new ContextActivation(contextId, |
126 |
final ContextActivation activation; |
| 121 |
fDefaultExpression, this); |
127 |
if (ContextAuthority.SEND_EVENTS.equals(contextId)) { |
|
|
128 |
activation = SEND_ACTIVATION; |
| 129 |
} else if (ContextAuthority.DEFER_EVENTS.equals(contextId)) { |
| 130 |
activation = DEFER_ACTIVATION; |
| 131 |
} else { |
| 132 |
activation = new ContextActivation(contextId, fDefaultExpression, |
| 133 |
this); |
| 134 |
} |
| 122 |
return doActivateContext(activation); |
135 |
return doActivateContext(activation); |
| 123 |
} |
136 |
} |
| 124 |
|
137 |
|
|
Lines 156-166
Link Here
|
| 156 |
andExpression.add(expression); |
169 |
andExpression.add(expression); |
| 157 |
} |
170 |
} |
| 158 |
} |
171 |
} |
| 159 |
if (fDefaultExpression!=null) { |
172 |
if (fDefaultExpression != null) { |
| 160 |
andExpression.add(fDefaultExpression); |
173 |
andExpression.add(fDefaultExpression); |
| 161 |
} |
174 |
} |
| 162 |
ContextActivation activation = new ContextActivation(contextId, |
175 |
final ContextActivation activation; |
| 163 |
andExpression, this); |
176 |
if (ContextAuthority.SEND_EVENTS.equals(contextId)) { |
|
|
177 |
activation = SEND_ACTIVATION; |
| 178 |
} else if (ContextAuthority.DEFER_EVENTS.equals(contextId)) { |
| 179 |
activation = DEFER_ACTIVATION; |
| 180 |
} else { |
| 181 |
activation = new ContextActivation(contextId, andExpression, this); |
| 182 |
} |
| 164 |
return doActivateContext(activation); |
183 |
return doActivateContext(activation); |
| 165 |
} |
184 |
} |
| 166 |
|
185 |
|