コード例 #1
0
  /** ************* Utility Methods ******************* */
  private Tuple<SVDBFile, TextTagPosUtils> contentAssistSetup(String doc) {
    TextTagPosUtils tt_utils = new TextTagPosUtils(new StringInputStream(doc));
    ISVDBFileFactory factory = SVCorePlugin.createFileFactory();

    List<SVDBMarker> markers = new ArrayList<SVDBMarker>();
    SVDBFile file = factory.parse(tt_utils.openStream(), "doc", markers);
    fIndex.setFile(file);

    return new Tuple<SVDBFile, TextTagPosUtils>(file, tt_utils);
  }
コード例 #2
0
  @Override
  public void setUp() throws Exception {
    super.setUp();

    fIndexMgr = new SVDBIndexCollection("TestContentAssistBuiltins");
    fIndexMgr.addPluginLibrary(
        fIndexRgy.findCreateIndex(
            new NullProgressMonitor(),
            "TestContentAssistBuiltins",
            SVCorePlugin.SV_BUILTIN_LIBRARY,
            SVDBPluginLibIndexFactory.TYPE,
            null));

    fIndex = new ContentAssistIndex();
    fIndex.init(new NullProgressMonitor());
    fIndexMgr.addLibraryPath(fIndex);
  }