+
http://wiki.eclipse.org/Xcore
http://download.eclipse.org/releases/juno
http://www.eclipse.org/modeling/emft/?project=eef
http://download.eclipse.org/releases/juno
http://www.eclipse.org/cdo/
http://download.eclipse.org/releases/juno
//changing stuff
CDOTransaction tx = session.openTransaction();
CDOResource res = tx.getResource("allChocos.choco", true);
Board board = (Board) res.getContents().get(0);
BuildFail newFailure = ChocoFactory.eINSTANCE.createBuildFail();
newFailure.setDate(new Date());
newFailure
.setFailedLogURI("http://build.eclipse.org/hudson/somejob/23/build.log");
board.getReasons().add(newFailure);
tx.commit();
// using history
CDOView view = session.openView(aLongRepresentingSomeDate);
Board board = (Board) view.getResource("allChocos.choco").getContents()
.get(0);
// I'll get the result from the past
board.getChocos();
board.getReasons();
session.getCommitInfoManager().getCommitInfo(aLongRepresentingSomeDate)
.getComment();
http://www.eclipse.org/emf/compare/
http://download.eclipse.org/modeling/emf/compare/updates/interim/2.1
public Resource put(URI resourcePath, Resource putFromRemoteClient,long ancestorTimestamp) {
Resource ancestorFromDB = data.getResourcePerRevision(resourcePath,
ancestorTimestamp);
IComparisonScope scope = EMFCompare.createDefaultScope(putFromRemoteClient,
latestFromDB.getResource(), ancestorFromDB);
Comparison comp = EMFCompare.builder().build().compare(scope);
for (Conflict conflict : comp.getConflicts()) {
// How do you want to handle a conflict ?
}
for (Diff diff : comp.getDifferences()) {
diff.copyLeftToRight();
}
return latestFromDB.getResource();
}
http://code.google.com/a/eclipselabs.org/p/emfpath/
http://svn.codespot.com/a/eclipselabs.org/emfpath/trunk/repository/
public class UserQuery {
private User user;
public UserQuery(User user) {
this.user = user;
}
public Iterable allPendingChocos() {
Predicate isPending = Having.feature(ChocoPackage.Literals.CHOCO__STATE,Equals.to(ChocoState.PENDING));
return adapt(user).descendant().filter(Choco.class)
.filter(isPending);
}
}
https://github.com/ghillairet/emfjson
http://ghillairet.github.com/p2/emfjson/releases/0.5.0p>
public void get(URI resourcePath, OutputStream writer) throws IOException {
Resource resource = this.dataAccess.get(resourcePath);
JsResourceImpl jsRes = new JsResourceImpl(resourcePath); // put content from original resource to the json one.
jsRes.getContents().addAll(resource.getContents());
Map options = new HashMap();
options.put(EMFJs.OPTION_INDENT_OUTPUT, true);
options.put(EMFJs.OPTION_SERIALIZE_TYPE, false);
jsRes.save(writer, options);
}
public void put(URI resourcePath, InputStream in) throws IOException {
Map options = new HashMap();
options.put(EMFJs.OPTION_ROOT_ELEMENT,ChocoPackage.eINSTANCE.getBoard());
JsResourceImpl jsRes = new JsResourceImpl(resourcePath);
jsRes.load(options);
this.dataAccess.put(resourcePath, jsRes, 0);
/*
* You could retrieve the instance with :
*/
Board root = (Board) jsRes.getContents().get(0);
}
http://www.topcased.org/index.php?id_projet_pere=102
http://topcased-gendoc.gforge.enseeiht.fr/releases/1.6.0/
https://github.com/BryanHunt/mongo-emf
http://bryanhunt.github.com/mongo-emf/
User user = ChocoFactory.eINSTANCE.createUser();
user.setName("Etienne Juliot");
user.setEmail("etienne.juliot@obeo.fr");
Resource resource = resourceSet.createResource(URI.createURI("mongodb://localhost/db/users/"));
resource.getContents().add(user);
try
{
user.eResource().save(null);
}
catch(IOException e)
{
e.printStackTrace();
}
Resource resource = resourceSet.getResource(URI.createURI("mongodb://localhost/app/users/4d6dc268b03b0db29961472c"), true);
User etienne = (User) resource.getContents().get(0);
https://github.com/ghillairet/blueprints-emf
mvn clean package
EPackage.Registry.INSTANCE.put(ChocoPackage.eNS_URI, ChocoPackage.eINSTANCE);
ResourceSet resourceSet = new ResourceSetImpl();
Resource.Factory.Registry.INSTANCE.getProtocolToFactoryMap().put("graph",
new XMIResourceFactoryImpl());
Neo4jGraph graph = new Neo4jGraph("data/neo4j/chocos");
GraphURIHandler.Registry.INSTANCE.put("graph://data/neo4j/chocos/", graph);
EList uriHandlers = resourceSet.getURIConverter().getURIHandlers();
uriHandlers.add(0, new GraphURIHandlerImpl());
Board board = ChocoFactory.eInstance.createBoard();
User user = ChocoFactory.eINSTANCE.createUser();
user.setName("Etienne Juliot");
board.getUsers().add(user);
Resource resource = resourceSet.createResource(URI.createURI("graph://data/neo4j/chocos/"));
resource.getContents().add(board);
resource.save(null);
https://github.com/Obeo/emf.specimen
mvn clean install
// ChocoClass
public class ChocoSpecimenConfiguration implements ISpecimenConfiguration {
public IntegerDistribution getDepthDistributionFor(EClass eClass) {
if (eClass == ChocoPackage.eINSTANCE.getChoco()) {
return new BinomialDistribution(10, 0.5);
} else if (eClass == ChocoPackage.eINSTANCE.getBuildFail()) {
return new BinomialDistribution(100, 0.8);
} else if (eClass == ChocoPackage.eINSTANCE.getUp()) {
return new BinomialDistribution(5, 0.8);
} else if (eClass == ChocoPackage.eINSTANCE.getDown()) {
return new BinomialDistribution(2, 0.8);
} else if (eClass == ChocoPackage.eINSTANCE.getChoco()) {
return new BinomialDistribution(30, 0.3);
}
return new BinomialDistribution(100, 0.5);
}
// [...]
SpecimenGenerator generator = new SpecimenGenerator(
new ChocoSpecimenConfiguration());
List result = generator.generate(new ResourceSetImpl());
http://www.eclipse.org/emfclient/
http://download.eclipse.org/emf-store/releases/latest
http://wiki.eclipse.org/Texo
http://download.eclipse.org/modeling/emft/texo/updates/interim
/**
* A representation of the model object 'Choco'.
* @generated
*/
@Entity(name = "choco_Choco")
public class Choco {
@Basic()
private String name = null;
@Basic()
@Temporal(TemporalType.DATE)
private Date expiration = null;
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST,
CascadeType.REFRESH }, optional = false)
@JoinColumns({ @JoinColumn() })
private User culprit = null;
http://www.eclipse.org/acceleo/
http://download.eclipse.org/releases/juno
https://github.com/Obeo/fr.obeo.sonar.plugin.regexfilefilter
mvn clean package
http://www.eclipse.org/intent/
http://download.eclipse.org/releases/juno
private static void loadWikiPageAsModel() throws IOException {
Document userGuide = getDocumentFromWiki(URI
.createURI("http://wiki.eclipse.org/EMF_Compare/User_Guide"));
Document developperGuide = getDocumentFromWiki(URI
.createURI("http://wiki.eclipse.org/EMF_Compare/Developer_Guide"));
Document faq = getDocumentFromWiki(URI
.createURI("http://wiki.eclipse.org/EMF_Compare/FAQ"));
Section userGuideSec = transformToSection(userGuide, "User Guide");
Section developperGuideSec = transformToSection(developperGuide,
"Developper Guide");
Section faqSec = transformToSection(faq, "Frequently Asked Questions");
Document aggregated = newDocument("EMF Compare");
aggregated.getContent().add(userGuideSec);
aggregated.getContent().add(developperGuideSec);
aggregated.getContent().add(faqSec);
Html generator = new Html(aggregated, new File("/tmp/wikiout"),
Collections.EMPTY_LIST);
generator.doGenerate(new BasicMonitor());
}