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

Bug 321475

Summary: Unable to open testlog file if it is not part of the workspace
Product: z_Archived Reporter: Usha <usha_thulasiram>
Component: TPTPAssignee: Bozier jerome <jerome.bozier>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: major    
Priority: P3 CC: jerome.bozier, paulslau, prakash
Version: unspecifiedFlags: paulslau: review+
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Usha CLA 2010-08-02 02:12:54 EDT
Build Identifier: M20090211-1700

When we import the file not part of workspace it is created as FileStoreEditorInput. In TestLogViewer. init method this type is not handled Because of this , object is null and PartInit exception is thrown

Reproducible: Always

Steps to Reproduce:
1.Choose file open and open the log file that is not part of the worksapce
2.File cannot be opened and we can see PartInit exception
Comment 1 Prakash Rangaraj CLA 2010-08-02 02:22:25 EDT
Where is TestLogViewer class? Can you attach the stack trace?
Comment 2 Prakash Rangaraj CLA 2010-08-02 02:51:45 EDT
TestLogViewer is from TPTP. Moving the bug
Comment 3 Bozier jerome CLA 2010-08-11 08:20:56 EDT
to be more precise :

org.eclipse.ui.PartInitException: Invalid editor input.
at org.eclipse.hyades.test.ui.forms.editor.BaseFormEditor.init(BaseFormEditor.java:128)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)

checking what is happening
Comment 4 Bozier jerome CLA 2010-08-11 08:58:06 EDT
Created attachment 176333 [details]
patch

ok, there was 2 problems in fact :
. problem 1 : editor input was of an unknown type until now (IURIEditorInput, for resource outside workspace)
. problem 2 (only triggered when 1 was fixed) : EMF resource set had problem with theses external URI and we were not taking care if result could be null

fix :
. problem 1 : deal this kind of input to retrieve file path (inside test.ui plugin)
. problem 2 : take a bit more care of null pointers (inside platform.model.hierarchy plugin)
Comment 5 Bozier jerome CLA 2010-08-11 09:00:05 EDT
Paul, could you please review this very short patch ?

many thanks in advance,

Jerome
Comment 6 Bozier jerome CLA 2010-08-11 09:29:23 EDT
. test case added under CVS
. wiki updated
Comment 7 Bozier jerome CLA 2010-08-11 09:50:49 EDT
Thanks Paul

patch pushed under CVS, resolving
Comment 8 Usha CLA 2010-08-12 10:08:26 EDT
hi Bozier, Thanks for the fix. We are using tptp4.3 version. Is it possible to provide this fix as a patch for 4.3.
Comment 9 Bozier jerome CLA 2010-08-24 08:44:22 EDT
verified on build TPTP-4.7.1-201008232100, closing
Comment 10 Kathy Chan CLA 2010-11-04 13:16:59 EDT
Filling in target milestone as this was fixed for TPTP 4.7.1.