本文整理匯總了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);
}
示例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));
}
}
示例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));
}
}
示例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);
}
示例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));
}
}
示例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;
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}