Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334691 - "Extract function" Internal Error
Summary: "Extract function" Internal Error
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 7.0.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Project Inbox CLA
QA Contact: Emanuel Graf CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 14:45 EST by Roland Schulz CLA
Modified: 2011-03-22 08:06 EDT (History)
3 users (show)

See Also:


Attachments
Example for refactoring problem (22.83 KB, text/plain)
2011-02-19 01:46 EST, Roland Schulz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Schulz CLA 2011-01-18 14:45:54 EST
Trying to extract a function, selecting a return value is not possible. Both the list of possible return values and the option "no return value (void)" are greyed out. Clicking Next or Finish causes an Internal error:

Root exception:
java.lang.NullPointerException
        at org.eclipse.cdt.internal.ui.refactoring.extractfunction.ExtractStatement.determineReturnType(ExtractStatement.java:51)


Steps to reproduce:
1. select lines 293-317 (inclusive) of attached file
2. Refactor->Extract Function
Comment 1 Marc-André Laperle CLA 2011-01-18 17:48:34 EST
Attached file? ;)
Comment 2 Marc-André Laperle CLA 2011-02-19 00:44:56 EST
Can you attach a sample file to help reproduce the problem?
Comment 3 Roland Schulz CLA 2011-02-19 01:46:49 EST
Created attachment 189340 [details]
Example for refactoring problem

Sorry I forgot to attach the file.
Comment 4 Roland Schulz CLA 2011-02-19 04:07:24 EST
I just tested it with 8.0M5 and it has it fixed. Leaving as NEW because I don't know whether you want to fix it in 7.x.
Comment 5 Marc-André Laperle CLA 2011-02-19 12:42:43 EST
I think it's too late for 7.x, RC4 has already passed. 
http://www.eclipse.org/epp/download.php

Thanks for testing with 8.0.
Comment 6 Emanuel Graf CLA 2011-03-22 08:06:48 EDT
Fixed in HEAD