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
* Implementation of the <code>IUpdate</code> prototype method discovers
	 * the operation through the current editor's
	 * <code>ITextOperationTarget</code> adapter, and sets the enabled state
	 * accordingly.
	 */
	public void update() {
		super.update();
		
		if (!canModifyEditor()) {
			setEnabled(false);
			return;
		}
		
		ITextEditor editor= getTextEditor();
		if (fOperationTarget == null && editor != null)
			fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
			
		boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(ITextOperationTarget.PREFIX) && fOperationTarget.canDoOperation(ITextOperationTarget.STRIP_PREFIX));
		setEnabled(isEnabled);
	}
	
	/*
	 * @see TextEditorAction#setEditor(ITextEditor)
	 */
	public void setEditor(ITextEditor editor) {
		super.setEditor(editor);
		fOperationTarget= null;
	}
}