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/ToggleCommentAction.java
return;
		
		final int operationCode;
		if (isSelectionCommented(editor.getSelectionProvider().getSelection()))
			operationCode= ITextOperationTarget.STRIP_PREFIX;
		else
			operationCode= ITextOperationTarget.PREFIX;
		
		Shell shell= editor.getSite().getShell();
		if (!fOperationTarget.canDoOperation(operationCode)) {
			if (shell != null)
				MessageDialog.openError(shell, JavaEditorMessages.getString("ToggleComment.error.title"), JavaEditorMessages.getString("ToggleComment.error.message")); 
			return;
		}
		
		Display display= null;
		if (shell != null && !shell.isDisposed()) 
			display= shell.getDisplay();
	
		BusyIndicator.showWhile(display, new Runnable() {
			public void run() {
				fOperationTarget.doOperation(operationCode);
			}
		});
	}
	
	/**
	 * Is the given selection single-line commented?
	 *
	 * @param selection Selection to check