diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java index d23b918e6c4..ed17048129b 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java @@ -10,7 +10,6 @@ * Sergey Prigogin, Google * Andrew Ferguson (Symbian) *******************************************************************************/ - package org.eclipse.cdt.ui.tests.text.doctools.doxygen; import junit.framework.Test; @@ -617,6 +616,58 @@ public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEdit assertAutoEditBehaviour(); } + // class Test { + // public: + // /**X + // Test(); + // }; + + // class Test { + // public: + // /** + // * X + // */ + // Test(); + // }; + public void testAutoDocCommentConstructor1() throws CoreException { + assertAutoEditBehaviour(); + } + + // class Test { + // public: + // /**X + // Test(int x); + // }; + + // class Test { + // public: + // /** + // * X + // * @param x + // */ + // Test(int x); + // }; + public void testAutoDocCommentConstructor2() throws CoreException { + assertAutoEditBehaviour(); + } + + // class Test { + // public: + // /**X + // ~Test(); + // }; + + // class Test { + // public: + // /** + // * X + // */ + // ~Test(); + // }; + public void testAutoDocCommentDestructor() throws CoreException { + assertAutoEditBehaviour(); + } + protected void assertAutoEditBehaviour() throws CoreException { CTextTools textTools = CUIPlugin.getDefault().getTextTools(); final IDocument doc = new Document(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java index 42888368110..d28818700f5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java @@ -27,6 +27,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclarator; import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier; +import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator; import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition; import org.eclipse.cdt.core.dom.ast.IASTNodeLocation; @@ -34,7 +35,6 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration; import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier; import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration; import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; -import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration; @@ -73,7 +73,8 @@ public class DoxygenMultilineAutoEditStrategy extends DefaultMultilineCommentAut boolean hasReturn= true; if(ds instanceof IASTSimpleDeclSpecifier) { IASTSimpleDeclSpecifier sds= (IASTSimpleDeclSpecifier) ds; - if(sds.getType()==IASTSimpleDeclSpecifier.t_void) { + if(sds.getType() == IASTSimpleDeclSpecifier.t_void || + sds.getType() == IASTSimpleDeclSpecifier.t_unspecified) { hasReturn= false; } }