ISourceFileLocator
public class MultiSourceFileLocator extends java.lang.Object implements ISourceFileLocator
ISourceFileLocator
instances. For each lookup request the first locator that returns a
Reader
for source content is selected.Constructor | Description |
---|---|
MultiSourceFileLocator(int tabWidth) |
Creates a new empty locator.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(ISourceFileLocator locator) |
Adds the given locator.
|
java.io.Reader |
getSourceFile(java.lang.String packageName,
java.lang.String fileName) |
Tries to locate the given source file and opens a reader with the
appropriate encoding.
|
int |
getTabWidth() |
Returns number of blank characters that represent a tab in source code.
|
public MultiSourceFileLocator(int tabWidth)
tabWidth
- tab width in source files as number of blanks used for all
source filespublic void add(ISourceFileLocator locator)
locator
- Additional locator to querypublic java.io.Reader getSourceFile(java.lang.String packageName, java.lang.String fileName) throws java.io.IOException
ISourceFileLocator
getSourceFile
in interface ISourceFileLocator
packageName
- VM name of the packagefileName
- name of the source filenull
otherwisejava.io.IOException
- in case of problems while opening the filepublic int getTabWidth()
ISourceFileLocator
getTabWidth
in interface ISourceFileLocator
Copyright © 2018. All rights reserved.