src: refactor java indexer
* renamed java name classes * rearranged methods in ContextAwareAstVisitor to match the order in AstVisitor
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.sourcetrail.name;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class FileName implements SymbolName
|
||||
{
|
||||
private File m_filePath = null;
|
||||
|
||||
public FileName(File filePath)
|
||||
{
|
||||
m_filePath = filePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameHierarchy toNameHierarchy()
|
||||
{
|
||||
NameHierarchy nameHierarchy;
|
||||
if (m_filePath != null)
|
||||
{
|
||||
nameHierarchy = new NameHierarchy(m_filePath.toString().replaceAll("\\\\", "/"));
|
||||
}
|
||||
else
|
||||
{
|
||||
nameHierarchy = new NameHierarchy("unsolved-file");
|
||||
}
|
||||
nameHierarchy.setSeparator('/');
|
||||
return nameHierarchy;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user