當前位置: 首頁>>代碼示例>>Java>>正文


Java FavoritesViewTreeBuilder類代碼示例

本文整理匯總了Java中com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder的典型用法代碼示例。如果您正苦於以下問題:Java FavoritesViewTreeBuilder類的具體用法?Java FavoritesViewTreeBuilder怎麽用?Java FavoritesViewTreeBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FavoritesViewTreeBuilder類屬於com.intellij.ide.favoritesTreeView包,在下文中一共展示了FavoritesViewTreeBuilder類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: actionPerformed

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
@Override
public void actionPerformed(AnActionEvent e) {
  Project project = e.getProject();
  FavoritesViewTreeBuilder treeBuilder = FavoritesTreeViewPanel.FAVORITES_TREE_BUILDER_KEY.getData(e.getDataContext());
  String listName = FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(e.getDataContext());
  if (project == null || treeBuilder == null || listName == null) {
    return;
  }
  FavoritesManager favoritesManager = FavoritesManager.getInstance(project);
  FavoritesListProvider provider = favoritesManager.getListProvider(listName);
  Set<Object> selection = treeBuilder.getSelectedElements();
  if (provider != null && provider.willHandle(CommonActionsPanel.Buttons.EDIT, project, selection)) {
    provider.handle(CommonActionsPanel.Buttons.EDIT, project, selection, treeBuilder.getTree());
    return;
  }
  favoritesManager.renameList(project, listName);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:EditFavoritesAction.java

示例2: update

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
@Override
public void update(AnActionEvent e) {
  e.getPresentation().setText(getTemplatePresentation().getText());
  e.getPresentation().setIcon(CommonActionsPanel.Buttons.EDIT.getIcon());
  e.getPresentation().setEnabled(true);
  Project project = e.getProject();
  FavoritesViewTreeBuilder treeBuilder = FavoritesTreeViewPanel.FAVORITES_TREE_BUILDER_KEY.getData(e.getDataContext());
  String listName = FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(e.getDataContext());
  if (project == null || treeBuilder == null || listName == null) {
    e.getPresentation().setEnabled(false);
    return;
  }
  FavoritesManager favoritesManager = FavoritesManager.getInstance(project);
  FavoritesListProvider provider = favoritesManager.getListProvider(listName);
  Set<Object> selection = treeBuilder.getSelectedElements();
  if (provider != null) {
    e.getPresentation().setEnabled(provider.willHandle(CommonActionsPanel.Buttons.EDIT, project, selection));
    e.getPresentation().setText(provider.getCustomName(CommonActionsPanel.Buttons.EDIT));
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:EditFavoritesAction.java

示例3: update

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
@Override
public void update(AnActionEvent e) {
  e.getPresentation().setText(CommonActionsPanel.Buttons.EDIT.getText());
  e.getPresentation().setIcon(CommonActionsPanel.Buttons.EDIT.getIcon());
  e.getPresentation().setEnabled(true);
  Project project = e.getProject();
  FavoritesViewTreeBuilder treeBuilder = FavoritesTreeViewPanel.FAVORITES_TREE_BUILDER_KEY.getData(e.getDataContext());
  String listName = FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(e.getDataContext());
  if (project == null || treeBuilder == null || listName == null) {
    e.getPresentation().setEnabled(false);
    return;
  }
  FavoritesManager favoritesManager = FavoritesManager.getInstance(project);
  FavoritesListProvider provider = favoritesManager.getListProvider(listName);
  Set<Object> selection = treeBuilder.getSelectedElements();
  if (provider != null) {
    e.getPresentation().setEnabled(provider.willHandle(CommonActionsPanel.Buttons.EDIT, project, selection));
    e.getPresentation().setText(provider.getCustomName(CommonActionsPanel.Buttons.EDIT));
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:21,代碼來源:EditFavoritesAction.java

示例4: actionPerformed

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
@Override
public void actionPerformed(AnActionEvent e) {
  Project project = e.getProject();
  FavoritesViewTreeBuilder treeBuilder = e.getDataContext().getData(FavoritesTreeViewPanel.FAVORITES_TREE_BUILDER_KEY);
  String listName = e.getDataContext().getData(FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY);
  if (project == null || treeBuilder == null || listName == null) {
    return;
  }
  FavoritesManager favoritesManager = FavoritesManager.getInstance(project);
  FavoritesListProvider provider = favoritesManager.getListProvider(listName);
  Set<Object> selection = treeBuilder.getSelectedElements();
  if (provider != null && provider.willHandle(CommonActionsPanel.Buttons.EDIT, project, selection)) {
    provider.handle(CommonActionsPanel.Buttons.EDIT, project, selection, treeBuilder.getTree());
    return;
  }
  favoritesManager.renameList(project, listName);
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:18,代碼來源:EditFavoritesAction.java

示例5: update

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
@Override
public void update(AnActionEvent e) {
  e.getPresentation().setText(CommonActionsPanel.Buttons.EDIT.getText());
  e.getPresentation().setIcon(CommonActionsPanel.Buttons.EDIT.getIcon());
  e.getPresentation().setEnabled(true);
  Project project = e.getProject();
  FavoritesViewTreeBuilder treeBuilder = e.getDataContext().getData(FavoritesTreeViewPanel.FAVORITES_TREE_BUILDER_KEY);
  String listName = e.getDataContext().getData(FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY);
  if (project == null || treeBuilder == null || listName == null) {
    e.getPresentation().setEnabled(false);
    return;
  }
  FavoritesManager favoritesManager = FavoritesManager.getInstance(project);
  FavoritesListProvider provider = favoritesManager.getListProvider(listName);
  Set<Object> selection = treeBuilder.getSelectedElements();
  if (provider != null) {
    e.getPresentation().setEnabled(provider.willHandle(CommonActionsPanel.Buttons.EDIT, project, selection));
    e.getPresentation().setText(provider.getCustomName(CommonActionsPanel.Buttons.EDIT));
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:21,代碼來源:EditFavoritesAction.java

示例6: FavoritesToolbarButtonAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesToolbarButtonAction(Project project, FavoritesViewTreeBuilder builder, String name, Icon icon) {
  super(name, icon);
  myBuilder = builder;
  mySettings = FavoritesManager.getInstance(project).getViewSettings();
  setContextComponent(myBuilder.getTree());
  Disposer.register(project, new Disposable() {
    @Override
    public void dispose() {
      myBuilder = null;
      mySettings = null;
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:FavoritesToolbarButtonAction.java

示例7: FavoritesFlattenPackagesAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesFlattenPackagesAction(Project project, FavoritesViewTreeBuilder builder) {
  super(project, builder, IdeBundle.message("action.flatten.packages"), AllIcons.ObjectBrowser.FlattenPackages);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:FavoritesFlattenPackagesAction.java

示例8: FavoritesShowMembersAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesShowMembersAction(Project project, FavoritesViewTreeBuilder builder) {
  super(project, builder, IdeBundle.message("action.show.members"), AllIcons.ObjectBrowser.ShowMembers);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:FavoritesShowMembersAction.java

示例9: FavoritesAbbreviatePackageNamesAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesAbbreviatePackageNamesAction(Project project, FavoritesViewTreeBuilder builder) {
  super(project, builder, IdeBundle.message("action.abbreviate.qualified.package.names"), AllIcons.ObjectBrowser.AbbreviatePackageNames);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:FavoritesAbbreviatePackageNamesAction.java

示例10: FavoritesAutoScrollToSourceAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesAutoScrollToSourceAction(Project project,
                                         AutoScrollToSourceHandler autoScrollToSourceHandler,
                                         FavoritesViewTreeBuilder builder) {
  super(project, builder, UIBundle.message("autoscroll.to.source.action.name"), AllIcons.General.AutoscrollToSource);
  myAutoScrollToSourceHandler = autoScrollToSourceHandler;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:FavoritesAutoScrollToSourceAction.java

示例11: FavoritesCompactEmptyMiddlePackagesAction

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesCompactEmptyMiddlePackagesAction(Project project, FavoritesViewTreeBuilder builder) {
  super(project, builder,
        IdeBundle.message("action.compact.empty.middle.packages"),
        AllIcons.ObjectBrowser.CompactEmptyPackages);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:FavoritesCompactEmptyMiddlePackagesAction.java

示例12: getBuilder

import com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder; //導入依賴的package包/類
public FavoritesViewTreeBuilder getBuilder() {
  return myBuilder;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:FavoritesToolbarButtonAction.java


注:本文中的com.intellij.ide.favoritesTreeView.FavoritesViewTreeBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。