use of com.intellij.ide.bookmarks.Bookmark in project intellij-community by JetBrains.
the class BookmarksAction method itemChosen.
@Override
public void itemChosen(ItemWrapper item, Project project, JBPopup popup, boolean withEnterOrDoubleClick) {
if (item instanceof BookmarkItem && withEnterOrDoubleClick) {
Bookmark bookmark = ((BookmarkItem) item).getBookmark();
popup.cancel();
bookmark.navigate(true);
}
}
use of com.intellij.ide.bookmarks.Bookmark in project intellij-community by JetBrains.
the class DeleteBookmarkAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
List<Bookmark> bookmarks = BookmarksAction.getSelectedBookmarks(myList);
ListUtil.removeSelectedItems(myList);
for (Bookmark bookmark : bookmarks) {
BookmarkManager.getInstance(myProject).removeBookmark(bookmark);
}
}
use of com.intellij.ide.bookmarks.Bookmark in project intellij-community by JetBrains.
the class AbstractPsiBasedNode method patchIcon.
@Nullable
public static Icon patchIcon(@NotNull Project project, @Nullable Icon original, @Nullable VirtualFile file) {
if (file == null || original == null)
return original;
Icon icon = original;
final Bookmark bookmarkAtFile = BookmarkManager.getInstance(project).findFileBookmark(file);
if (bookmarkAtFile != null) {
final RowIcon composite = new RowIcon(2, RowIcon.Alignment.CENTER);
composite.setIcon(icon, 0);
composite.setIcon(bookmarkAtFile.getIcon(), 1);
icon = composite;
}
if (!file.isWritable()) {
icon = LayeredIcon.create(icon, PlatformIcons.LOCKED_ICON);
}
if (file.is(VFileProperty.SYMLINK)) {
icon = LayeredIcon.create(icon, PlatformIcons.SYMLINK_ICON);
}
return icon;
}
Aggregations