Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] [snipmatch] headless API for generating code snippets?

Stefan,
Fabian,

I just found a few issues in the current "adaptive templates" completion engine and I was wondering whether it makes sense to fix them there or to work towards a headless snippet api based on your grammar and the generated EMF model.

Therefore I need your assessment (since you know better than I do what really is required here):
Is it possible to create a pure headless API to build code snippets with minimal dependencies to existing libraries? I saw that your plugin depends to quite a few plugins [1] - not sure how many other transitive dependencies they would pull in at runtime.

I'd like to know how many of them we could get rid of to create a very lightweight runtime. I'm thinking of the following plugin structure:
  • o.e.r.templates - the core runtime that can be reused by our chain and template completion engines as well as serveral API doc providers and documentation generators
  • o.e.r.templates.io - the classes responsible for doing the IO, i.e., loading and saving snippets. Not sure whether this actually makes sense?
  • o.e.r.templates.rcp - the RCP integration of your basic snippet editor. This component may be reused by any other project that want's to make use of your framework. Dependencies here should also be as minimal as possible
  • o.e.r.snipmatch.rcp - the specific parts we need to use your editor in the context of Snipmatch, i.e., the multipage editor we talked about briefly before that collects some metadata for snippets etc.

Can your cut your code in that way? How would the dependencies for the minimal runtime look like?


Thanks,
Marcel



[1]
Require-Bundle: org.eclipse.xtext;visibility:=reexport,
 org.eclipse.xtext.xbase;visibility:=reexport,
 org.eclipse.xtext.generator,
 org.apache.commons.logging;bundle-version="1.0.4",
 org.eclipse.emf.codegen.ecore,
 org.eclipse.emf.mwe.utils,
 org.eclipse.emf.mwe2.launch,
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.xtext.common.types,
 org.eclipse.xtext.xbase.lib
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib




Back to the top