Add queries which show the entered user Snippet of Java code wrapped into a complete valid unit of Java code. Also add a query for dependencies of a Snippet.
In SourceCodeAnalysis, add:
public interface SnippetWrapper {
String source();
String wrapped();
String fullClassName();
Snippet.Kind kind();
int sourceToWrappedPosition(int pos);
int wrappedToSourcePosition(int pos);
}
SnippetWrapper wrapper(Snippet snippet);
List<SnippetWrapper> wrappers(String input);
List<Snippet> dependents(Snippet snippet);
In SourceCodeAnalysis, add:
public interface SnippetWrapper {
String source();
String wrapped();
String fullClassName();
Snippet.Kind kind();
int sourceToWrappedPosition(int pos);
int wrappedToSourcePosition(int pos);
}
SnippetWrapper wrapper(Snippet snippet);
List<SnippetWrapper> wrappers(String input);
List<Snippet> dependents(Snippet snippet);