Skip to content

Commit

Permalink
View is updated along with its source view.
Browse files Browse the repository at this point in the history
  • Loading branch information
cderoove committed Jan 24, 2013
1 parent 474e791 commit 1597fc8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ExapusRAP/src/exapus/gui/ExapusWorkbenchAdvisor.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ public class ExapusWorkbenchAdvisor extends WorkbenchAdvisor {

public void initialize(IWorkbenchConfigurer configurer) {

Store.getCurrent().populateWorkspaceModel();

Store store = Store.getCurrent();
store.registerViews();
store.populateWorkspaceModel();

getWorkbenchConfigurer().setSaveAndRestore(false);
super.initialize(configurer);
Expand Down
7 changes: 5 additions & 2 deletions ExapusRAP/src/exapus/model/store/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public static Store getCurrent() {
private Store() {
registry = new HashMap<String, View>();
workspaceModel = null;
registerDefaultViews();
registerCustomViews();
}


Expand Down Expand Up @@ -95,6 +93,11 @@ public boolean hasRegisteredView(String name) {
return registry.containsKey(name);
}

public void registerViews() {
registerDefaultViews();
registerCustomViews();
}


protected void registerDefaultViews() {
registerView(ViewFactory.getCurrent().completePackageView());
Expand Down
7 changes: 7 additions & 0 deletions ExapusRAP/src/exapus/model/view/View.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ public boolean removeProjectSelection(Selection selection) {
protected void makeDirty() {
forest = null;
graph = null;
makeDependentViewsDirty();
}

protected void makeDependentViewsDirty() {
for(View v : Store.getCurrent().getRegisteredViews())
if(name.equals(v.getSourceViewName()))
v.makeDirty();
}

public String getName() {
Expand Down

0 comments on commit 1597fc8

Please sign in to comment.