@Override public Context getContext(String id) { Context ctx = contextManager.getContext(id); return ctx; }
@Override public Context getContext(String id) { Context ctx = contextManager.getContext(id); return ctx; }
public Context getContext(String id) { Context ctx = contextManager.getContext(id); return ctx; }
@Override public IContext getContext(String contextId) { return new ContextLegacyWrapper(contextManager.getContext(contextId), contextManager); }
@Inject public void setContextIds(@Named(ACTIVE_CONTEXTS) @Optional Set<String> set) { if (set == null || set.isEmpty() || contextManager == null) { contextSet = ContextSet.EMPTY; return; } ArrayList<Context> contexts = new ArrayList<Context>(); for (String id : set) { contexts.add(contextManager.getContext(id)); } contextSet = manager.createContextSet(contexts); }
@Inject public void setContextIds(@Named(ACTIVE_CONTEXTS) @Optional Set<String> set) { if (set == null || set.isEmpty() || contextManager == null) { contextSet = ContextSet.EMPTY; return; } ArrayList<Context> contexts = new ArrayList<Context>(); for (String id : set) { contexts.add(contextManager.getContext(id)); } contextSet = manager.createContextSet(contexts); }
private void undefineContext(MBindingContext current) { Context context = contextManager.getContext(current.getElementId()); context.undefine(); }
.getContext(childContextId);
context = contextManager.getContext(contextId1); try { parentId = context.getParentId(); while (parentId != null) { depth1++; context = contextManager.getContext(parentId); parentId = context.getParentId(); context = contextManager.getContext(contextId2); try { parentId = context.getParentId(); while (parentId != null) { depth2++; context = contextManager.getContext(parentId); parentId = context.getParentId();
.getContext(childContextId);
.getContext(childContextId);
private int getLevel(Context c) { int l = 0; try { String parentId = c.getParentId(); while (parentId != null) { l++; Context context = manager.getContext(parentId); parentId = context.getParentId(); } } catch (NotDefinedException e) { // ignore } return l; } }
@Inject void setContextIds(@Named(ACTIVE_CONTEXTS) @Optional Set<String> set) { if (set == null || set.isEmpty() || this.contextManager == null) { this.contextSet = ContextSet.EMPTY; if (this.contextManager != null) { this.contextManager.setActiveContextIds(Collections.EMPTY_SET); } return; } ArrayList<@NonNull Context> contexts = new ArrayList<>(); for (String id : set) { Context ctx = this.contextManager.getContext(id); if( ctx != null ) { contexts.add(ctx); } } this.contextSet = BindingTableManager.createContextSet(contexts); this.contextManager.setActiveContextIds(set); }
private int getLevel(Context c) { int l = 0; try { String parentId = c.getParentId(); while (parentId != null) { l++; Context context = manager.getContext(parentId); parentId = context.getParentId(); } } catch (NotDefinedException e) { // TODO Auto-generated catch block e.printStackTrace(); } return l; } }
private int getLevel(Context c) { int l = 0; try { String parentId = c.getParentId(); while (parentId != null) { l++; Context context = this.manager.getContext(parentId); parentId = context.getParentId(); } } catch (NotDefinedException e) { // TODO Auto-generated catch block e.printStackTrace(); } return l; } }
while (contextIdItr.hasNext()) { String contextId = (String) contextIdItr.next(); Context context = contextManager.getContext(contextId); try { String parentId = context.getParentId(); context = contextManager.getContext(parentId); parentId = context.getParentId();
final Context context = contextManager.getContext(contextId); if (!context.isDefined()) { context.define(name, description, parentId);
/** * @param bindingTable */ private void defineBindingTable(MBindingTable bindingTable) { final Context bindingContext = this.contextManager.getContext(bindingTable.getBindingContext().getElementId()); BindingTable table = this.bindingTables.getTable(bindingTable.getBindingContext().getElementId()); if (table == null && bindingContext != null) { table = new BindingTable(bindingContext); this.bindingTables.addTable(table); } for (MKeyBinding binding : bindingTable.getBindings()) { defineBinding(table, bindingContext, binding); } }
private void defineContexts(MBindingContext parent, MBindingContext current) { if (current.getName() == null || current.getElementId() == null) { logger.error("Binding context name or id is null for: " + current); //$NON-NLS-1$ return; } Context context = contextManager.getContext(current.getElementId()); if (!context.isDefined()) { String localizedName = LocalizationHelper.getLocalized(current.getName(), current, application.getContext()); String localizedDescriptor = LocalizationHelper.getLocalized(current.getDescription(), current, application.getContext()); context.define(localizedName, localizedDescriptor, parent == null ? null : parent.getElementId()); } for (MBindingContext child : current.getChildren()) { defineContexts(current, child); } }
final Context bindingContext = this.contextManager.getContext(bt.getBindingContext().getElementId()); BindingTable table = this.bindingTables.getTable(bindingContext.getId()); if (table == null) {