本文整理汇总了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);
}
}
示例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;
}
示例3: getLanguage
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Override
public LanguageInfo getLanguage() {
LanguageInfo result = trace.findLanguage(getAbsoluteResourceURI());
return result;
}
示例4: getLocalLanguage
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Override
public LanguageInfo getLocalLanguage() {
return findLanguage(getLocalURI());
}
示例5: findLanguage
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
protected LanguageInfo findLanguage(AbstractURIWrapper uri) {
return getService(uri, LanguageInfo.class);
}
示例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);
}
示例7: XtextEditorInfo
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
@Inject
public XtextEditorInfo(LanguageInfo languageInfo) {
this.languageInfo = languageInfo;
}
示例8: getLanguageInfo
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
public LanguageInfo getLanguageInfo() {
return languageInfo;
}
示例9: getLanguage
import org.eclipse.xtext.LanguageInfo; //导入依赖的package包/类
/**
* @return the language that this resource belongs to. May be <code>null</code>.
*/
LanguageInfo getLanguage();
示例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();