|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.runner.Source
public final class Source
The Source
class provides methods for displaying source files in the code editor or UI designer.
The Source
class is used by the debugger and the profiler to display source files in the code editor.
Method Summary | |
---|---|
static void |
addSourceFinder(SourceFinder finder) Registers a SourceFinder |
static void |
addSourceFinderManager(SourceFinderManager manager) Registers a SourceFinderManager |
static java.net.URL |
askSourceFinders(Workspace workspace, Project project, java.lang.String pkg, java.lang.String filename) |
static java.net.URL |
findOpenSourceStub(Workspace workspace, Project project, java.lang.String fullClassName) Returns the URL for a source stub that has already been opened. |
static java.net.URL |
findSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String filename) Returns the URL for the source file that has the given package and filename. |
static java.net.URL |
findURLForClass(Workspace workspace, Project project, java.lang.String fullClassName) |
static java.net.URL |
findURLForClassSource(Project project, java.lang.String fullClassName) |
static java.net.URL |
findURLForClassSource(Workspace workspace, Project project, java.lang.String fullClassName) |
static java.net.URL |
findURLForClassStub(Project project, java.lang.String fullClassName) |
static java.net.URL |
findURLForClassStub(Workspace workspace, Project project, java.lang.String fullClassName) |
static CodeEditor |
getCodeEditorFromContext(Context context) Returns the CodeEditor for the given Context . |
static java.lang.String |
getFilenameFromNode(Node node) Returns the filename for the given node. |
static int |
getLineFromCodeEditor(Context context) Returns the line number for the given code editor Context . |
static Node |
getNodeFromCodeEditor(Context context) Returns the Node for the given code editor Context . |
static Node[] |
getOpenedFiles() Returns the files that are currently open in an editor. |
static Node[] |
getOpenedFiles(Workspace workspace, Project project) Returns the files that are currently open in an editor. |
static java.lang.String |
getPackageFromNode(Node node, Project project) Returns the package for the given node. |
static Node[] |
getProjectFileList(Project project) Returns the files in the given project. |
static boolean |
packageMatches(java.lang.String pkg, Node node, Project project) Returns true if the given package matches the package for the given node. |
static boolean |
packageMatches(java.lang.String pkg, java.lang.String nodePkg) Returns true if the given package matches the given node package. |
static void |
removeSourceFinder(SourceFinder finder) Unregisters a SourceFinder |
static void |
removeSourceFinderManager(SourceFinderManager manager) Unregisters a SourceFinderManager |
static CodeEditor |
showNodeInCodeEditor(Workspace workspace, Project project, Node node) Displays a node in the code editor. |
static Editor |
showNodeInDefaultEditor(Workspace workspace, Project project, Node node) Displays a node in its default editor. |
static boolean |
showSourceFile(Workspace workspace, Project project, Node node, int line, boolean selectLine) Displays a source file in the code editor. |
static boolean |
showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine) Displays a source file in the code editor. |
static boolean |
showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine, java.lang.String sourceNotFoundMessage) Displays a source file in the code editor. |
static boolean |
showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine, java.lang.String sourceNotFoundMessage, oracle.jdevimpl.debugger.support.DebugVirtualMachine vm) Displays a source file in the code editor. |
static boolean |
showSourceFile(Workspace workspace, Project project, java.net.URL url, int line, boolean selectLine) Displays a source file in the code editor. |
static boolean |
showUIDesigner(Workspace workspace, Project project, Node node) Displays a source file in the UI designer. |
static boolean |
showUIDesigner(Workspace workspace, Project project, java.net.URL url) Displays a source file in the UI designer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine)
The source file is found by matching the package, filename. If the source file can not be found, a source stub may be created from the class file.
workspace
- the workspaceproject
- the projectpkg
- the packagefullClassName
- the full class namefilename
- the filename, without any directory informationline
- the line number to make visibleselectLine
- whether to select the text on the linepublic static boolean showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine, java.lang.String sourceNotFoundMessage)
The source file is found by matching the package, filename. If the source file can not be found, a source stub may be created from the class file.
workspace
- the workspaceproject
- the projectpkg
- the packagefullClassName
- the full class namefilename
- the filename, without any directory informationline
- the line number to make visibleselectLine
- whether to select the text on the linesourceNotFoundMessage
- message to show in SourceNotFoundDialogpublic static boolean showSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String fullClassName, java.lang.String filename, int line, boolean selectLine, java.lang.String sourceNotFoundMessage, oracle.jdevimpl.debugger.support.DebugVirtualMachine vm)
The source file is found by matching the package, filename. If the source file can not be found, a source stub may be created from the class file.
workspace
- the workspaceproject
- the projectpkg
- the packagefullClassName
- the full class namefilename
- the filename, without any directory informationline
- the line number to make visibleselectLine
- whether to select the text on the linesourceNotFoundMessage
- message to show in SourceNotFoundDialogvm
- the virtualmachine to look for cached urls.public static boolean showSourceFile(Workspace workspace, Project project, java.net.URL url, int line, boolean selectLine)
workspace
- the workspaceproject
- the projecturl
- the URL for the source file.line
- the line number to make visibleselectLine
- whether to select the text on the linepublic static boolean showSourceFile(Workspace workspace, Project project, Node node, int line, boolean selectLine)
workspace
- the workspaceproject
- the projectnode
- the Node for the source file.line
- the line number to make visibleselectLine
- whether to select the text on the linepublic static CodeEditor showNodeInCodeEditor(Workspace workspace, Project project, Node node)
workspace
- the workspaceproject
- the projectnode
- the Node for the source file.public static Editor showNodeInDefaultEditor(Workspace workspace, Project project, Node node)
workspace
- the workspaceproject
- the projectnode
- the Node for the source file.public static void addSourceFinder(SourceFinder finder)
SourceFinder
public static void removeSourceFinder(SourceFinder finder)
SourceFinder
public static void addSourceFinderManager(SourceFinderManager manager)
SourceFinderManager
public static void removeSourceFinderManager(SourceFinderManager manager)
SourceFinderManager
public static boolean showUIDesigner(Workspace workspace, Project project, java.net.URL url)
workspace
- the workspaceproject
- the projecturl
- the URL for the source file.public static boolean showUIDesigner(Workspace workspace, Project project, Node node)
workspace
- the workspaceproject
- the projectnode
- the Node for the source file.public static java.net.URL findSourceFile(Workspace workspace, Project project, java.lang.String pkg, java.lang.String filename)
workspace
- the workspaceproject
- the projectpkg
- the packagefilename
- the filenamepublic static java.net.URL askSourceFinders(Workspace workspace, Project project, java.lang.String pkg, java.lang.String filename)
public static java.net.URL findURLForClass(Workspace workspace, Project project, java.lang.String fullClassName)
public static java.net.URL findURLForClassSource(Workspace workspace, Project project, java.lang.String fullClassName)
public static java.net.URL findURLForClassSource(Project project, java.lang.String fullClassName)
public static java.net.URL findURLForClassStub(Workspace workspace, Project project, java.lang.String fullClassName)
public static java.net.URL findURLForClassStub(Project project, java.lang.String fullClassName)
public static java.net.URL findOpenSourceStub(Workspace workspace, Project project, java.lang.String fullClassName)
workspace
- the workspaceproject
- the projectfullClassName
- the full class namepublic static Node[] getProjectFileList(Project project)
public static Node[] getOpenedFiles()
public static Node[] getOpenedFiles(Workspace workspace, Project project)
workspace
- the workspaceproject
- the projectpublic static java.lang.String getFilenameFromNode(Node node)
node
- the nodepublic static java.lang.String getPackageFromNode(Node node, Project project)
Note that the package returned here may begin with a '*', meaning that the exact package is not known.
node
- the nodeproject
- the projectpublic static boolean packageMatches(java.lang.String pkg, Node node, Project project)
Note that this method handles the situation where the exact package for the given node is not known (for JSPs).
pkg
- the packagenode
- the nodeproject
- the projectpublic static boolean packageMatches(java.lang.String pkg, java.lang.String nodePkg)
Note that this method handles the situation where the given node package is not exact (for JSPs).
pkg
- the packagenodePkg
- the node packagepublic static CodeEditor getCodeEditorFromContext(Context context)
CodeEditor
for the given Context
.
If the given context is not a code editor context, this method returns null.
public static Node getNodeFromCodeEditor(Context context)
Node
for the given code editor Context
.
If the given context is not a code editor context, this method returns null.
public static int getLineFromCodeEditor(Context context)
Context
.
If the given context is not a code editor context, this method returns 0.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |