refresh whole workspace

This commit is contained in:
Vadim Lopatin 2015-12-08 17:24:51 +03:00
parent a222c2de68
commit 88ff7119c7
3 changed files with 13 additions and 2 deletions

View File

@ -687,7 +687,11 @@ class IDEFrame : AppFrame {
return;
Project project;
ProjectFolder folder;
if (cast(Project)obj) {
if (cast(Workspace)obj) {
Workspace ws = cast(Workspace)obj;
ws.refresh();
refreshWorkspace();
} else if (cast(Project)obj) {
project = cast(Project)obj;
} else if (cast(ProjectFolder)obj) {
folder = cast(ProjectFolder)obj;

View File

@ -75,7 +75,8 @@ class WorkspacePanel : DockWindow {
_tree.popupMenu = &onTreeItemPopupMenu;
_workspacePopupMenu = new MenuItem();
_workspacePopupMenu.add(ACTION_FILE_NEW_SOURCE_FILE, ACTION_FILE_WORKSPACE_CLOSE);
_workspacePopupMenu.add(ACTION_PROJECT_FOLDER_REFRESH,
ACTION_FILE_WORKSPACE_CLOSE);
_projectPopupMenu = new MenuItem();
_projectPopupMenu.add(ACTION_FILE_NEW_SOURCE_FILE,

View File

@ -199,6 +199,12 @@ class Workspace : WorkspaceItem {
}
void close() {
}
void refresh() {
foreach (Project p; _projects) {
p.refresh();
}
}
}
/// global workspace