Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 56445 - [Code Formatter] can not open in M8, NullPointerException
Summary: [Code Formatter] can not open in M8, NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal with 1 vote (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 56442 56652 59532 60433 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-27 05:12 EST by Jakob Braeuchi CLA
Modified: 2004-04-29 11:42 EDT (History)
4 users (show)

See Also:


Attachments
zipped .log file (1.47 KB, application/x-zip-compressed)
2004-03-27 05:13 EST, Jakob Braeuchi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Braeuchi CLA 2004-03-27 05:12:06 EST
i get a NPE when trying to open the code formatter in M8:

!ENTRY org.eclipse.ui 4 4 Mrz 27, 2004 10:55:05.765
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 Mrz 27, 2004 10:55:05.765
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.ui.preferences.formatter.WhiteSpaceTabPage$JavaElementComponent.innerViewerChanged(WhiteSpaceTabPage.java:336)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.WhiteSpaceTabPage$JavaElementComponent.refreshState(WhiteSpaceTabPage.java:267)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.WhiteSpaceTabPage$JavaElementComponent.initialize(WhiteSpaceTabPage.java:275)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.WhiteSpaceTabPage$SwitchComponent.initialize(WhiteSpaceTabPage.java:417)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.WhiteSpaceTabPage.initializePage(WhiteSpaceTabPage.java:457)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage.createContents(ModifyDialogTabPage.java:573)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.addTabPage(ModifyDialog.java:199)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.createDialogArea(ModifyDialog.java:127)
	at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:556)
	at org.eclipse.jface.window.Window.create(Window.java:350)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:859)
	at org.eclipse.jdt.internal.ui.dialogs.StatusDialog.create(StatusDialog.java:103)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.create(ModifyDialog.java:97)
	at org.eclipse.jface.window.Window.open(Window.java:639)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.CodingStyleConfigurationBlock$ButtonController.modifyButtonPressed(CodingStyleConfigurationBlock.java:172)
	at
org.eclipse.jdt.internal.ui.preferences.formatter.CodingStyleConfigurationBlock$ButtonController.widgetSelected(CodingStyleConfigurationBlock.java:149)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
Comment 1 Jakob Braeuchi CLA 2004-03-27 05:13:17 EST
Created attachment 8941 [details]
zipped .log file
Comment 2 Jakob Braeuchi CLA 2004-03-27 05:38:03 EST
i copied the workspace from M7 and integration builds
Comment 3 Jakob Braeuchi CLA 2004-03-27 05:50:20 EST
it works with a newly created workspace 
Comment 4 Olivier Thomann CLA 2004-03-27 09:58:40 EST
Move to JDT/UI.
Comment 5 Bob Kerns CLA 2004-03-29 02:12:49 EST
It also won't bring up the the page for the built-in ones (with the "Show..." 
button). I even removed by preferences and tried again, no luck.
Comment 6 Martin Aeschlimann CLA 2004-03-29 04:12:27 EST
fixed > 20040329
Comment 7 Dirk Baeumer CLA 2004-03-29 04:25:26 EST
*** Bug 56442 has been marked as a duplicate of this bug. ***
Comment 8 Dirk Baeumer CLA 2004-03-30 04:04:30 EST
*** Bug 56652 has been marked as a duplicate of this bug. ***
Comment 9 Martin Aeschlimann CLA 2004-04-01 11:01:51 EST
The workaround for the nasty bug is:

- shutdown eclipse
- find the file .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml in
your workspace
- find the string
'key="org.eclipse.jdt.uiformatter_page.white_space.java_view.inner"'
and change the following value to 'value="0"'
- you can also delete the who file 'dialog_settings.xml': you will loose some
saved state of dialogs, e.g. last opened size, last browsed lcoation; but
nothing serious.

- restart eclipse

Comment 10 Dirk Baeumer CLA 2004-04-22 03:41:28 EDT
*** Bug 59532 has been marked as a duplicate of this bug. ***
Comment 11 Martin Aeschlimann CLA 2004-04-29 11:42:04 EDT
*** Bug 60433 has been marked as a duplicate of this bug. ***