Bug 3022

Summary: Cannot open file "local.conf" with double click in a "General" project
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Martin Oberhuber <mober.at>
Component: eclipse-pluginAssignee: Ioana Grigoropol <ioanax.grigoropol>
Status: CLOSED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.c.georgescu, ioanax.grigoropol, yp.ep.watcher, yp.watcher
Version: 1.2   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Martin Oberhuber 2012-08-28 13:06:28 UTC
CQ:WIND00372649
Build ID: org.yocto.bc.ui_1.2.0.201204241345.jar

1. File > New > Project > General:Project : name "foo"
2. File > New > File : name "local.conf"
3. Double clock local.conf

--> A "Could not open editor" error appears. 
Workaround: Right-click > Open File in Text Editor.


Pressing the details button on the broken editor reveweals:

org.eclipse.ui.PartInitException: 
	at org.yocto.bc.ui.editors.bitbake.BitBakeFileEditor.init(Unknown Source)
[...]

Plus on the console where Eclipse was started, this is shown:

java.io.FileNotFoundException: /installations/workspaces/mober/lx50_lb11/foo/.eclipse-data (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileReader.<init>(FileReader.java:55)
	at org.yocto.bc.bitbake.ProjectInfoHelper.getInitScriptPath(Unknown Source)
	at org.yocto.bc.ui.Activator.getShellSession(Unknown Source)
	at org.yocto.bc.ui.Activator.getBBSession(Unknown Source)
	at org.yocto.bc.ui.editors.bitbake.BitBakeFileEditor.init(Unknown Source)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
[...]



It looks like the BitBakeFileEditor requires existence of a ".eclipse-data" file in the project, but existence of that file can not be guaranteed.
Comment 1 Martin Oberhuber 2012-08-28 13:16:49 UTC
Looking at the source code in ProjectInfoHelper, it seems that this has actually been fixed already in master and JunoSSH as a side-effect of fixing bug 2288 .
Comment 2 Ioana Grigoropol 2012-09-05 12:12:17 UTC
Fixed as a side-effect of fixing bug 2288
Comment 3 Alexandru Georgescu 2012-10-08 12:29:41 UTC
verified
Comment 4 Armin Kuster 2019-08-29 15:17:21 UTC
closing