Project

General

Profile

« Previous | Next » 

Revision 38053dd0

Added by Patrick Plitzner about 7 years ago

ref #4611 Refactor string constants

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
66 66

  
67 67

  
68 68

  
69
	/* (non-Javadoc)
69
    private static final String SKIP = "Skip";
70
    private static final String DELETE = "Delete";
71
    private static final String CONFIRM_DELETION = "Confirm Deletion";
72

  
73
    /* (non-Javadoc)
70 74
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
71 75
	 */
72 76
	@Override
......
124 128
         				        if (object != null){
125 129
         				            config = new NameDeletionConfigurator();
126 130

  
127
         				            DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
131
         				            DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION,  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { DELETE, SKIP }, 0, true);
128 132
         				            int result_dialog= dialog.open();
129 133
         				            if (result_dialog != Status.OK){
130 134
         				                return null;
......
140 144
        							Synonym synonym = HibernateProxyHelper.deproxy(object, Synonym.class);
141 145
        							config = new SynonymDeletionConfigurator();
142 146
        							errorMessage = "The synonym ";
143
        							DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
147
        							DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION,  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { DELETE, SKIP }, 0, true);
144 148
                                    int result_dialog= dialog.open();
145 149
                                    if (result_dialog != Status.OK){
146 150
                                         return null;
......
159 163
        							config = new TaxonDeletionConfigurator();
160 164
        							((TaxonDeletionConfigurator) config).setDeleteInAllClassifications(true);
161 165
        							DeleteConfiguratorDialog dialog;
162
        						    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
166
        						    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION,  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { DELETE, SKIP }, 0, true);
163 167
        							int result_dialog= dialog.open();
164 168
                                    if (result_dialog != Status.OK){
165 169
                                         return null;
......
174 178
         				       config = new MediaDeletionConfigurator();
175 179
         				       Media media = HibernateProxyHelper.deproxy(object, Media.class);
176 180
         				       DeleteConfiguratorDialog dialog;
177
        					   dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
181
        					   dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION,  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { DELETE, SKIP }, 0, true);
178 182
        					   int result_dialog= dialog.open();
179 183
                               if (result_dialog != Status.OK){
180 184
                                   return null;

Also available in: Unified diff