Bug 411579 - Add a "Create class" Quick fix.
Summary: Add a "Create class" Quick fix.
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.1.2   Edit
Hardware: PC Windows 7
: P3 enhancement with 1 vote (vote)
Target Milestone: 9.0.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Sergey Prigogin CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 06:24 EDT by E J CLA
Modified: 2016-11-07 08:53 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E J CLA 2013-06-25 06:24:18 EDT
Overview: A Quick Fix to fix the "Type could not be resolved"-problem by creating the Class.

Steps to reproduce:
1. Write the variable declaration "TestClass x;" where TestClass is a non-existent class.

2. "TestClass" is underlined in red, place the marker there and press Ctrl-1.

Actual result:
The proposals "Rename in file" and "Rename in workspace" are displayed.

Result after enhancement:
"Create this class" is also displayed, and if the user selects this option the class wizard is started with the class name, header file and source file fields filled in with "TestClass", "TestClass.h", "TestClass.cpp".

(I have implemented a solution for this as a plug-in but would also like to have it included in CDT)
Comment 1 Sergey Prigogin CLA 2013-06-25 13:06:02 EDT
(In reply to comment #0)

Nice feature. Please put the patch implementing this feature in CDT to Gerrit (http://wiki.eclipse.org/CDT/git#Using_Gerrit_for_CDT).
Comment 2 E J CLA 2013-07-03 07:12:49 EDT
New Changes:
https://git.eclipse.org/r/14214
Comment 3 Eclipse Genie CLA 2016-01-05 21:29:11 EST
New Gerrit change created: https://git.eclipse.org/r/63605
Comment 6 Dominic Scharfe CLA 2016-11-07 08:53:54 EST
Nice feature. However there seems to be a bug in the implementation, see: bug 507148