Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 206511 | Differences between
and this patch

Collapse All | Expand All

(-)src-common-external/org/eclipse/tptp/platform/common/ui/trace/internal/CommonUITraceMessages.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/********************************************************************** 
1
/********************************************************************** 
2
 * Copyright (c) 2006, 2007 IBM Corporation and others. 
2
 * Copyright (c) 2006, 2008 IBM Corporation and others. 
3
 * All rights reserved.   This program and the accompanying materials 
3
 * All rights reserved.   This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0 
4
 * are made available under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution, and is available at 
5
 * which accompanies this distribution, and is available at 
Lines 29-34 Link Here
29
	public static String DEL_TITLE;
29
	public static String DEL_TITLE;
30
	public static String CONFIRM_DELM;
30
	public static String CONFIRM_DELM;
31
	public static String CONFIRM_LOG_DEL;
31
	public static String CONFIRM_LOG_DEL;
32
	public static String CONFIRM_SYMPTOMCATALOG_DEL;
32
	public static String DEL_RSP;
33
	public static String DEL_RSP;
33
	public static String NDEL_RSP;
34
	public static String NDEL_RSP;
34
	public static String DEL;
35
	public static String DEL;
(-)src-common-external/org/eclipse/tptp/platform/common/ui/trace/internal/messages.properties (-2 / +3 lines)
Lines 1-5 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2006, 2007 IBM Corporation and others.
2
# Copyright (c) 2006, 2008 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 17-24 Link Here
17
LOG_MSG									= Logging Message
17
LOG_MSG									= Logging Message
18
PRO_LOG_MSG								= Profiling/Logging Message
18
PRO_LOG_MSG								= Profiling/Logging Message
19
DEL_TITLE								= Confirmation Message
19
DEL_TITLE								= Confirmation Message
20
CONFIRM_DELM							= Delete selected resource?
20
CONFIRM_DELM							= Delete selected resource(s)?
21
CONFIRM_LOG_DEL							= Delete the selected log file(s)?\nThe original log file(s) will not be affected.
21
CONFIRM_LOG_DEL							= Delete the selected log file(s)?\nThe original log file(s) will not be affected.
22
CONFIRM_SYMPTOMCATALOG_DEL				= Delete the selected symptom catalog file(s)?
22
DEL_RSP									= &Also delete contents in file system
23
DEL_RSP									= &Also delete contents in file system
23
NDEL_RSP                     			= &Do not delete contents
24
NDEL_RSP                     			= &Do not delete contents
24
DEL										= De&lete
25
DEL										= De&lete
(-)src/org/eclipse/hyades/trace/ui/internal/actions/DeleteAction.java (-2 / +35 lines)
Lines 1-5 Link Here
1
/**********************************************************************
1
/**********************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 18-23 Link Here
18
import java.util.Vector;
18
import java.util.Vector;
19
19
20
import org.eclipse.core.resources.IContainer;
20
import org.eclipse.core.resources.IContainer;
21
import org.eclipse.core.resources.IFile;
21
import org.eclipse.core.resources.IResource;
22
import org.eclipse.core.resources.IResource;
22
import org.eclipse.core.resources.IResourceStatus;
23
import org.eclipse.core.resources.IResourceStatus;
23
import org.eclipse.core.resources.ResourcesPlugin;
24
import org.eclipse.core.resources.ResourcesPlugin;
Lines 71-76 Link Here
71
72
72
	private ArrayList deletedPaths = new ArrayList();
73
	private ArrayList deletedPaths = new ArrayList();
73
74
75
	public final static String SD_FILE_EXTENSION = "trcdbxmi";
76
	public final static String SYMPTOM_FILE_EXTENSION = "symptom";
77
74
	/**
78
	/**
75
	 * This dialog box asks the user whether they also want to delete the files saved on the 
79
	 * This dialog box asks the user whether they also want to delete the files saved on the 
76
	 * file system.  This dialog box is only presented when the user saves their data and tries
80
	 * file system.  This dialog box is only presented when the user saves their data and tries
Lines 206-211 Link Here
206
		/* true if only log files are being deleted, false otherwise */
210
		/* true if only log files are being deleted, false otherwise */
207
		boolean LogDeleteDialog = true;
211
		boolean LogDeleteDialog = true;
208
		
212
		
213
		boolean isSymptomCatalogResourceIncluded = false;
214
		boolean isOnlyDeletingSymptomCatalogResource = true;
215
209
		/* Navid Mehregani - bugzilla 158564: A different dialog box should be displayed if we're only deleting
216
		/* Navid Mehregani - bugzilla 158564: A different dialog box should be displayed if we're only deleting
210
		 * log files.  This was brought up as a usability issue in the RCP log analyzer. */
217
		 * log files.  This was brought up as a usability issue in the RCP log analyzer. */
211
		for (int i = 0; i < fSelections.length; i++)
218
		for (int i = 0; i < fSelections.length; i++)
Lines 214-219 Link Here
214
221
215
			if ((sel != null) && (sel instanceof EObject))
222
			if ((sel != null) && (sel instanceof EObject))
216
			{
223
			{
224
				isOnlyDeletingSymptomCatalogResource = false;
225
217
				Vector agentTypeList = new Vector();
226
				Vector agentTypeList = new Vector();
218
				
227
				
219
				if (sel instanceof TRCMonitor)
228
				if (sel instanceof TRCMonitor)
Lines 239-244 Link Here
239
						break;  /* Break out of the first loop */
248
						break;  /* Break out of the first loop */
240
					}
249
					}
241
				}
250
				}
251
			} else if ((sel != null) && (sel instanceof IFile)) {
252
				IFile file = (IFile) sel;
253
				String ext = file.getFileExtension();
254
				if (ext != null) {
255
					if (ext.equals(SD_FILE_EXTENSION) || ext.equals(SYMPTOM_FILE_EXTENSION)) {
256
						isSymptomCatalogResourceIncluded = true;
257
					} else {
258
						isOnlyDeletingSymptomCatalogResource = false;
259
					}
260
				} else {
261
					isOnlyDeletingSymptomCatalogResource = false;
262
				}
263
			} else {
264
				isOnlyDeletingSymptomCatalogResource = false;
242
			}
265
			}
243
		}
266
		}
244
		/* End of bugzilla 158564 */
267
		/* End of bugzilla 158564 */
Lines 307-313 Link Here
307
		if (LogDeleteDialog)
330
		if (LogDeleteDialog)
308
		{
331
		{
309
			/* N.M - bugzilla 158564 */
332
			/* N.M - bugzilla 158564 */
310
			ConfirmDeletionDialog confirmDeletionDialog = new ConfirmDeletionDialog(fViewer.getViewSite().getShell(), CommonUITraceMessages.DEL_TITLE, CommonUITraceMessages.CONFIRM_LOG_DEL);
333
			String message = null;
334
			if (isSymptomCatalogResourceIncluded) {
335
				if (isOnlyDeletingSymptomCatalogResource) {
336
					message = CommonUITraceMessages.CONFIRM_SYMPTOMCATALOG_DEL;
337
				} else {
338
					message = CommonUITraceMessages.CONFIRM_DELM;
339
				}
340
			} else {
341
				message = CommonUITraceMessages.CONFIRM_LOG_DEL;
342
			}
343
			ConfirmDeletionDialog confirmDeletionDialog = new ConfirmDeletionDialog(fViewer.getViewSite().getShell(), CommonUITraceMessages.DEL_TITLE, message);
311
			if (confirmDeletionDialog.open() != 0)
344
			if (confirmDeletionDialog.open() != 0)
312
				return;
345
				return;
313
			
346
			

Return to bug 206511