1 11 package org.eclipse.ui.contexts; 12 13 import java.util.Collection ; 14 15 import org.eclipse.core.commands.contexts.Context; 16 import org.eclipse.core.commands.contexts.IContextManagerListener; 17 import org.eclipse.core.expressions.Expression; 18 import org.eclipse.swt.widgets.Shell; 19 import org.eclipse.ui.services.IServiceWithSources; 20 21 32 public interface IContextService extends IServiceWithSources { 33 34 38 public static final String CONTEXT_ID_DIALOG = "org.eclipse.ui.contexts.dialog"; 40 44 public static final String CONTEXT_ID_DIALOG_AND_WINDOW = "org.eclipse.ui.contexts.dialogAndWindow"; 46 50 public static final String CONTEXT_ID_WINDOW = "org.eclipse.ui.contexts.window"; 52 57 public static final int TYPE_DIALOG = 0; 58 59 66 public static final int TYPE_NONE = 1; 67 68 73 public static final int TYPE_WINDOW = 2; 74 75 97 public IContextActivation activateContext(String contextId); 98 99 128 public IContextActivation activateContext(String contextId, 129 Expression expression); 130 131 164 public IContextActivation activateContext(String contextId, 165 Expression expression, boolean global); 166 167 199 public IContextActivation activateContext(String contextId, 200 Expression expression, int sourcePriorities); 201 202 211 public void addContextManagerListener(IContextManagerListener listener); 212 213 224 public void deactivateContext(IContextActivation activation); 225 226 240 public void deactivateContexts(Collection activations); 241 242 251 public Collection getActiveContextIds(); 252 253 261 public Context getContext(String contextId); 262 263 270 public Context[] getDefinedContexts(); 271 272 279 public Collection getDefinedContextIds(); 280 281 292 public int getShellType(Shell shell); 293 294 303 public void readRegistry(); 304 305 337 public boolean registerShell(Shell shell, int type); 338 339 346 public void removeContextManagerListener(IContextManagerListener listener); 347 348 367 public boolean unregisterShell(Shell shell); 368 } 369 | Popular Tags |