请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Language类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中fr.inria.diverse.melange.metamodel.melange.Language的典型用法代码示例。如果您正苦于以下问题:Java Language类的具体用法?Java Language怎么用?Java Language使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Language类属于fr.inria.diverse.melange.metamodel.melange包,在下文中一共展示了Language类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateDSAWizardContextActionDSAK3 action = new CreateDSAWizardContextActionDSAK3(
			updatedGemocLanguageProject);
	action.createNewDSAProject(MelangeXDSMLProjectHelper.getFirstEcore(language));
	
	if(action.getLastCreatedProject() != null){
		waitForAutoBuild();
		
		Set<String> aspects = SequentialSingleLanguageTemplate.getAspectClassesList(action.getLastCreatedProject());
		
		updateMelange(event,language,aspects);
	}
	
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:19,代码来源:CreateDSAProjectHandler.java


示例2: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateDomainModelWizardContextAction action = new CreateDomainModelWizardContextAction(
			updatedGemocLanguageProject); 
	action.actionToExecute = CreateDomainModelAction.CREATE_NEW_EMF_PROJECT;
	action.execute();
	
	if(action.getCreatedEcoreUri() != null){
		waitForAutoBuild();
		updateMelange(event,language,action.getCreatedEcoreUri());
	}
	
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:17,代码来源:CreateDomainModelProjectHandler.java


示例3: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateEditorProjectWizardContextAction action = new CreateEditorProjectWizardContextAction(
			updatedGemocLanguageProject);
	action.actionToExecute = CreateEditorProjectAction.CREATE_NEW_XTEXT_PROJECT;
	action.execute();
	
	if(action.getSiriusPath() != null){
		waitForAutoBuild();
		updateMelange(event,language,action.getXtextPath());
	}
	
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:17,代码来源:CreateXtextEditorProjectHandler.java


