diff options
Diffstat (limited to 'plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/folding/ShellCommentFoldingBlockProvider.java')
-rw-r--r-- | plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/folding/ShellCommentFoldingBlockProvider.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/folding/ShellCommentFoldingBlockProvider.java b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/folding/ShellCommentFoldingBlockProvider.java new file mode 100644 index 0000000..6394773 --- /dev/null +++ b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/text/folding/ShellCommentFoldingBlockProvider.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat Inc. 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Alexander Kurtakov - initial API and implementation + *******************************************************************************/ +package org.eclipse.dltk.sh.internal.ui.text.folding; + +import org.eclipse.dltk.sh.internal.ui.Activator; +import org.eclipse.dltk.sh.internal.ui.text.IShellPartitions; +import org.eclipse.dltk.ui.text.folding.IFoldingContent; +import org.eclipse.dltk.ui.text.folding.PartitioningFoldingBlockProvider; + +public class ShellCommentFoldingBlockProvider extends PartitioningFoldingBlockProvider { + + public ShellCommentFoldingBlockProvider() { + super(Activator.getDefault().getTextTools()); + } + + @Override + public void computeFoldableBlocks(IFoldingContent content) { + if (isFoldingComments()) { + computeBlocksForPartitionType(content, IShellPartitions.COMMENT_CONTENT_TYPE, FoldingBlockKind.COMMENT, + isCollapseComments()); + } + } + +} |