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


Java HaxeFileType.HAXE_FILE_TYPE属性代码示例

本文整理汇总了Java中com.intellij.plugins.haxe.HaxeFileType.HAXE_FILE_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java HaxeFileType.HAXE_FILE_TYPE属性的具体用法?Java HaxeFileType.HAXE_FILE_TYPE怎么用?Java HaxeFileType.HAXE_FILE_TYPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.plugins.haxe.HaxeFileType的用法示例。


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

示例1: getItemsByName

public static List<HaxeComponentName> getItemsByName(@NotNull final String name,
                                                     @NotNull final Project project,
                                                     @NotNull final GlobalSearchScope searchScope) {
  HaxeIndexUtil.warnIfDumbMode(project);
  final Collection<VirtualFile> files =
    FileBasedIndex.getInstance().getContainingFiles(HAXE_SYMBOL_INDEX, name, searchScope);
  final Set<HaxeComponentName> result = new THashSet<HaxeComponentName>();
  for (VirtualFile vFile : files) {
    final PsiFile psiFile = PsiManager.getInstance(project).findFile(vFile);
    if (psiFile == null || psiFile.getFileType() != HaxeFileType.HAXE_FILE_TYPE) {
      continue;
    }
    processComponents(psiFile, new PsiElementProcessor<HaxeNamedComponent>() {
      @Override
      public boolean execute(@NotNull HaxeNamedComponent subComponent) {
        if (name.equals(subComponent.getName())) {
          result.add(subComponent.getComponentName());
        }
        return true;
      }
    });
  }
  return new ArrayList<HaxeComponentName>(result);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:24,代码来源:HaxeSymbolIndex.java

示例2: getItemsByName

public static List<HaxeComponent> getItemsByName(String name, Project project, GlobalSearchScope searchScope) {
  HaxeIndexUtil.warnIfDumbMode(project);
  Collection<VirtualFile> files =
    FileBasedIndex.getInstance().getContainingFiles(HAXE_COMPONENT_INDEX, name, searchScope);
  final List<HaxeComponent> result = new ArrayList<HaxeComponent>();
  for (VirtualFile vFile : files) {
    PsiFile file = PsiManager.getInstance(project).findFile(vFile);
    if (file == null || file.getFileType() != HaxeFileType.HAXE_FILE_TYPE) {
      continue;
    }
    final HaxeComponent component = HaxeResolveUtil.findComponentDeclaration(file, name);
    if (component != null) {
      result.add(component);
    }
  }
  return result;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:17,代码来源:HaxeComponentIndex.java

示例3: setUpNameComboBox

private void setUpNameComboBox(Collection<String> possibleNames) {
  final EditorComboBoxEditor comboEditor = new StringComboboxEditor(myProject, HaxeFileType.HAXE_FILE_TYPE, myNameComboBox);

  myNameComboBox.setEditor(comboEditor);
  myNameComboBox.setRenderer(new EditorComboBoxRenderer(comboEditor));
  myNameComboBox.setEditable(true);
  myNameComboBox.setMaximumRowCount(8);

  myContentPane.registerKeyboardAction(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      myNameComboBox.requestFocus();
    }
  }, KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);

  for (String possibleName : possibleNames) {
    myNameComboBox.addItem(possibleName);
  }
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:18,代码来源:HaxeIntroduceDialog.java

示例4: getItemsByName

public static List<HaxeComponent> getItemsByName(String name, Project project, GlobalSearchScope searchScope) {
  Collection<VirtualFile> files =
    FileBasedIndex.getInstance().getContainingFiles(HAXE_COMPONENT_INDEX, name, searchScope);
  final List<HaxeComponent> result = new ArrayList<HaxeComponent>();
  for (VirtualFile vFile : files) {
    PsiFile file = PsiManager.getInstance(project).findFile(vFile);
    if (file == null || file.getFileType() != HaxeFileType.HAXE_FILE_TYPE) {
      continue;
    }
    final HaxeComponent component = HaxeResolveUtil.findComponentDeclaration(file, name);
    if (component != null) {
      result.add(component);
    }
  }
  return result;
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:16,代码来源:HaxeComponentIndex.java

示例5: isVisible

@Override
public boolean isVisible(@NotNull Usage usage) {
  if (usage instanceof PsiElementUsage) {
    final PsiElement psiElement = ((PsiElementUsage)usage).getElement();
    final PsiFile containingFile = psiElement.getContainingFile();

    if (containingFile != null && containingFile.getFileType() == HaxeFileType.HAXE_FILE_TYPE) {
      return PsiTreeUtil.getParentOfType(psiElement, HaxeImportStatement.class) == null;
    }
  }
  return true;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:12,代码来源:HaxeImportFilteringRule.java

示例6: getFileType

@NotNull
@Override
public FileType getFileType() {
  return HaxeFileType.HAXE_FILE_TYPE;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:5,代码来源:HaxeFile.java

示例7: acceptInput

@Override
public boolean acceptInput(VirtualFile file) {
  // ignore std stubs for different platforms
  return file.getFileType() == HaxeFileType.HAXE_FILE_TYPE && !"_std".equals(file.getParent().getName());
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:5,代码来源:HaxeSdkInputFilter.java

示例8: canPutAt

public boolean canPutAt(@NotNull final VirtualFile file, final int line, @NotNull Project project) {
  return file.getFileType() == HaxeFileType.HAXE_FILE_TYPE;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:3,代码来源:HaxeBreakpointType.java

示例9: getFileType

@NotNull
public FileType getFileType() {
  return HaxeFileType.HAXE_FILE_TYPE;
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:4,代码来源:HaxeDebuggerEditorsProvider.java

示例10: acceptInput

@Override
public boolean acceptInput(Project project, VirtualFile file) {
  // ignore std stubs for different platforms
  return file.getFileType() == HaxeFileType.HAXE_FILE_TYPE && !"_std".equals(file.getParent().getName());
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:5,代码来源:HaxeSdkInputFilter.java


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