else if (o instanceof LogicalPackage) { IPackageFragment[] packages=((LogicalPackage)o).getFragments(); for (int j= 0; j < packages.length; j++) { IMemento packageMem= elementMem.createChild(TAG_LOGICAL_PACKAGE); packageMem.putString(TAG_SELECTED_ELEMENT_PATH, packages[j].getHandleIdentifier()); } }
	private void saveSelectionState(IMemento memento) {		Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();		if (elements.length > 0) {			IMemento selectionMem= memento.createChild(TAG_SELECTED_ELEMENTS);			for (int i= 0; i < elements.length; i++) {				IMemento elementMem= selectionMem.createChild(TAG_SELECTED_ELEMENT);				// we can only persist JavaElements for now				Object o= elements[i];				if (o instanceof IJavaElement)					elementMem.putString(TAG_SELECTED_ELEMENT_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());			}		}	}