2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.local
.view
.datasource
.e4
.handler
;
12 import org
.eclipse
.jface
.dialogs
.MessageDialog
;
13 import org
.eclipse
.swt
.widgets
.Shell
;
15 import eu
.etaxonomy
.cdm
.database
.CdmPersistentDataSource
;
16 import eu
.etaxonomy
.taxeditor
.local
.datasource
.common
.CdmDataSourceRepository
;
17 import eu
.etaxonomy
.taxeditor
.local
.view
.datasource
.CdmMetaDataAwareDataSourceContainer
;
18 import eu
.etaxonomy
.taxeditor
.local
.view
.datasource
.e4
.CdmDataSourceViewPartE4
;
26 public class DeleteDataSourceHandlerE4
extends AbstractDataSourceHandlerE4
{
32 public boolean specificExecute(CdmDataSourceViewPartE4 dataSourceViewPart
, CdmMetaDataAwareDataSourceContainer container
, Shell shell
) {
33 if(! MessageDialog
.openConfirm(shell
, "Confirm Deletion", "Do you want to delete the selected datasources?")){
36 CdmPersistentDataSource dataSource
= (CdmPersistentDataSource
) container
.getCdmSource();
37 CdmDataSourceRepository
.delete(dataSource
);