Bug 322276 NPE raised when specifying positionInList in menus
bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/internal/ModelUtils.java
String elementId;
					boolean before;
					if( positionInList.startsWith("before:") ) {
						elementId = positionInList.substring("before:".length());
						before = true;
					} else {
						elementId = positionInList.substring("after:".length());
						before = false;
					}
					
					int tmpIndex = -1;
					for( int i = 0; i < list.size(); i++ ) {
						if( ((MApplicationElement)list.get(i)).getElementId().equals(elementId) ) {
							tmpIndex = i;
							break;
						}
					}
					
					if( tmpIndex != -1 ) {
						if( before ) {
							index = tmpIndex;
						} else {
							index = tmpIndex + 1;
						}
					} else {
						System.err.println("Could not find element with Id '"+elementId+"'");
					}
				} else {
					System.err.println("Not a valid list position.");
				}