mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 301966 - Automatic indentation does not work properly for doxygen block comments
This commit is contained in:
parent
c6fde503dc
commit
c9bb347592
3 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue