Project

General

Profile

Revision 9bbb5f2c

ID9bbb5f2cc2c5965f150e8f6c053a4be6d4ac78f8
Parent 7d1e5a64
Child 28b3f4aa

Added by Andreas Kohlbecker over 8 years ago

fixing #3101 (refresh tree navigator after switching user)

View differences:

eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchWindowAdvisor.java
67 67
	}
68 68

  
69 69
	private int authenticate(){
70
		Shell shell = TaxonomicEditorPlugin.getDefault().getWorkbench()
71
		.getActiveWorkbenchWindow().getShell();
70
		Shell shell = TaxonomicEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
72 71

  
73 72
		LoginDialog loginDialog = new LoginDialog(shell);
74 73
		return loginDialog.open();
eu.etaxonomy.taxeditor.cdmlib/.classpath
116 116
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT-sources.jar"/>
117 117
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.13-SNAPSHOT.jar"/>
118 118
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT-sources.jar"/>
119
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.13-SNAPSHOT.jar"/>
120
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT-sources.jar"/>
121
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.13-SNAPSHOT.jar"/>
122
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT-sources.jar"/>
123
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.13-SNAPSHOT.jar"/>
124
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT-sources.jar"/>
125
	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.13-SNAPSHOT.jar"/>
119 126
	<classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
120
	<classpathentry kind="output" path="target/classes"/>
127
	<classpathentry kind="output" path="bin"/>
121 128
</classpath>
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java
13 13
import java.util.ArrayList;
14 14
import java.util.HashSet;
15 15
import java.util.List;
16
import java.util.Observable;
17
import java.util.Observer;
16 18
import java.util.Set;
17 19
import java.util.UUID;
18 20

  
......
39 41
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
40 42
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
41 43
import eu.etaxonomy.taxeditor.store.CdmStore;
44
import eu.etaxonomy.taxeditor.store.LoginManager;
42 45

  
43 46
/**
44 47
 * Taxonomic tree implementation using Common Navigator Framework.
......
49 52
 * @version 1.0
50 53
 */
51 54
public class TaxonNavigator extends CommonNavigator implements
52
		IPostOperationEnabled, IConversationEnabled {
55
		IPostOperationEnabled, IConversationEnabled, Observer {
53 56

  
54 57
	/**
55 58
	 * Constant
......
109 112
			conversation = CdmStore.createConversation();
110 113
			conversation.registerForDataStoreChanges(TaxonNavigator.this);
111 114
		}
115
		CdmStore.getLoginManager().addObserver(this);
112 116
	}
113 117

  
114 118
	/**
115 119
	 * Refresh this navigators viewer
116 120
	 */
117 121
	public void refresh() {
118
		getConversationHolder().bind();
122
		if(getConversationHolder() != null){
123
			getConversationHolder().bind();			
124
		}
119 125
		getCommonViewer().refresh();
120 126
	}
121 127

  
......
434 440
			}
435 441
		}
436 442
	}
443

  
444

  
445
	/* (non-Javadoc)
446
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
447
	 */
448
	@Override
449
	public void update(Observable o, Object arg) {
450
		if(o instanceof LoginManager){
451
			refresh();
452
		}
453
		
454
	}
437 455
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)