org.eclipse.xtext.util.Wrapper.wrap()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(191)

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

Wrapper.wrap介绍

暂无

代码示例

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

@Override
public boolean isRecursive() {
 if ((this.recursive == null)) {
  this.recursive = Wrapper.<Boolean>wrap(Boolean.valueOf(this.internalIsRecursive()));
 }
 return (this.recursive.get()).booleanValue();
}

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

public void addImportedPackages(Set<String> packages) {
  String s = (String) getMainAttributes().get(IMPORT_PACKAGE);
  Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
  String result = mergeIntoCommaSeparatedList(s, packages, modified);
  this.modified = modified.get();
  getMainAttributes().put(IMPORT_PACKAGE, result);
}

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

/**
 * adds the qualified names to the require-bundle attribute, if not already
 * present.
 *
 * @param bundles - passing parameterized bundled (e.g. versions, etc.) is not supported
 */
public void addRequiredBundles(Set<String> bundles) {
  // TODO manage transitive dependencies
  // don't require self
  Set<String> bundlesToMerge;
  String bundleName = (String) getMainAttributes().get(BUNDLE_NAME);
  if (bundleName != null && bundles.contains(bundleName) || projectName != null && bundles.contains(projectName)) {
    bundlesToMerge = new LinkedHashSet<String>(bundles);
    bundlesToMerge.remove(bundleName);
    bundlesToMerge.remove(projectName);
  } else {
    bundlesToMerge = bundles;
  }
  String s = (String) getMainAttributes().get(REQUIRE_BUNDLE);
  Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
  String result = mergeIntoCommaSeparatedList(s, bundlesToMerge, modified);
  this.modified = modified.get();
  getMainAttributes().put(REQUIRE_BUNDLE, result);
}

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

/**
 * adds the qualified names to the export-package attribute, if not already
 * present.
 *
 * @param packages - passing parameterized packages is not supported
 */
public void addExportedPackages(Set<String> packages) {
  String s = (String) getMainAttributes().get(EXPORT_PACKAGE);
  Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
  String result = mergeIntoCommaSeparatedList(s, packages, modified);
  this.modified = modified.get();
  getMainAttributes().put(EXPORT_PACKAGE, result);
}

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

Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
String result = mergeIntoCommaSeparatedList(s, bundlesToMerge, modified, lineDelimiter);
this.modified = modified.get();

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

public void addImportedPackages(Set<String> packages) {
  String s = (String) getMainAttributes().get(IMPORT_PACKAGE);
  Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
  String result = mergeIntoCommaSeparatedList(s, packages, modified, lineDelimiter);
  this.modified = modified.get();
  getMainAttributes().put(IMPORT_PACKAGE, result);
}

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

/**
 * adds the qualified names to the export-package attribute, if not already
 * present.
 *
 * @param packages - passing parameterized packages is not supported
 */
public void addExportedPackages(Set<String> packages) {
  String s = (String) getMainAttributes().get(EXPORT_PACKAGE);
  Wrapper<Boolean> modified = Wrapper.wrap(this.modified);
  String result = mergeIntoCommaSeparatedList(s, packages, modified, lineDelimiter);
  this.modified = modified.get();
  getMainAttributes().put(EXPORT_PACKAGE, result);
}

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

final Wrapper<Boolean> clear = Wrapper.wrap(Boolean.FALSE);
try {
  delta.accept(new IResourceDeltaVisitor() {

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

protected void writeGrammar() {
 final Wrapper<Boolean> isSaving = Wrapper.<Boolean>wrap(Boolean.valueOf(false));
 final ResourceSet cloneInto = new ResourceSetImpl();
 Map<String, Object> _extensionToFactoryMap = cloneInto.getResourceFactoryRegistry().getExtensionToFactoryMap();

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

IScope parent, 
  final boolean validStaticScope) {
final Wrapper<IScope> wrapper = Wrapper.wrap(parent);
synonymProvider.collectSynonymTypes(featureDeclarator, new SynonymTypesProvider.Acceptor() {

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

@Override
protected Map<JvmTypeParameter, LightweightMergedBoundTypeArgument> getDeclaratorParameterMapping() {
  final Wrapper<Map<JvmTypeParameter, LightweightMergedBoundTypeArgument>> receiverTypeParameterMapping = Wrapper.wrap(Collections.<JvmTypeParameter, LightweightMergedBoundTypeArgument>emptyMap());
  XExpression receiver = getReceiver();
  if (receiver != null) {

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

final TypeConformanceComputationArgument rawConformanceCheck = new TypeConformanceComputationArgument(true, false, false, false, false, false);
if (!declaringTypeReference.isAssignableFrom(receiverType, rawConformanceCheck)) {
  final Wrapper<LightweightTypeReference> expectedReceiverTypeWrapper = Wrapper.wrap(null); 
  CommonTypeComputationServices services = receiverType.getOwner().getServices();
  SynonymTypesProvider synonymProvider = services.getSynonymTypesProvider();

相关文章