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


Java DeleteHandler.deletePsiElement方法代码示例

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


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

示例1: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@NotNull DataContext dataContext) {
  List<PsiDirectory> allElements = Arrays.asList(getSelectedDirectories());
  List<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PackageViewPane.java

示例2: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@NotNull DataContext dataContext) {
  List<PsiElement> allElements = Arrays.asList(getElementsToDelete());
  List<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ProjectViewImpl.java

示例3: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@NotNull DataContext dataContext) {
  List<PsiElement> allElements = Arrays.asList(getSelectedPsiElements());
  ArrayList<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ScopeTreeViewPanel.java

示例4: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@Nonnull DataContext dataContext) {
  List<PsiElement> allElements = Arrays.asList(getElementsToDelete());
  List<PsiElement> validElements = new ArrayList<>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:FavoritesTreeViewPanel.java

示例5: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@Nonnull DataContext dataContext) {
  List<PsiDirectory> allElements = Arrays.asList(getSelectedDirectories());
  List<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:PackageViewPane.java

示例6: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@Nonnull DataContext dataContext) {
  List<PsiElement> allElements = Arrays.asList(getSelectedPsiElements());
  ArrayList<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilBase.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:ScopeTreeViewPanel.java

示例7: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public final void deleteElement(@NotNull final DataContext dataContext) {
  final PsiElement aClass = getSelectedElement();
  if (!canBeDeleted(aClass)) return;
  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting.class", getQualifiedName(aClass)));
  try {
    final PsiElement[] elements = {aClass};
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:TypeHierarchyBrowserBase.java

示例8: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@NotNull final DataContext dataContext) {
  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    final PsiElement[] elements = getSelectedElements();
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:CommanderPanel.java

示例9: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public final void deleteElement(@Nonnull final DataContext dataContext) {
  final PsiElement aClass = getSelectedElement();
  if (!canBeDeleted(aClass)) return;
  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting.class", getQualifiedName(aClass)));
  try {
    final PsiElement[] elements = {aClass};
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:TypeHierarchyBrowserBase.java

示例10: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@Nonnull final DataContext dataContext) {
  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    final PsiElement[] elements = getSelectedElements();
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:CommanderPanel.java

示例11: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
public void deleteElement(@NotNull DataContext dataContext) {
  Project project = CommonDataKeys.PROJECT.getData(dataContext);
  DeleteHandler.deletePsiElement(myElements, project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FormMergerTreeStructureProvider.java

示例12: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
public void deleteElement(@NotNull DataContext dataContext) {
    Project project = CommonDataKeys.PROJECT.getData(dataContext);
    DeleteHandler.deletePsiElement(myElements, project);
}
 
开发者ID:idok,项目名称:react-templates-plugin,代码行数:5,代码来源:RTMergerTreeStructureProvider.java

示例13: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
public void deleteElement(@NotNull DataContext dataContext) {
    Project project = CommonDataKeys.PROJECT.getData(dataContext);
    DeleteHandler.deletePsiElement(elements, project);
}
 
开发者ID:Tolc,项目名称:IntelliJ_Jahia_plugin,代码行数:5,代码来源:ViewDeleteProvider.java

示例14: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
public void deleteElement(@NotNull DataContext dataContext) {
  Project project = PlatformDataKeys.PROJECT.getData(dataContext);
  DeleteHandler.deletePsiElement(myElements, project);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:FormMergerTreeStructureProvider.java

示例15: deleteElement

import com.intellij.ide.util.DeleteHandler; //导入方法依赖的package包/类
@Override
public void deleteElement(@NotNull DataContext dataContext)
{
	Project project = dataContext.getData(CommonDataKeys.PROJECT);
	DeleteHandler.deletePsiElement(myElements, project);
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:7,代码来源:FormMergerTreeStructureProvider.java


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