use of org.eclipse.compare.structuremergeviewer.IDiffElement in project linuxtools by eclipse.
the class PrepareChangeLogAction method extractSynchronizeModelInfo.
private void extractSynchronizeModelInfo(ISynchronizeModelElement d, IPath path, Vector<PatchFile> newList, Vector<PatchFile> removeList, Vector<PatchFile> changeList) {
// Don't add entries for ChangeLog files though.
if (d.hasChildren()) {
IPath newPath = path.append(d.getName());
for (IDiffElement element : d.getChildren()) {
if (element instanceof ISynchronizeModelElement)
extractSynchronizeModelInfo((ISynchronizeModelElement) element, newPath, newList, removeList, changeList);
else {
if (!(d.getName().equals("ChangeLog"))) {
// $NON-NLS-1$
PatchFile p = new PatchFile(d.getResource());
int kind = d.getKind() & Differencer.CHANGE_TYPE_MASK;
if (kind == Differencer.CHANGE) {
changeList.add(p);
} else if (kind == Differencer.ADDITION) {
p.setNewfile(true);
newList.add(p);
} else if (kind == Differencer.DELETION) {
p.setRemovedFile(true);
removeList.add(p);
}
} else {
this.changeLogModified = true;
}
}
}
} else {
if (!(d.getName().equals("ChangeLog"))) {
// $NON-NLS-1$
PatchFile p = new PatchFile(d.getResource());
int kind = d.getKind() & Differencer.CHANGE_TYPE_MASK;
if (kind == Differencer.CHANGE) {
changeList.add(p);
} else if (kind == Differencer.ADDITION) {
p.setNewfile(true);
newList.add(p);
} else if (kind == Differencer.DELETION) {
p.setRemovedFile(true);
removeList.add(p);
}
} else {
this.changeLogModified = true;
}
}
}
Aggregations