Bug 15113

Summary: extract method: assertion failure
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2002-05-02 12:10:05 EDT
20020501
hard to give a test case

	at org.eclipse.jdt.internal.corext.Assert.isTrue(Assert.java:132)
	at org.eclipse.jdt.internal.corext.util.Strings.trimIndent
(Strings.java:172)
	at 
org.eclipse.jdt.internal.corext.refactoring.code.ExtractMethodRefactoring.create
Call(ExtractMethodRefactoring.java:457)
	at 
org.eclipse.jdt.internal.corext.refactoring.code.ExtractMethodRefactoring.create
Change(ExtractMethodRefactoring.java:289)
	at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run
(CreateChangeOperation.java:97)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Comment 1 Dirk Baeumer CLA 2002-05-03 08:03:18 EDT
The problem is that the formatter ignores initialIdent in the case that the 
formatting option "Maximum line length" is set to 0.

Here are the result from the debugger:

Maximum line length 999

formatter.format("ee()", 2, null, delimiter) produces: "\t\tee()"

Maximum line length 0

formatter.format("ee()", 2, null, delimiter) produces: "ee()"

Moving to JCore...
Comment 2 Olivier Thomann CLA 2002-05-09 15:36:35 EDT
Fixed and released in HEAD.