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
private String[] fCommentPrefixes;
	
	/**
	 * Creates and initializes the action for the given text editor. The action
	 * configures its visual representation from the given resource bundle.
	 *
	 * @param bundle the resource bundle
	 * @param prefix a prefix to be prepended to the various resource keys
	 *   (described in <code>ResourceAction</code> constructor), or 
	 *   <code>null</code> if none
	 * @param editor the text editor
	 * @see ResourceAction#ResourceAction
	 */
	public ToggleCommentAction(ResourceBundle bundle, String prefix, ITextEditor editor, String[] commentPrefixes) {
		super(bundle, prefix, editor);
		fCommentPrefixes= commentPrefixes;
	}
	
	/**
	 * Implementation of the <code>IAction</code> prototype. Checks if the selected
	 * lines are all commented or not and uncomment/comments them respectively.
	 */
	public void run() {
		if (fOperationTarget == null)
			return;
			
		ITextEditor editor= getTextEditor();
		if (!(editor instanceof JavaEditor))
			return;
		if (!validateEditorInputState())