Revision f343b1b5
Added by Patrick Plitzner about 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java | ||
---|---|---|
39 | 39 |
CdmStore.getContextManager().addContextListener(this); |
40 | 40 |
} |
41 | 41 |
|
42 |
/* (non-Javadoc) |
|
43 |
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) |
|
44 |
*/ |
|
45 | 42 |
@Override |
46 | 43 |
public void createPartControl(Composite parent) { |
47 | 44 |
derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this); |
... | ... | |
56 | 53 |
control.setMenu(menu); |
57 | 54 |
} |
58 | 55 |
|
59 |
/* (non-Javadoc) |
|
60 |
* @see org.eclipse.ui.part.WorkbenchPart#setFocus() |
|
61 |
*/ |
|
62 | 56 |
@Override |
63 | 57 |
public void setFocus() { |
64 | 58 |
derivateSearchCompositeController.setFocus(); |
... | ... | |
68 | 62 |
} |
69 | 63 |
} |
70 | 64 |
|
71 |
/* (non-Javadoc) |
|
72 |
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor) |
|
73 |
*/ |
|
74 | 65 |
@Override |
75 | 66 |
public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) { |
76 | 67 |
} |
77 | 68 |
|
78 |
/* (non-Javadoc) |
|
79 |
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor) |
|
80 |
*/ |
|
81 | 69 |
@Override |
82 | 70 |
public void contextStop(IMemento memento, IProgressMonitor monitor) { |
83 | 71 |
derivateSearchCompositeController.setEnabled(false); |
84 | 72 |
derivateSearchCompositeController.reset(); |
85 | 73 |
} |
86 | 74 |
|
87 |
/* (non-Javadoc) |
|
88 |
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor) |
|
89 |
*/ |
|
90 | 75 |
@Override |
91 | 76 |
public void contextStart(IMemento memento, IProgressMonitor monitor) { |
92 | 77 |
derivateSearchCompositeController.setEnabled(true); |
93 | 78 |
} |
94 | 79 |
|
95 |
/* (non-Javadoc) |
|
96 |
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextRefresh(org.eclipse.core.runtime.IProgressMonitor) |
|
97 |
*/ |
|
98 | 80 |
@Override |
99 | 81 |
public void contextRefresh(IProgressMonitor monitor) { |
100 | 82 |
initConversation(); |
... | ... | |
107 | 89 |
} |
108 | 90 |
} |
109 | 91 |
|
110 |
/* (non-Javadoc) |
|
111 |
* @see eu.etaxonomy.taxeditor.model.IContextListener#workbenchShutdown(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor) |
|
112 |
*/ |
|
113 | 92 |
@Override |
114 | 93 |
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) { |
115 | 94 |
} |
116 | 95 |
|
117 |
/** |
|
118 |
* @return the conversationHolder |
|
119 |
*/ |
|
120 | 96 |
public ConversationHolder getConversationHolder() { |
121 | 97 |
if(CdmStore.isActive() && conversationHolder==null){ |
122 | 98 |
initConversation(); |
123 | 99 |
} |
124 | 100 |
return conversationHolder; |
125 | 101 |
} |
102 |
|
|
103 |
/** |
|
104 |
* {@inheritDoc} |
|
105 |
*/ |
|
106 |
@Override |
|
107 |
public void dispose() { |
|
108 |
if(conversationHolder!=null){ |
|
109 |
conversationHolder.close(); |
|
110 |
} |
|
111 |
} |
|
126 | 112 |
} |
Also available in: Unified diff
Close conversation when closing DerivateSearchView