本文整理匯總了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();