Revision d33f36bb
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionHandler.java | ||
---|---|---|
18 | 18 |
/** |
19 | 19 |
* @author pplitzner |
20 | 20 |
* @since Nov 2, 2017 |
21 |
* |
|
22 | 21 |
*/ |
23 | 22 |
public class InspectSessionHandler { |
24 | 23 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java | ||
---|---|---|
61 | 61 |
|
62 | 62 |
private TreeViewer treeViewer; |
63 | 63 |
private Button btnClose; |
64 |
EntityCacherDebugResult ecdr;
|
|
64 |
private EntityCacherDebugResult entityCacherDebugResult;
|
|
65 | 65 |
private SashForm sashForm; |
66 | 66 |
private Composite compositeDebug; |
67 | 67 |
|
... | ... | |
77 | 77 |
activeSession = CdmStore.getCurrentSessionManager().getActiveSession(); |
78 | 78 |
if (activeSession != null){ |
79 | 79 |
//TODO |
80 |
ecdr = activeSession.debug(false);
|
|
80 |
entityCacherDebugResult = activeSession.debug(false);
|
|
81 | 81 |
} |
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
/** |
85 | 85 |
* Open the dialog. |
86 |
* @return the result |
|
87 | 86 |
*/ |
88 | 87 |
public Object open() { |
89 | 88 |
|
... | ... | |
146 | 145 |
gd_btnClose.widthHint = 70; |
147 | 146 |
btnClose.setLayoutData(gd_btnClose); |
148 | 147 |
btnClose.setText("Close"); |
149 |
|
|
150 | 148 |
} |
151 | 149 |
|
152 | 150 |
private void setDebugInfoText() { |
153 |
txtDebugInfo.setText(ecdr.toString());
|
|
151 |
txtDebugInfo.setText(entityCacherDebugResult == null? "No session" : entityCacherDebugResult.toString());
|
|
154 | 152 |
} |
155 | 153 |
private CdmEntityInfo[] getRootElements() { |
156 | 154 |
|
157 |
List<CdmEntityInfo> rootElemnts = ecdr.getRootElements();
|
|
155 |
List<CdmEntityInfo> rootElemnts = entityCacherDebugResult.getRootElements();
|
|
158 | 156 |
return rootElemnts.toArray(new CdmEntityInfo[rootElemnts.size()]); |
159 | 157 |
} |
160 | 158 |
|
Also available in: Unified diff
cleanup and fix NPE if no active session in debug view