Faculty of Information Technology
Software Engineering Group

Opened 10 years ago

Closed 10 years ago

#1 closed enhancement (fixed)

Find method source code

Reported by: kursjan Owned by: kursjan
Priority: major Milestone: milestone:
Component: stx:libjava Keywords: source code, class browser


Smalltalk Class Browser shows the Java class methods. Unfortunately it is not able to locate specific method in the Java source code. This should be fixed.

Use case:
Load Java Library
Select some Java Object - e.g. java.lang.Object
Select some method - e.g. hashCode()

The hashCode() source should appear in the code view.

Change History (5)

comment:1 Changed 10 years ago by Jan Vraný

We need a full java parser to find out where the method starts. Maybe we can start with
Java 1.0 parser included in SmaCC - tweak it a little bit. It would be nice to use it for
syntax highlighting as well :-)

comment:2 Changed 10 years ago by kursjan

Status: newaccepted

comment:3 Changed 10 years ago by Jan Vraný

Summary: Find method source coudeFind method source code

comment:4 Changed 10 years ago by kursjan

SmaCC was found inappropriate for the Java 6.

I tried to implement Java Parser based on PetitParser. It seems to work fine, by now I can parse java.lang.Object, java.lang.System, java.reflect.Class in Pharo. I have no reason to belive there is anything in Java 6 that we cannot "easily" handle with PetitParser.

I will try to port it to the Smalltalk/X now.

comment:5 Changed 10 years ago by kursjan

Resolution: fixed
Status: acceptedclosed

The PetitParser has been ported into the ST/X including the simple parser of Java. Current implementation does not support method body, may contain some bugs but it seems, it work sufficiently for now.

Note: See TracTickets for help on using tickets.