示例4: eSet

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case MelangePackage.MAPPING__RULES:
			getRules().clear();
			getRules().addAll((Collection<? extends ClassBinding>)newValue);
			return;
		case MelangePackage.MAPPING__FROM:
			setFrom((Language)newValue);
			return;
		case MelangePackage.MAPPING__TO:
			setTo((ModelType)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:23,代码来源:MappingImpl.java


示例5: eUnset

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
	switch (featureID) {
		case MelangePackage.MAPPING__RULES:
			getRules().clear();
			return;
		case MelangePackage.MAPPING__FROM:
			setFrom((Language)null);
			return;
		case MelangePackage.MAPPING__TO:
			setTo((ModelType)null);
			return;
	}
	super.eUnset(featureID);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:21,代码来源:MappingImpl.java


示例6: eSet

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case MelangePackage.MODEL_TYPE__NAME:
			setName((String)newValue);
			return;
		case MelangePackage.MODEL_TYPE__SUBTYPING_RELATIONS:
			getSubtypingRelations().clear();
			getSubtypingRelations().addAll((Collection<? extends Subtyping>)newValue);
			return;
		case MelangePackage.MODEL_TYPE__EXTRACTED:
			setExtracted((Language)newValue);
			return;
		case MelangePackage.MODEL_TYPE__MT_URI:
			setMtUri((String)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:26,代码来源:ModelTypeImpl.java


示例7: eUnset

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
	switch (featureID) {
		case MelangePackage.MODEL_TYPE__NAME:
			setName(NAME_EDEFAULT);
			return;
		case MelangePackage.MODEL_TYPE__SUBTYPING_RELATIONS:
			getSubtypingRelations().clear();
			return;
		case MelangePackage.MODEL_TYPE__EXTRACTED:
			setExtracted((Language)null);
			return;
		case MelangePackage.MODEL_TYPE__MT_URI:
			setMtUri(MT_URI_EDEFAULT);
			return;
	}
	super.eUnset(featureID);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:24,代码来源:ModelTypeImpl.java


示例8: setOwningLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setOwningLanguage(Language newOwningLanguage) {
	if (newOwningLanguage != eInternalContainer() || (eContainerFeatureID() != MelangePackage.METAMODEL__OWNING_LANGUAGE && newOwningLanguage != null)) {
		if (EcoreUtil.isAncestor(this, newOwningLanguage))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newOwningLanguage != null)
			msgs = ((InternalEObject)newOwningLanguage).eInverseAdd(this, MelangePackage.LANGUAGE__SYNTAX, Language.class, msgs);
		msgs = basicSetOwningLanguage(newOwningLanguage, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, MelangePackage.METAMODEL__OWNING_LANGUAGE, newOwningLanguage, newOwningLanguage));
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:21,代码来源:MetamodelImpl.java


示例9: setOwningLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setOwningLanguage(Language newOwningLanguage) {
	if (newOwningLanguage != eInternalContainer() || (eContainerFeatureID() != MelangePackage.OPERATOR__OWNING_LANGUAGE && newOwningLanguage != null)) {
		if (EcoreUtil.isAncestor(this, newOwningLanguage))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newOwningLanguage != null)
			msgs = ((InternalEObject)newOwningLanguage).eInverseAdd(this, MelangePackage.LANGUAGE__OPERATORS, Language.class, msgs);
		msgs = basicSetOwningLanguage(newOwningLanguage, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, MelangePackage.OPERATOR__OWNING_LANGUAGE, newOwningLanguage, newOwningLanguage));
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:21,代码来源:OperatorImpl.java


示例10: setOwningLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setOwningLanguage(Language newOwningLanguage) {
	if (newOwningLanguage != eInternalContainer() || (eContainerFeatureID() != MelangePackage.ASPECT__OWNING_LANGUAGE && newOwningLanguage != null)) {
		if (EcoreUtil.isAncestor(this, newOwningLanguage))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newOwningLanguage != null)
			msgs = ((InternalEObject)newOwningLanguage).eInverseAdd(this, MelangePackage.LANGUAGE__SEMANTICS, Language.class, msgs);
		msgs = basicSetOwningLanguage(newOwningLanguage, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, MelangePackage.ASPECT__OWNING_LANGUAGE, newOwningLanguage, newOwningLanguage));
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:21,代码来源:AspectImpl.java


示例11: eSet

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case MelangePackage.ASPECT__ASPECT_TYPE_REF:
			setAspectTypeRef((JvmTypeReference)newValue);
			return;
		case MelangePackage.ASPECT__ASPECTED_CLASS:
			setAspectedClass((EClass)newValue);
			return;
		case MelangePackage.ASPECT__ECORE_FRAGMENT:
			setEcoreFragment((EPackage)newValue);
			return;
		case MelangePackage.ASPECT__OWNING_LANGUAGE:
			setOwningLanguage((Language)newValue);
			return;
		case MelangePackage.ASPECT__SOURCE:
			setSource((Weave)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:27,代码来源:AspectImpl.java


示例12: eUnset

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
	switch (featureID) {
		case MelangePackage.ASPECT__ASPECT_TYPE_REF:
			setAspectTypeRef((JvmTypeReference)null);
			return;
		case MelangePackage.ASPECT__ASPECTED_CLASS:
			setAspectedClass((EClass)null);
			return;
		case MelangePackage.ASPECT__ECORE_FRAGMENT:
			setEcoreFragment((EPackage)null);
			return;
		case MelangePackage.ASPECT__OWNING_LANGUAGE:
			setOwningLanguage((Language)null);
			return;
		case MelangePackage.ASPECT__SOURCE:
			setSource((Weave)null);
			return;
	}
	super.eUnset(featureID);
}
 
开发者ID:diverse-project,项目名称:melange,代码行数:27,代码来源:AspectImpl.java


示例13: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateDSAWizardContextActionDSAK3 action = new CreateDSAWizardContextActionDSAK3(
			updatedGemocLanguageProject);
	action.createNewDSAProject(MelangeXDSMLProjectHelper.getFirstEcore(language));
	
	if(action.getLastCreatedProject() != null){
		waitForAutoBuild();
		
		Set<String> aspects = SequentialTemplate.getAspectClassesList(action.getLastCreatedProject());
		
		updateMelange(event,language,aspects);
	}
	
	return null;
}
 
开发者ID:SiriusLab,项目名称:ModelDebugging,代码行数:19,代码来源:CreateDSAProjectHandler.java


示例14: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateAnimatorProjectWizardContextAction action = new CreateAnimatorProjectWizardContextAction(
			updatedGemocLanguageProject, language);
	action.actionToExecute = CreateAnimatorProjectAction.CREATE_NEW_SIRIUS_PROJECT;
	action.execute();
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:11,代码来源:CreateAnimatorProjectHandler.java


示例15: executeForSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
@Override
public Object executeForSelectedLanguage(ExecutionEvent event,
		IProject updatedGemocLanguageProject, Language language)
		throws ExecutionException {
	CreateEditorProjectWizardContextAction action = new CreateEditorProjectWizardContextAction(updatedGemocLanguageProject);
	action.actionToExecute = CreateEditorProjectAction.CREATE_NEW_SIRIUS_PROJECT;
	action.execute();
	
	if(action.getSiriusPath() != null){
		waitForAutoBuild();
		updateMelange(event,language,action.getSiriusPath());
	}
	
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:CreateSiriusEditorProjectHandler.java


示例16: updateProjectPluginConfiguration

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的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


示例17: configureProposal

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的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


示例18: configureProposal

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的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


示例19: getSelectedLanguage

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
protected Language getSelectedLanguage(XtextResource resource, int offset){
	final EObjectAtOffsetHelper eObjectAtOffsetHelper =
		resource.getResourceServiceProvider().get(EObjectAtOffsetHelper.class);
	EObject selectedElement = eObjectAtOffsetHelper.resolveContainedElementAt(resource, offset);
	if (selectedElement != null) {
		EObject currentElem = selectedElement;
		while(currentElem != null){
			if(currentElem instanceof Language){
				return (Language)currentElem;
			}
			currentElem = currentElem.eContainer();
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:AbstractGemocLanguageProjectHandler.java


示例20: getFirstEcore

import fr.inria.diverse.melange.metamodel.melange.Language; //导入依赖的package包/类
public static  IFile getFirstEcore(Language lang){
	final String ecoreURI = getFirstEcorePath(lang);
	if(ecoreURI != null){
		final URI uri = org.eclipse.emf.common.util.URI.createURI(ecoreURI);
		final String filePath = uri.toPlatformString(true);
		final IPath path = new Path(filePath);
		return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
	}
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:11,代码来源:MelangeXDSMLProjectHelper.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Log类代码示例发布时间:2022-05-16
下一篇:
Java Firebloom类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap