Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java

Issue 9703036: Refresh action for the Files View. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/RefreshAction.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java (revision 5482)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/FilesView.java (working copy)
@@ -140,6 +140,8 @@
private static final String TAG_PATH = "path"; //$NON-NLS-1$
private static final String TAG_SELECTION = "selection"; //$NON-NLS-1$
+ private RefreshAction refreshAction;
+
public FilesView() {
}
@@ -186,6 +188,9 @@
moveAction = new MoveResourceAction(getShell());
treeViewer.addSelectionChangedListener(moveAction);
+ refreshAction = new RefreshAction(this);
+ treeViewer.addSelectionChangedListener(refreshAction);
+
deleteAction = new DeleteAction(getSite());
deleteAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
ISharedImages.IMG_TOOL_DELETE));
@@ -305,6 +310,9 @@
manager.add(moveAction);
}
manager.add(deleteAction);
+
+ manager.add(new Separator());
+ manager.add(refreshAction);
}
// Remove, iff non-empty selection, all elements are IResources
@@ -404,6 +412,14 @@
treeViewer.getTree().setFont(font);
}
+ Shell getShell() {
+ return getSite().getShell();
+ }
+
+ TreeViewer getViewer() {
+ return treeViewer;
+ }
+
private void fillInActionBars() {
IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin.getWorkspace().getAdapter(
IUndoContext.class);
@@ -411,10 +427,6 @@
undoRedoActionGroup.fillActionBars(getViewSite().getActionBars());
}
- private Shell getShell() {
- return getSite().getShell();
- }
-
private void initDragAndDrop() {
int ops = DND.DROP_COPY | DND.DROP_MOVE;// | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] {
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/filesview/RefreshAction.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698