本文整理汇总了Java中org.eclipse.xtext.GrammarUtil.getNamespace方法的典型用法代码示例。如果您正苦于以下问题:Java GrammarUtil.getNamespace方法的具体用法?Java GrammarUtil.getNamespace怎么用?Java GrammarUtil.getNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.GrammarUtil
的用法示例。
在下文中一共展示了GrammarUtil.getNamespace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
protected String getBasePackage(final Grammar grammar) {
String _elvis = null;
if (this.basePackage != null) {
_elvis = this.basePackage;
} else {
String _namespace = GrammarUtil.getNamespace(grammar);
_elvis = _namespace;
}
return _elvis;
}
示例2: getInternalParser
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public TypeReference getInternalParser(final Grammar it) {
String _namespace = GrammarUtil.getNamespace(it);
String _plus = (_namespace + ".parser.antlr.internal");
String _simpleName = GrammarUtil.getSimpleName(it);
String _plus_1 = ("Internal" + _simpleName);
String _plus_2 = (_plus_1 + "Parser");
return new TypeReference(_plus, _plus_2);
}
示例3: getAntlrLexer
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public TypeReference getAntlrLexer(final Grammar it) {
String _namespace = GrammarUtil.getNamespace(it);
String _plus = (_namespace + ".parser.antlr.internal");
String _simpleName = GrammarUtil.getSimpleName(it);
String _plus_1 = ("Internal" + _simpleName);
String _plus_2 = (_plus_1 + "Lexer");
return new TypeReference(_plus, _plus_2);
}
示例4: getGuiceBindingsRt
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public Set<Binding> getGuiceBindingsRt(final Grammar grammar) {
final BindFactory bindFactory = new BindFactory();
final String namingPrefix = GrammarUtil.getNamespace(grammar) + ".naming." + GrammarUtil.getName(grammar); //$NON-NLS-1$
final String resourcePrefix = GrammarUtil.getNamespace(grammar) + ".resource." + GrammarUtil.getName(grammar); //$NON-NLS-1$
ExportModel m = getModel(grammar);
if (m != null) {
bindFactory.addTypeToType(IQualifiedNameProvider.class.getName(), namingPrefix + "ExportedNamesProvider"); //$NON-NLS-1$
if (!m.getInterfaces().isEmpty()) {
bindFactory.addTypeToType(IFingerprintComputer.class.getName(), resourcePrefix + "FingerprintComputer"); //$NON-NLS-1$
}
if (!m.getExports().isEmpty()) {
bindFactory.addTypeToType(IDefaultResourceDescriptionStrategy.class.getName(), resourcePrefix + "ResourceDescriptionStrategy"); //$NON-NLS-1$
}
if (Iterables.any(m.getExports(), new Predicate<Export>() {
@Override
public boolean apply(final Export input) {
return input.isFingerprint() && input.getFragmentAttribute() != null;
}
})) {
bindFactory.addTypeToType(IFragmentProvider.class.getName(), resourcePrefix + "FragmentProvider");
}
}
bindFactory.addTypeToType(IResourceDescription.Manager.class.getName(), resourcePrefix + "ResourceDescriptionManager"); //$NON-NLS-1$
return bindFactory.getBindings();
}
示例5: getExportedPackagesRt
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public String[] getExportedPackagesRt(final Grammar grammar) {
if (getModel(grammar) != null) {
return new String[] {GrammarUtil.getNamespace(grammar) + ".naming", GrammarUtil.getNamespace(grammar) + ".resource"}; //$NON-NLS-1$ //$NON-NLS-2$
} else {
return new String[] {GrammarUtil.getNamespace(grammar) + ".resource"}; //$NON-NLS-1$
}
}
示例6: getGuiceBindingsRt
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public Set<Binding> getGuiceBindingsRt(final Grammar grammar) {
final BindFactory bindFactory = new BindFactory();
final String prefix = GrammarUtil.getNamespace(grammar) + ".scoping." + GrammarUtil.getName(grammar);
bindFactory.addTypeToType(IScopeProvider.class.getName(), prefix + "ScopeProvider");
bindFactory.addTypeToType(IScopeNameProvider.class.getName(), prefix + "ScopeNameProvider");
bindFactory.addTypeToType(ILinkingService.class.getName(), "com.avaloq.tools.ddk.xtext.linking.LinkingService");
return bindFactory.getBindings();
}
示例7: getExportedPackagesRt
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
@Override
public String[] getExportedPackagesRt(Grammar grammar) {
return new String[] { GrammarUtil.getNamespace(grammar), GrammarUtil.getNamespace(grammar) + ".services" };
}
示例8: getBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getBasePackage(Grammar g) {
if (basePackage == null)
return GrammarUtil.getNamespace(g);
return basePackage;
}
示例9: getRuntimeBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getRuntimeBasePackage(final Grammar grammar) {
return GrammarUtil.getNamespace(grammar);
}
示例10: getEclipsePluginBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getEclipsePluginBasePackage(final Grammar grammar) {
String _namespace = GrammarUtil.getNamespace(grammar);
return (_namespace + ".ui");
}
示例11: getIdeaBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getIdeaBasePackage(final Grammar grammar) {
String _namespace = GrammarUtil.getNamespace(grammar);
return (_namespace + ".idea");
}
示例12: getWebBasePackage
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getWebBasePackage(final Grammar grammar) {
String _namespace = GrammarUtil.getNamespace(grammar);
return (_namespace + ".web");
}
示例13: getPackageName
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
public String getPackageName(final Grammar grammar) {
return GrammarUtil.getNamespace(grammar);
}
示例14: getExportedPackagesRt
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public String[] getExportedPackagesRt(final Grammar grammar) {
return new String[] {GrammarUtil.getNamespace(grammar) + ".scoping"};
}
示例15: getFormatterName
import org.eclipse.xtext.GrammarUtil; //导入方法依赖的package包/类
/**
* Get the qualified class name of the formatter. The class name is prefixed with classNamePrefix.
*
* @param grammar
* the format grammar
* @param classNamePrefix
* the class prefix - may be null
* @return String fully qualified name of the formatter class
*/
public static String getFormatterName(final Grammar grammar, final String classNamePrefix) {
return GrammarUtil.getNamespace(grammar) + ".formatting." + (classNamePrefix == null ? "" : classNamePrefix) + GrammarUtil.getName(grammar) + "Formatter";
}