gpt4 book ai didi

org.eclipse.xtext.xtype.XImportDeclaration.setImportedType()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 09:52:40 26 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.xtext.xtype.XImportDeclaration.setImportedType()方法的一些代码示例,展示了XImportDeclaration.setImportedType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XImportDeclaration.setImportedType()方法的具体详情如下:
包路径:org.eclipse.xtext.xtype.XImportDeclaration
类名称:XImportDeclaration
方法名:setImportedType

XImportDeclaration.setImportedType介绍

[英]Sets the value of the ' org.eclipse.xtext.xtype.XImportDeclaration#getImportedType' reference.
[中]设置“组织”的值。日食xtext。xtype。XImportDeclaration#getImportedType'引用。

代码示例

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

public boolean addImport(JvmDeclaredType type) {
  if (plainImports.containsKey(type.getSimpleName()) || !needsImport(type))
    return false;
  Maps2.putIntoListMap(type.getSimpleName(), type, plainImports);
  XImportDeclaration importDeclaration = XtypeFactory.eINSTANCE.createXImportDeclaration();
  importDeclaration.setImportedType(type);
  addedImportDeclarations.add(importDeclaration);
  return true;
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

public boolean addStaticImport(JvmDeclaredType type, String memberName) {
  if (hasStaticImport(staticImports, type, memberName)) {
    return false;
  }
  Maps2.putIntoSetMap(type, memberName, staticImports);
  XImportDeclaration importDeclaration = XtypeFactory.eINSTANCE.createXImportDeclaration();
  importDeclaration.setImportedType(type);
  importDeclaration.setStatic(true);
  if (memberName == null) {
    importDeclaration.setWildcard(true);
  } else {
    importDeclaration.setMemberName(memberName);
  }
  addedImportDeclarations.add(importDeclaration);
  return true;
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

public boolean addStaticExtensionImport(JvmDeclaredType type, String memberName) {
  if (hasStaticImport(staticExtensionImports, type, memberName)) {
    return false;
  }
  Maps2.putIntoSetMap(type, memberName, staticExtensionImports);
  XImportDeclaration importDeclaration = XtypeFactory.eINSTANCE.createXImportDeclaration();
  importDeclaration.setImportedType(type);
  importDeclaration.setStatic(true);
  importDeclaration.setExtension(true);
  if (memberName == null) {
    importDeclaration.setWildcard(true);
  } else {
    importDeclaration.setMemberName(memberName);
  }
  addedImportDeclarations.add(importDeclaration);
  return true;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang

if (concreteImports.addImportFor(type) && type instanceof JvmDeclaredType) {
  XImportDeclaration declaration = XtypeFactory.eINSTANCE.createXImportDeclaration();
  declaration.setImportedType((JvmDeclaredType) type);
  if (importSection == null) {
    importSection = XtypeFactory.eINSTANCE.createXImportSection();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com