|
Lines 34-39
Link Here
|
| 34 |
import org.eclipse.ui.IWorkbenchActionConstants; |
34 |
import org.eclipse.ui.IWorkbenchActionConstants; |
| 35 |
import org.eclipse.ui.IWorkbenchPage; |
35 |
import org.eclipse.ui.IWorkbenchPage; |
| 36 |
import org.eclipse.ui.PlatformUI; |
36 |
import org.eclipse.ui.PlatformUI; |
|
|
37 |
import org.eclipse.ui.actions.ActionFactory; |
| 37 |
import org.eclipse.ui.actions.BaseSelectionListenerAction; |
38 |
import org.eclipse.ui.actions.BaseSelectionListenerAction; |
| 38 |
import org.eclipse.ui.part.ViewPart; |
39 |
import org.eclipse.ui.part.ViewPart; |
| 39 |
|
40 |
|
|
Lines 175-184
Link Here
|
| 175 |
|
176 |
|
| 176 |
makeActions(); |
177 |
makeActions(); |
| 177 |
hookContextMenu(); |
178 |
hookContextMenu(); |
|
|
179 |
hookGlobalActions(); |
| 178 |
contributeToActionBars(); |
180 |
contributeToActionBars(); |
| 179 |
getSite().setSelectionProvider(getViewer()); |
181 |
getSite().setSelectionProvider(getViewer()); |
| 180 |
} |
182 |
} |
| 181 |
|
183 |
|
|
|
184 |
private void hookGlobalActions() { |
| 185 |
IActionBars bars = getViewSite().getActionBars(); |
| 186 |
bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteRepositoryAction); |
| 187 |
bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), resetConfigurationAction); |
| 188 |
} |
| 189 |
|
| 182 |
private void makeActions() { |
190 |
private void makeActions() { |
| 183 |
deleteRepositoryAction = new DeleteTaskRepositoryAction(); |
191 |
deleteRepositoryAction = new DeleteTaskRepositoryAction(); |
| 184 |
viewer.addSelectionChangedListener(deleteRepositoryAction); |
192 |
viewer.addSelectionChangedListener(deleteRepositoryAction); |