Revision 6e656d8c
Added by Patrick Plitzner almost 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/WorkbenchEventConstants.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
public static final String DELETE_DERIVATIVE = "DELETE/DERIVATIVE"; |
33 | 33 |
|
34 |
public static final String RECONNECT = "RECONNECT"; |
|
35 |
|
|
34 | 36 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/ReconnectHandlerE4.java | ||
---|---|---|
16 | 16 |
import org.eclipse.swt.SWT; |
17 | 17 |
import org.eclipse.swt.widgets.Shell; |
18 | 18 |
|
19 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
|
20 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
19 | 21 |
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource; |
20 | 22 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
21 | 23 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
... | ... | |
35 | 37 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
36 | 38 |
|
37 | 39 |
loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true); |
40 |
EventUtility.postEvent(WorkbenchEventConstants.RECONNECT, null); |
|
38 | 41 |
} |
39 | 42 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/ShowRemotingLoginWindowHandlerE4.java | ||
---|---|---|
16 | 16 |
import org.eclipse.swt.SWT; |
17 | 17 |
import org.eclipse.swt.widgets.Shell; |
18 | 18 |
|
19 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
|
20 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
19 | 21 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
20 | 22 |
|
21 | 23 |
/** |
... | ... | |
32 | 34 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell, |
33 | 35 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
34 | 36 |
loginDialog.open(); |
37 |
EventUtility.postEvent(WorkbenchEventConstants.RECONNECT, null); |
|
35 | 38 |
} |
36 | 39 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java | ||
---|---|---|
17 | 17 |
import org.apache.log4j.Logger; |
18 | 18 |
import org.eclipse.e4.core.di.annotations.Optional; |
19 | 19 |
import org.eclipse.e4.ui.di.PersistState; |
20 |
import org.eclipse.e4.ui.di.UIEventTopic; |
|
20 | 21 |
import org.eclipse.e4.ui.di.UISynchronize; |
21 | 22 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
22 | 23 |
import org.eclipse.e4.ui.services.IServiceConstants; |
... | ... | |
38 | 39 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
39 | 40 |
import eu.etaxonomy.taxeditor.editor.IDistributionEditor; |
40 | 41 |
import eu.etaxonomy.taxeditor.editor.ITaxonEditor; |
42 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
|
41 | 43 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
42 | 44 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
43 | 45 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
... | ... | |
175 | 177 |
} |
176 | 178 |
} |
177 | 179 |
|
180 |
@Inject |
|
181 |
@Optional |
|
182 |
private void clearOnReconnect(@UIEventTopic(WorkbenchEventConstants.RECONNECT)Object o){ |
|
183 |
showEmptyPage(); |
|
184 |
} |
|
185 |
|
|
178 | 186 |
public Viewer getViewer() { |
179 | 187 |
return viewer; |
180 | 188 |
} |
Also available in: Unified diff
ref #6973 Clear all CdmEditorParts when (re-)connecting