@Override public void update(final PDOMLinkage linkage, IBinding newBinding, IASTNode point) throws CoreException { if (newBinding instanceof IVariable) { final Database db = getDB(); ICPPVariable var = (ICPPVariable) newBinding; IType newType = var.getType(); setType(linkage, newType); setValue(var.getInitialValue()); db.putByte(record + ANNOTATIONS, PDOMCPPAnnotations.encodeVariableAnnotations(var)); } }
public PDOMCPPVariable( PDOMLinkage linkage, PDOMNode parent, ICPPVariable variable, boolean setTypeAndValue) throws CoreException { super(linkage, parent, variable.getNameCharArray()); // Find the type record Database db = getDB(); db.putByte(record + ANNOTATIONS, PDOMCPPAnnotations.encodeVariableAnnotations(variable)); if (setTypeAndValue) { setType(parent.getLinkage(), variable.getType()); setValue(variable.getInitialValue()); } }