diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java index 7ec192e9040..3403675f043 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation 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 @@ -210,7 +210,7 @@ public class IndentAction extends TextEditorAction { ITypedRegion partition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, true); ITypedRegion startingPartition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, false); String type= partition.getType(); - if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT)) { + if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT) || type.equals(ICPartitions.C_MULTI_LINE_DOC_COMMENT)) { indent= computeCommentIndent(document, line, scanner, startingPartition); } else if (startingPartition.getType().equals(ICPartitions.C_PREPROCESSOR)) { indent= computePreprocessorIndent(document, line, startingPartition); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/IndentUtil.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/IndentUtil.java index 54bcfc7b090..7718d026f73 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/IndentUtil.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/IndentUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2010 IBM Corporation 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 @@ -445,7 +445,7 @@ public final class IndentUtil { ITypedRegion partition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, true); ITypedRegion startingPartition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, false); String type= partition.getType(); - if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT)) { + if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT) || type.equals(ICPartitions.C_MULTI_LINE_DOC_COMMENT)) { indent= computeCommentIndent(document, line, scanner, startingPartition); } else if (startingPartition.getType().equals(ICPartitions.C_PREPROCESSOR)) { indent= computePreprocessorIndent(document, line, startingPartition); @@ -510,7 +510,7 @@ public final class IndentUtil { ITypedRegion partition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, true); ITypedRegion startingPartition= TextUtilities.getPartition(document, ICPartitions.C_PARTITIONING, offset, false); String type= partition.getType(); - if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT)) { + if (type.equals(ICPartitions.C_MULTI_LINE_COMMENT) || type.equals(ICPartitions.C_MULTI_LINE_DOC_COMMENT)) { indent= computeCommentIndent(document, line, scanner, startingPartition); } else if (startingPartition.getType().equals(ICPartitions.C_PREPROCESSOR)) { indent= computePreprocessorIndent(document, line, startingPartition); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java index bdd3d622f9f..b712e853235 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2010 IBM Corporation 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 @@ -557,7 +557,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration { */ @Override public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) { - return new String[] { "//", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + return new String[] { "//", "//!", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } /*