当前位置: 首页>>代码示例>>Java>>正文


Java ModelTypingSpace类代码示例

本文整理汇总了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();
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:42,代码来源:GemocSequentialLanguageBuilder.java

示例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);
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:10,代码来源:CreateDSAProposal.java

示例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();
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:9,代码来源:CreateEcoreProposal.java

示例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);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:11,代码来源:MelangeSemanticSequencer.java


注:本文中的fr.inria.diverse.melange.metamodel.melange.ModelTypingSpace类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。