| Summary: | NPE in target definition editor when opened with unknown editor input | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Eckart Langhuth <eckart.langhuth> | ||||||||
| Component: | UI | Assignee: | Ankur Sharma <ankur_sharma> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ankur_sharma, curtis.windatt.public, daniel_megert, matthias.gradl, remy.suen | ||||||||
| Version: | 3.7 | Flags: | ankur_sharma:
review+
daniel_megert: review- |
||||||||
| Target Milestone: | 3.7 RC1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 345016 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Eckart Langhuth
Created attachment 194941 [details]
Simple Patch
Created attachment 194942 [details]
Support StorageEditorInput patch
Consider for RC1 (at least the simple patch). I'm not confident enough with the storage editor input patch to put it in for RC1. Still looking at the simple patch for RC1 inclusion. We'll clone the bug for consideration in 3.8. Once you have used the save option (runs save as), I get the following NPE because the target doesn't have a proper backing handle. java.lang.NullPointerException at org.eclipse.pde.internal.core.target.TargetPlatformService.saveTargetDefinition(TargetPlatformService.java:244) at org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor$InputHandler.saveTargetDefinition(TargetEditor.java:400) at org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor.doSave(TargetEditor.java:94) at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:151) at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) The simple patch gets a +1 from me. Only change I would suggest is not having the \n in TargetEditor_6 string. Ankur, please review and commit for RC1. This bug was cloned as bug 345016 to consider expanding editor support in 3.8. -1 for the patch for two reasons: - Opening an editor should never show a dialog. - The correct fix is to throw a PartInitException which will then result in an exception in the log but on the other hand it will show the file inside a text editor (this is the default fallback code in Platform Team). Created attachment 195050 [details]
Fail with PartInitException
Ankur, you can commit my patch if you're happy with it. I didn't commit it because I want sure it shall get counted as contributed. Will commit after verifying. I was referring to the 'simple patch'. Testing Dani's patch now and will commit it asap. +1 Applied to HEAD Verified in I20110514-0800 |