Bug 41535

Summary: File Not Found ekception when building projects that do not use a separate source directory
Product: [Tools] AJDT Reporter: Adrian Colyer <adrian.colyer>
Component: CoreAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: matthew_webster
Version: 1.1.4   
Target Milestone: 1.1.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix to org.eclipse.ajdt.internal.ui.ajde.ProjectProperties andrew.eisenberg: iplog+

Description Adrian Colyer CLA 2003-08-14 08:01:13 EDT
java.io.FileNotFoundException: C:
\ColyerRoot\Data\AJDTDev\eclipse\runtime-workspace\ajdt.figures.demo.
complete\gui\FigurePanel$FigureSurface.class (The system cannot find the path 
specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:116)
	at org.aspectj.util.FileUtil.readAsByteArray(FileUtil.java:1004)
	at org.aspectj.weaver.bcel.BcelWeaver.addResource(BcelWeaver.java:158)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
initBcelWorld(AjBuildManager.java:218)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
doBuild(AjBuildManager.java:112)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
batchBuild(AjBuildManager.java:69)
	at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:
102)
	at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.
run(AspectJBuildManager.java:164)

This can be reproduced using the testdata/figures-demo project in ajdt
Comment 1 Matthew Webster CLA 2003-08-14 08:14:16 EDT
Created attachment 5761 [details]
Fix to org.eclipse.ajdt.internal.ui.ajde.ProjectProperties

Small bug in ProjectProperties.getSourcePathResources() added to fix BUG
#36071. The relative path calculation assumed as source directory in the
project e.g. “src”. The testcase uses the project folder. The fix calculates
the offset for each source path.
Comment 2 Adrian Colyer CLA 2003-08-14 08:41:16 EDT
applied Matthew's patch which fixes the bug
Comment 3 Adrian Colyer CLA 2003-08-28 08:15:23 EDT
updated target milestone to 1.1.4