Bug 15113 - extract method: assertion failure
Summary: extract method: assertion failure
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-02 12:10 EDT by Adam Kiezun CLA
Modified: 2002-05-09 15:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.