Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 342519
Collapse All | Expand All

(-)src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/DeclaratorFinder.java (+4 lines)
Lines 89-94 Link Here
89
		}
89
		}
90
		if (node instanceof IASTSimpleDeclaration) {
90
		if (node instanceof IASTSimpleDeclaration) {
91
			IASTDeclarator[] declarators = ((IASTSimpleDeclaration) node).getDeclarators();
91
			IASTDeclarator[] declarators = ((IASTSimpleDeclaration) node).getDeclarators();
92
			if (declarators.length > 1) {
93
				throw new NotSupportedException(Messages.DeclaratorFinder_MultipleDeclarators);
94
			}
95
			
92
			if (declarators.length == 1 && 
96
			if (declarators.length == 1 && 
93
					declarators[0] instanceof IASTFunctionDeclarator)
97
					declarators[0] instanceof IASTFunctionDeclarator)
94
				return (IASTFunctionDeclarator) declarators[0];
98
				return (IASTFunctionDeclarator) declarators[0];
(-)src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/Messages.java (+1 lines)
Lines 17-22 Link Here
17
	private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.refactoring.togglefunction.messages"; //$NON-NLS-1$
17
	private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.ui.refactoring.togglefunction.messages"; //$NON-NLS-1$
18
	public static String DeclaratorFinder_NestedFunction;
18
	public static String DeclaratorFinder_NestedFunction;
19
	public static String DeclaratorFinder_NoDeclarator;
19
	public static String DeclaratorFinder_NoDeclarator;
20
	public static String DeclaratorFinder_MultipleDeclarators;
20
	public static String RefactoringJob_UndoName;
21
	public static String RefactoringJob_UndoName;
21
	public static String ToggleFileCreator_andMove;
22
	public static String ToggleFileCreator_andMove;
22
	public static String ToggleFileCreator_CanNotCreateNewFile;
23
	public static String ToggleFileCreator_CanNotCreateNewFile;
(-)src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/messages.properties (+12 lines)
Lines 1-5 Link Here
1
###############################################################################
2
# Copyright (c) 2011 Institute for Software, HSR Hochschule fuer Technik  
3
# Rapperswil, University of applied sciences and others.
4
# All rights reserved. This program and the accompanying materials 
5
# are made available under the terms of the Eclipse Public License v1.0 
6
# which accompanies this distribution, and is available at 
7
# http://www.eclipse.org/legal/epl-v10.html  
8
# 
9
# Contributors: 
10
# 		Martin Schwab & Thomas Kallenberg - initial API and implementation 
11
###############################################################################
1
DeclaratorFinder_NestedFunction=Nested function declarations not supported
12
DeclaratorFinder_NestedFunction=Nested function declarations not supported
2
DeclaratorFinder_NoDeclarator=cannot work without declarator
13
DeclaratorFinder_NoDeclarator=cannot work without declarator
14
DeclaratorFinder_MultipleDeclarators=cannot work with multiple declarators
3
RefactoringJob_UndoName=toggle function definition
15
RefactoringJob_UndoName=toggle function definition
4
ToggleFileCreator_andMove=\ and move 
16
ToggleFileCreator_andMove=\ and move 
5
ToggleFileCreator_CanNotCreateNewFile=Cannot create new filechange
17
ToggleFileCreator_CanNotCreateNewFile=Cannot create new filechange

Return to bug 342519