public void dispose() {
if(conversation!=null){
conversation.close();
+ conversation = null;
}
}
if(conversation!=null){
conversation.unregisterForDataStoreChanges(this);
conversation.close();
+ conversation = null;
}
if(input!=null){
input.getCdmEntitySession().dispose();
import java.util.List;
import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
import javax.inject.Inject;
import org.eclipse.core.runtime.IProgressMonitor;
menuService.registerContextMenu(viewer.getControl(), "eu.etaxonomy.taxeditor.editor.popupmenu.polytomouskeylisteditor");
}
+
+ @PreDestroy
+ public void dispose() {
+ if(input!=null){
+ input.dispose();
+ input.getConversationHolder().close();
+ }
+ }
+
public int getTableItemCount() {
if (viewer != null && viewer.getTable() != null) {
return viewer.getTable().getItemCount();
*/
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
- conversation.clear();
- conversation.close();
- conversation = null;
}
private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
public void dispose() {
if(conversation!=null){
conversation.close();
+ conversation = null;
}
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
}
public void dispose(){
if(conversation!=null){
conversation.close();
+ conversation = null;
}
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
}
@PreDestroy
- public void dispose() {
- Display.getCurrent().removeFilter(SWT.FocusIn, ACTION_UPDATER);
- Display.getCurrent().removeFilter(SWT.FocusOut, ACTION_UPDATER);
- CLIPBOARD.dispose();
+ public void dispose() {
+ Display.getCurrent().removeFilter(SWT.FocusIn, ACTION_UPDATER);
+ Display.getCurrent().removeFilter(SWT.FocusOut, ACTION_UPDATER);
+ CLIPBOARD.dispose();
input.dispose();
- }
+
+ if(conversationHolder!=null){
+ conversationHolder.close();
+ conversationHolder = null;
+ }
+ if(input!=null){
+ input.dispose();
+ }
+ }
private void updateStatusBar() {
conversation.unregisterForDataStoreChanges(this);
conversation.close();
CdmStore.getContextManager().removeContextListener(contextListener);
+ conversation = null;
}
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
ICdmDataChangeService currentDataChangeService = CdmApplicationState.getCurrentDataChangeService();
if(currentDataChangeService!=null){
viewer.setInput(new EmptyRoot());
}
- public void restore(IMemento memento, IProgressMonitor monitor) {
+ private void restore(IMemento memento, IProgressMonitor monitor) {
root = new Root(conversation);
if (memento == null) {
viewer.setInput(root);
dataChangeBehavior = null;
if (conversation != null) {
conversation.unregisterForDataStoreChanges(this);
+ conversation = null;
}
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
if(CdmApplicationState.getCurrentDataChangeService() != null) {
CdmApplicationState.getCurrentDataChangeService().unregister(this);
public void dispose() {
if(conversation!=null){
conversation.close();
+ conversation = null;
}
if(searchJob != null) {
searchJob.cancel();
}
public void bind() {
- cdmEntitySession.bind();
+ if(cdmEntitySession!=null){
+ cdmEntitySession.bind();
+ }
}
public void dispose() {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
public abstract void merge();
if(conversation!=null){
conversation.unregisterForDataStoreChanges(this);
conversation.close();
+ conversation = null;
}
if(input!=null){
input.dispose();
public void dispose(){
if(conversation!=null){
conversation.close();
+ conversation = null;
}
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
}
conversation.commit();
conversation.close();
+ conversation = null;
return true;
}
super.dispose();
if(cdmEntitySession != null) {
cdmEntitySession.dispose();
+ cdmEntitySession = null;
}
if(previousCdmEntitySession!=null){
previousCdmEntitySession.bind();