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