Bug 34221 [code manipulation] Comment and uncomment code
The same key ctrl-/ should be used for both comments and uncommenting code. If code isn't commented ctrl-/ will comment. If already commented ctrl-/ will uncomment it. If two levels of comments, uncomment the first, then the second. For example //this is a comment ////this is a second comment hitting ctrl-/ would result in this is a comment //this is a second comment
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
if (newElementLine == -1)
					return -1;
				int newLine= fLine + newElementLine - fElementLine;
				if (newLine < 0 || newLine >= document.getNumberOfLines())
					return -1;
				int maxColumn= document.getLineLength(newLine);
				String lineDelimiter= document.getLineDelimiter(newLine);
				if (lineDelimiter != null)
					maxColumn= maxColumn - lineDelimiter.length();
				int offset;
				if (fColumn > maxColumn)
					offset= document.getLineOffset(newLine) + maxColumn;
				else
					offset= document.getLineOffset(newLine) + fColumn;
				if (!containsOffset(newElement, offset) && (offset == 0 || !containsOffset(newElement, offset - 1)))
					return -1;
				
				return offset;
			} catch (BadLocationException e) {
				
				JavaPlugin.log(e);
				return -1;
			} catch (JavaModelException e) {
				
				JavaPlugin.log(e.getStatus());
				return -1;
			}
		}
		
		/**