use of org.eclipse.ui.internal.keys.model.SchemeModel in project translationstudio8 by heartsome.
the class KeyController2 method init.
public void init(IServiceLocator locator, List<String> lstRemove) {
getEventManager().clear();
this.serviceLocator = locator;
// filterDupliteBind();
fBindingManager = loadModelBackend(serviceLocator);
contextModel = new ContextModel(this);
contextModel.init(serviceLocator);
fSchemeModel = new SchemeModel(this);
fSchemeModel.init(fBindingManager);
bindingModel = new BindingModel2(this);
bindingModel.init(serviceLocator, fBindingManager, contextModel);
HashSet<BindingElement> set = bindingModel.getBindings();
Iterator<BindingElement> iterator = set.iterator();
while (iterator.hasNext()) {
BindingElement bindingElement = iterator.next();
if (lstRemove.contains(bindingElement.getId())) {
iterator.remove();
}
}
bindingModel.setBindings(set);
Map<Binding, BindingElement> mapBBe = bindingModel.getBindingToElement();
Iterator<Entry<Binding, BindingElement>> it = mapBBe.entrySet().iterator();
while (it.hasNext()) {
Entry<Binding, BindingElement> entry = (Entry<Binding, BindingElement>) it.next();
if (lstRemove.contains(entry.getValue().getId())) {
it.remove();
}
}
bindingModel.setBindingToElement(mapBBe);
conflictModel = new ConflictModel2(this);
conflictModel.init(fBindingManager, bindingModel);
addSetContextListener();
addSetBindingListener();
addSetConflictListener();
addSetKeySequenceListener();
addSetSchemeListener();
addSetModelObjectListener();
}
Aggregations