Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324051

Summary: NullPointerException in FormatPreferencesSupport class
Product: z_Archived Reporter: Q.S. Wang <qiangsheng.w>
Component: PDTAssignee: Q.S. Wang <qiangsheng.w>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: coding, eclipse, ganoro, hai.kataker, iainhouston, jean.carlos, karl, lukasz, petyo_tanchev, pugorg, zhaozhongwei
Version: unspecifiedFlags: qiangsheng.w: review+
ganoro: review+
zhaozhongwei: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
new patch none

Description Q.S. Wang CLA 2010-08-31 00:20:16 EDT
The issue is that the passed in document doesn't necessarily to be a managed one. For example, the case of compare editor and preview pages. 

Stack trace below.

Caused by: java.lang.NullPointerException
        at org.eclipse.php.internal.core.format.FormatPreferencesSupport.verifyValidity(FormatPreferencesSupport.java:100)
        at org.eclipse.php.internal.core.NullPointerExcformat.FormatPreferencesSupport.getIndentationChar(FormatPreferencesSupport.java:89)
        at org.eclipse.php.internal.ui.editor.configuration.PHPStructuredTextViewerConfiguration.getIndentPrefixes(PHPStructuredTextViewerConfiguration.java:436)
Comment 1 Q.S. Wang CLA 2010-08-31 04:19:19 EDT
Created attachment 177815 [details]
new patch
Comment 2 Q.S. Wang CLA 2010-08-31 05:08:27 EDT
fixed
Comment 3 Q.S. Wang CLA 2010-08-31 05:09:03 EDT
fixed.
Comment 4 Jacek Pospychala CLA 2010-10-01 03:42:28 EDT
*** Bug 326553 has been marked as a duplicate of this bug. ***
Comment 5 Nevik Rehnel CLA 2010-10-01 06:09:10 EDT
The patch is not included in the latest update of PDT.

How do i manually apply the patch? My PDT is otherwise not operational, since i heavily rely on the diff feature.
Comment 6 Karl Debisschop CLA 2010-10-04 10:50:32 EDT
I cannot find any indication in the PDT roadmap of when a build incorporating this patch will be made available. Does anyone have any insight on that process/timetable? (Knowing that the bug is resolved is of much less utility than having a working capability to do diffs in my IDE)
Comment 7 Jacek Pospychala CLA 2010-10-05 09:33:48 EDT
*** Bug 326856 has been marked as a duplicate of this bug. ***
Comment 8 Petyo Tanchev CLA 2010-10-06 03:02:02 EDT
Tested on PDT 2.2.1.v20101001
Fixed
Comment 9 Nevik Rehnel CLA 2010-10-06 03:25:03 EDT
cool, and where can i get this new version ?
Comment 10 Tomasz Zarna CLA 2010-10-07 11:11:11 EDT
*** Bug 327230 has been marked as a duplicate of this bug. ***
Comment 12 Jacek Pospychala CLA 2010-10-11 02:31:34 EDT
*** Bug 326600 has been marked as a duplicate of this bug. ***
Comment 13 Roy Ganor CLA 2010-10-11 17:43:07 EDT
or use this update site: http://download.eclipse.org/tools/pdt/updates/2.2/milestones
Comment 14 Karl Debisschop CLA 2010-10-12 09:24:52 EDT
(In reply to comment #13)
> or use this update site:
> http://download.eclipse.org/tools/pdt/updates/2.2/milestones

Thanks, Roy.
Comment 15 Jean CLA 2010-11-08 06:48:31 EST
Many thanks to you.
It's pretty simple, but for those who do not know is very difficult.

Jean.

(In reply to comment #14)
> (In reply to comment #13)
> > or use this update site:
> > http://download.eclipse.org/tools/pdt/updates/2.2/milestones
> 
> Thanks, Roy.
Comment 16 grzana12 CLA 2010-11-17 03:31:33 EST
How can I install this patch in Eclipse Classic 3.6.1?
Patch is not available in update!