本文整理汇总了Java中fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace类的典型用法代码示例。如果您正苦于以下问题:Java ModelTypingSpace类的具体用法?Java ModelTypingSpace怎么用?Java ModelTypingSpace使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ModelTypingSpace类属于fr.inria.diverse.melange.metamodel.melange包,在下文中一共展示了ModelTypingSpace类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateProjectPluginConfiguration
import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; //导入依赖的package包/类
/**
* Update plugin.xml according to the model
*
* @param resource
*/
private void updateProjectPluginConfiguration(IResource resource) {
if (resource instanceof IFile
&& resource.getFileExtension().equals("melange")) {
IFile file = (IFile) resource;
IProject project = file.getProject();
// try {
if (file.exists()) {
//Load .melange file
URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
ResourceSet rs = new ResourceSetImpl();
Resource res = rs.getResource(uri, true);
ModelTypingSpace root = (ModelTypingSpace)res.getContents().get(0);
String packageName = root.getName();
//Browse declared Languages
for (fr.inria.diverse.melange.metamodel.melange.Element element : root.getElements()) {
if(element instanceof Language){
Language language = (Language) element;
// update entry in plugin.xml
setPluginLanguageNameAndFilePath(project, file, packageName+"."+language.getName());
}
}
//Use default model loader
updateModelLoaderClass(project, null);
ManifestChanger manifestChanger = new ManifestChanger(project);
try {
manifestChanger.addPluginDependency(org.eclipse.gemoc.executionframework.extensions.sirius.Activator.PLUGIN_ID);
manifestChanger.commit();
} catch (BundleException | IOException | CoreException e) {
e.printStackTrace();
}
}
}
}
示例2: configureProposal
import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; //导入依赖的package包/类
@Override
public void configureProposal(EObject context) {
if(context instanceof Language){
Language lang = (Language) context;
this.packageName = ((ModelTypingSpace)lang.eContainer()).getName().toLowerCase();
this.languageName = lang.getName().toLowerCase();
this.ecoreFile = MelangeXDSMLProjectHelper.getFirstEcore(lang);
}
}
示例3: configureProposal
import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; //导入依赖的package包/类
@Override
public void configureProposal(EObject context) {
if(context instanceof Language){
Language lang = (Language) context;
this.packageName = ((ModelTypingSpace)lang.eContainer()).getName();
this.languageName = lang.getName();
}
}
示例4: sequence_ModelTypingSpace
import fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace; //导入依赖的package包/类
/**
* Contexts:
* ModelTypingSpace returns ModelTypingSpace
*
* Constraint:
* (name=QualifiedName imports=XImportSection? elements+=Element*)
*/
protected void sequence_ModelTypingSpace(ISerializationContext context, ModelTypingSpace semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}