Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2009 itemis AG ( and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at /
 package org.eclipse.xtext.ui.editor.toggleComments;
import  org.eclipse.jface.text.source.ISourceViewer;

Sebastian Zarnekow - Initial contribution and API
	public static final String SL_COMMENT = "org.eclipse.xtext.ui.editor.DefaultSingleLineCommentHelper.SL_COMMENT"
	private String singleLineCommentRule = "SL_COMMENT";
	private String[] result;
	public String[] getDefaultPrefixes(ISourceViewer sourceViewerString contentType) {
		if ( != null)
			return ;
		if (rule == null || !(rule instanceof TerminalRule)) {
			return null;
		return this.;
	protected void calculatePrefixes(AbstractRule rule) {
		final List<Stringresult = new ArrayList<String>(3);
		this. = result.toArray(new String[result.size()]);
	protected SLCommentPrefixCalculator createCalculator(final List<Stringresult) {
		return new SLCommentPrefixCalculator(result);
	public void setGrammarAccess(IGrammarAccess grammarAccess) {
		this. = grammarAccess;
		return ;
	public void setSingleLineCommentRule(String singleLineCommentRule) {
		this. = singleLineCommentRule;
New to GrepCode? Check out our FAQ X