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


Java XPathFileType类代码示例

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


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

示例1: resolve

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
@Nullable
public XPathVariable resolve() {
  if (getContainingFile().getLanguage() == XPathFileType.XPATH2.getLanguage()) {
    XPathVariableHolder f = PsiTreeUtil.getParentOfType(this, XPathVariableHolder.class, true);
    while (f != null) {
      final XPathVariable variable = findVariable(f.getVariables(), getReferencedName());
      if (variable != null) {
        return variable;
      }
      f = PsiTreeUtil.getParentOfType(f, XPathVariableHolder.class, true);
    }
  }
  final VariableContext context = getXPathContext().getVariableContext();
  if (context == null) {
    return null;
  }
  return context.resolve(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:XPathVariableReferenceImpl.java

示例2: DefaultProvider

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
public DefaultProvider(XmlElement element, Language language) {
  myContextElement = element;
  myContextType = language == XPathFileType.XPATH2.getLanguage() ? ContextType.PLAIN_V2 : ContextType.PLAIN;

  if (myContextElement != null) {
    myNamespaceContext = XsltNamespaceContext.NAMESPACE_CONTEXT;
    setXPathInjected(myContextElement.getContainingFile());
  } else {
    myNamespaceContext = NULL_NAMESPACE_CONTEXT;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ContextProvider.java

示例3: EditContextDialog

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
public EditContextDialog(Project project,
                         Set<String> unresolvedPrefixes,
                         Collection<Namespace> namespaces,
                         Collection<Variable> variables,
                         ContextProvider contextProvider) {
  super(project, false);
  myUnresolvedPrefixes = unresolvedPrefixes;

  setTitle("Edit XPath Context");
  setModal(true);

  myContextProvider = new MyContextProvider(contextProvider);

  final List<Variable> m = copy(variables);
  myVariableTableModel = new VariableTableModel(m, project, XPathFileType.XPATH);
  myVariableTable = new Table(myVariableTableModel);
  myVariableTable.setDefaultRenderer(String.class, new VariableCellRenderer(m));
  myVariableTable.setDefaultRenderer(Expression.class, new ExpressionCellRenderer(project));
  myVariableTable.setDefaultEditor(Expression.class, new ExpressionCellEditor(project));

  int width = new JLabel("Name").getPreferredSize().width;
  myVariableTable.getColumnModel().getColumn(0).setMinWidth(width);
  myVariableTable.getColumnModel().getColumn(0).setMaxWidth(width * 5);
  myVariableTable.setPreferredScrollableViewportSize(new Dimension(200, 130));

  final List<Namespace> n = copy(namespaces);
  myNamespaceTableModel = new NamespaceTableModel(n);
  myNamespaceTable = new Table(myNamespaceTableModel);
  myNamespaceTable.setDefaultRenderer(String.class, new NamespaceCellRenderer(n));

  width = new JLabel("Prefix").getPreferredSize().width;
  myNamespaceTable.getColumnModel().getColumn(0).setMinWidth(width);
  myNamespaceTable.getColumnModel().getColumn(0).setMaxWidth(width * 4);
  myNamespaceTable.setPreferredScrollableViewportSize(new Dimension(200, 150));

  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:EditContextDialog.java

示例4: acceptsLanguage

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
protected boolean acceptsLanguage(Language language) {
  return language == XPathFileType.XPATH.getLanguage() || language == XPathFileType.XPATH2.getLanguage();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:IndexZeroPredicate.java

示例5: acceptsLanguage

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
protected boolean acceptsLanguage(Language language) {
  return language == XPathFileType.XPATH.getLanguage();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ImplicitTypeConversion.java

示例6: getNamesValidator

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
public NamesValidator getNamesValidator() {
    if (myNamesValidator == null) {
        myNamesValidator = LanguageNamesValidation.INSTANCE.forLanguage(XPathFileType.XPATH.getLanguage());
    }
    return myNamesValidator;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:XsltDeclarationInspection.java

示例7: acceptsLanguage

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
protected boolean acceptsLanguage(Language language) {
  return language == XPathFileType.XPATH2.getLanguage();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:Xslt2ContextProviderExtension.java

示例8: isInputValid

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
public boolean isInputValid(String newName, PsiElement element, ProcessingContext context) {
  return LanguageNamesValidation.INSTANCE.forLanguage(XPathFileType.XPATH.getLanguage())
    .isIdentifier(newName, element.getProject());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:XsltRenameInputValidator.java

示例9: actionPerformedImpl

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
@Override
protected boolean actionPerformedImpl(PsiFile file, Editor editor, XmlAttribute context, int offset) {
  if (file.getLanguage() != XPathFileType.XPATH2.getLanguage()) return false;

  return super.actionPerformedImpl(file, editor, context, offset);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:XsltExtractFunctionAction.java

示例10: isEnabledForLanguage

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
@Override
public boolean isEnabledForLanguage(Language l) {
  return l == XPathFileType.XPATH.getLanguage() || l == XMLLanguage.INSTANCE || l == XsltLanguage.INSTANCE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:VariableInlineHandler.java

示例11: XsltDebuggerEditorsProvider

import org.intellij.lang.xpath.XPathFileType; //导入依赖的package包/类
public XsltDebuggerEditorsProvider(XsltChecker.LanguageLevel level) {
  myFileType = level == XsltChecker.LanguageLevel.V2 ? XPathFileType.XPATH2 : XPathFileType.XPATH;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:XsltDebuggerEditorsProvider.java


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