Bug 78317 Compare plug-in gets loaded by LocalHistoryActionGroup
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
ASTNode newNode= createASTNode(rewriter, results[i], buffer.getLineDelimiter());
				if (newNode == null) {
					MessageDialog.openError(shell, errorTitle, errorMessage);
					return;					
				}
				
				
				if (newNode instanceof PackageDeclaration) {
				    root.setPackage((PackageDeclaration) newNode);
				} else if (newNode instanceof ImportDeclaration) {
				    root.imports().add(newNode);
				} else {
				    if (list == null) {
						list= getContainerList(parent, root);
						if (list == null) {
							MessageDialog.openError(shell, errorTitle, errorMessage);
							return;					
						}
				    }
					if (pos < 0 || pos >= list.size()) {
						if (newNode instanceof BodyDeclaration) {
							pos= ASTNodes.getInsertionIndex((BodyDeclaration)newNode, list);
							list.add(pos, newNode);
						} else
							list.add(newNode);
					} else
						list.add(pos+1, newNode);
				}