private HashMap<String, HashMap<String, IVariable>> getModuleDescriptors( IVariable[] variables, NesCVariableNameParser varPars) { HashMap<String, HashMap<String, IVariable>> res = new HashMap<String, HashMap<String, IVariable>>(); for (IVariable var : variables) { try { if (varPars.isNesCVariable(var.getName())) { String name = var.getName(); String desc = varPars.getModuleName(name); String varName = varPars.getVariableName(name); if (desc != null) { HashMap<String, IVariable> modVars = res.get(desc); if (modVars == null) { modVars = new HashMap<String, IVariable>(); res.put(desc, modVars); } modVars.put(varName, var); } } } catch (DebugException e) { TinyOSDebugPlugin.getDefault().log("Exception while extracting module descriptors.", e); } } return res; }