當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。