Extension SDK

oracle.jdeveloper.model
Interface PackagedSource

All Known Implementing Classes:
JavaSourceNode, JspSourceNode

public interface PackagedSource

The Interface to get the package name from a source file.

The debugger within JDeveloper uses this interface to enable supporting breakpoints within a file. If a Document does not implement this interface, clicking in the margin to add a code breakpoint will do nothing. The CodeCoach functionality also uses this interface to find Documents. JavaSourceNode and JspSourceNode both implement this interface.


Method Summary
 java.lang.String getPackage(JProject project)
          Returns the package for the source file.
 java.lang.String getSourceFile()
          Returns the file name for the source file.
 

Method Detail

getPackage

public java.lang.String getPackage(JProject project)
Returns the package for the source file.

Note that the package returned here may begin with a '*' which means that the exact package is not known.

Parameters:
project - the project which contains the source file
Returns:
the package for the source file.

getSourceFile

public java.lang.String getSourceFile()
Returns the file name for the source file.

Only the name of the source file is given by the source file attribute it never represents the name of a directory containing the file or an absolute path name for the file. For instance the source file attribute may contain file name foo.java but not the UNIX path name /home/jdevwork/workspace1/project1/package1/foo.java.

Returns:
the source file name for the source file.

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.