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


Java LanguageInfo类代码示例

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


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

示例1: setup

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Before
public void setup() {
  try {
    final Injector injector = Guice.createInjector(this.getServerModule());
    injector.injectMembers(this);
    final Object resourceServiceProvider = this.resourceServerProviderRegistry.getExtensionToFactoryMap().get(this.fileExtension);
    if ((resourceServiceProvider instanceof IResourceServiceProvider)) {
      this.languageInfo = ((IResourceServiceProvider)resourceServiceProvider).<LanguageInfo>get(LanguageInfo.class);
    }
    this.languageServer.connect(ServiceEndpoints.<LanguageClientExtensions>toServiceObject(this, LanguageClientExtensions.class));
    this.languageServer.supportedMethods();
    File _absoluteFile = new File("").getAbsoluteFile();
    File _file = new File(_absoluteFile, "/test-data/test-project");
    this.root = _file;
    boolean _mkdirs = this.root.mkdirs();
    boolean _not = (!_mkdirs);
    if (_not) {
      Files.cleanFolder(this.root, null, true, false);
    }
    this.root.deleteOnExit();
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:25,代码来源:AbstractLanguageServerTest.java

示例2: getStratumName

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
protected String getStratumName(final SourceRelativeURI path) {
	IResourceServiceProvider provider = serviceProviderRegistry.getResourceServiceProvider(path.getURI());
	if (provider == null) {
		// it might happen that trace data is in the workspace but the corresponding language is not installed.
		// we use the file extension then.
		String result = path.getURI().fileExtension();
		if (result != null) {
			return result;
		}
		return "unknown";
	}
	final LanguageInfo languageInfo = provider.get(LanguageInfo.class);
	String name = languageInfo.getShortName();
	return name;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:16,代码来源:TraceAsSmapInstaller.java

示例3: getLanguage

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Override
public LanguageInfo getLanguage() {
	LanguageInfo result = trace.findLanguage(getAbsoluteResourceURI());
	return result;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:6,代码来源:AbstractLocationInResource.java

示例4: getLocalLanguage

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Override
public LanguageInfo getLocalLanguage() {
	return findLanguage(getLocalURI());
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:AbstractTrace.java

示例5: findLanguage

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
protected LanguageInfo findLanguage(AbstractURIWrapper uri) {
	return getService(uri, LanguageInfo.class);
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:AbstractTrace.java

示例6: initialize

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Inject
public void initialize(LanguageInfo languageInfo, AbstractUIPlugin uiPlugin) {
	String bundleName = uiPlugin.getBundle().getSymbolicName();
	String languageName = languageInfo.getShortName().toLowerCase();
	setMarkerTypes(bundleName + "." + languageName);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:7,代码来源:LanguageAwareMarkerTypeProvider.java

示例7: XtextEditorInfo

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Inject
public XtextEditorInfo(LanguageInfo languageInfo) {
	this.languageInfo = languageInfo;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:5,代码来源:XtextEditorInfo.java

示例8: getLanguageInfo

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
public LanguageInfo getLanguageInfo() {
	return languageInfo;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:4,代码来源:XtextEditorInfo.java

示例9: getLanguage

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
/**
 * @return the language that this resource belongs to. May be <code>null</code>.
 */
LanguageInfo getLanguage();
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:ILocationInResource.java

示例10: getLocalLanguage

import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
/**
 * Returns the language that is associated with the local resource. May be <code>null</code>
 * if the artifact does not have an associated Xtext language, e.g. for html or java files.
 * 
 * @return the language that is associated with the local resource. May be <code>null</code>.
 */
LanguageInfo getLocalLanguage();
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:8,代码来源:ITrace.java


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