private FunctionUIN(CsmProject project, CsmFunction root) { this.project = project; functionUin = root.getUniqueName(); fileUid = UIDs.get(root.getContainingFile()); }
private void removeFunctionDeclaration(final CsmOffsetableDeclaration decl) { CsmFunction fun = (CsmFunction)decl; CsmFile file = fun.getContainingFile(); if (file != null && file.isValid()){ CsmOffsetableDeclaration other = (CsmOffsetableDeclaration) file.getProject().findDeclaration(fun.getUniqueName()); if (other != null) { PersistentKey otherKey = PersistentKey.createKey(other); if (!myKeys.containsKey(otherKey)) { myKeys.put(otherKey,getSortedName(other)); myChanges.remove(otherKey); return; } } } CsmFunctionDefinition def = fun.getDefinition(); if (def != null && def != decl){ file = fun.getContainingFile(); if (file != null && file.isValid() && file.getProject().findDeclaration(def.getUniqueName()) != null){ PersistentKey defKey = PersistentKey.createKey(def); if (!myKeys.containsKey(defKey)) { myKeys.put(defKey,getSortedName(def)); myChanges.remove(defKey); } } } }
private void removeFunctionDefinition(final CsmOffsetableDeclaration decl) { CsmFunctionDefinition def = (CsmFunctionDefinition) decl; CsmFunction fun = def.getDeclaration(); if (fun != null && fun != decl){ CsmFile file = fun.getContainingFile(); if (file != null && file.isValid()){ CsmOffsetableDeclaration other = (CsmOffsetableDeclaration) file.getProject().findDeclaration(fun.getUniqueName()); if (other != null) { PersistentKey otherKey = PersistentKey.createKey(other); if (!myKeys.containsKey(otherKey)) { myKeys.put(otherKey,getSortedName(other)); myChanges.remove(otherKey); return; } } } } CsmFile file = def.getContainingFile(); if (file != null && file.isValid()){ CsmOffsetableDeclaration other = (CsmOffsetableDeclaration) file.getProject().findDeclaration(def.getUniqueName()); if (other != null) { PersistentKey otherKey = PersistentKey.createKey(other); if (!myKeys.containsKey(otherKey)) { myKeys.put(otherKey,getSortedName(other)); myChanges.remove(otherKey); } } } }