Project

General

Profile

Bug #5539

Open Actor does not find the actor source code when Kepler is invoked from within Eclipse

Added by Christopher Brooks about 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
build system
Target version:
Start date:
11/12/2011
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5539

Description

Marc and I noticed that "Open Actor" fails to find the source code when Kepler is invoked from within Eclipse.

I looked at the classpath by using Tools -> Check System Settings and indeed ptolemy/src is missing from java.class.path when Kepler is invoked from Eclipse.
I'm not sure why this would be the case, the code in the

Open Actor looks in the classpath for the corresponding source file.
In the non-Kepler Ptolemy build, the .class files are placed in the same directory
as the .java files. This is because (in theory) Java .class files should be
the same and separate target directory should not be necessary.

See also bug #5538

History

#1 Updated by Christopher Brooks over 7 years ago

Fixed with changes to build-area/src/org/kepler/build/ide/Eclipse.java
Unfortunately, the path to the src/ directory needs to be an
absolute path to avoid
"Build path contains duplicate entry: 'src' for project 'ptolemy'"

#2 Updated by Christopher Brooks over 7 years ago

It turns out that my fixes to Eclipse.java were causing confusing error messages
in the Eclipse console during startup, so I commented out those changes
and added ptolemy.util.ClassUtilities.sourceResource() which searches each
element of the classpath that names a directory for a directory named "src"
and then looks for the source file. This makes it possible to find the
source .java file without modifying the Eclipse setup. This should also
work for other IDEs.

#3 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 5539

Also available in: Atom PDF