Bug 43488 [typing] BadPositionCategoryException in LinkedPositionManager
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/contentassist/ContentAssistant2.java
public final static int LAYOUT_PROPOSAL_SELECTOR= 0;
		public final static int LAYOUT_CONTEXT_SELECTOR= 1;
		public final static int LAYOUT_CONTEXT_INFO_POPUP= 2;
		int fContextType= LAYOUT_CONTEXT_SELECTOR;
		Shell[] fShells= new Shell[3];
		Object[] fPopups= new Object[3];
		protected void add(Object popup, Shell shell, int type, int offset) {
			Assert.isNotNull(popup);
			Assert.isTrue(shell != null && !shell.isDisposed());
			checkType(type);
			
			if (fShells[type] != shell) {
				if (fShells[type] != null)
					fShells[type].removeListener(SWT.Dispose, this);
				shell.addListener(SWT.Dispose, this);
				fShells[type]= shell;
			}
			
			fPopups[type]= popup;
			if (type == LAYOUT_CONTEXT_SELECTOR || type == LAYOUT_CONTEXT_INFO_POPUP)
				fContextType= type;
			
			layout(type, offset);
			adjustListeners(type);
		}