/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
}
+ private void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ }
+
// ------------------------------------------------------------------------
// ITmfProjectModelElement
// ------------------------------------------------------------------------
@Override
public void removeChild(ITmfProjectModelElement child) {
fChildren.remove(child);
+ if (child instanceof TmfProjectModelElement) {
+ ((TmfProjectModelElement) child).dispose();
+ }
refresh();
}
/*
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((fLocation == null) ? 0 : fLocation.hashCode());
- result = prime * result + ((fName == null) ? 0 : fName.hashCode());
result = prime * result + ((fPath == null) ? 0 : fPath.hashCode());
return result;
}
return false;
}
TmfProjectModelElement element = (TmfProjectModelElement) other;
- return element.fName.equals(fName) && element.fLocation.equals(fLocation);
+ return element.fPath.equals(fPath);
}
/**