if (fProjectViewState){
if (fInputIsProject){
	private void addElement(IPackageFragment frag, Object parent) {				String key= getKey(frag);		LogicalPackage lp= (LogicalPackage)fMapToLogicalPackage.get(key);		//if fragment must be added to an existing CompoundElement		if (lp != null && lp.belongs(frag)){			lp.add(frag);			return;		}		//if a new CompoundElement must be created		IPackageFragment iPackageFragment= (IPackageFragment)fMapToPackageFragments.get(key);		if (iPackageFragment!= null && !iPackageFragment.equals(frag)){			lp= new LogicalPackage(iPackageFragment);			lp.add(frag);			//add new LogicalPackage to LogicalPackages map			fMapToLogicalPackage.put(key, lp);			//determin who to refresh								if (parent instanceof IPackageFragmentRoot){				IPackageFragmentRoot root= (IPackageFragmentRoot) parent;				if (fProjectViewState){					postRefresh(root.getJavaProject());					} else {					postRefresh(root);					}			} else { 				//@Improve: Shoud this be replaced by a refresh?				postAdd(lp, parent);				postRemove(iPackageFragment);			}		} 		//if this is a new Package Fragment		else {			fMapToPackageFragments.put(key, frag);			//determin who to refresh			if (parent instanceof IPackageFragmentRoot) {				IPackageFragmentRoot root= (IPackageFragmentRoot) parent;				if (fProjectViewState) {					postAdd(frag, root.getJavaProject());				} else					postAdd(frag, root);			} else {				postAdd(frag, parent);			}		}	}