本文整理汇总了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);
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例6: getFileType
@NotNull
@Override
public FileType getFileType() {
return HaxeFileType.HAXE_FILE_TYPE;
}
示例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());
}
示例8: canPutAt
public boolean canPutAt(@NotNull final VirtualFile file, final int line, @NotNull Project project) {
return file.getFileType() == HaxeFileType.HAXE_FILE_TYPE;
}
示例9: getFileType
@NotNull
public FileType getFileType() {
return HaxeFileType.HAXE_FILE_TYPE;
}
示例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());
}