Skip to content

Commit bda0ae2

Browse files
SougandhSlaeubi
authored andcommitted
Fix typo in breakpoint attribute
Preserve attribute value "Persistent" for backward compatibility
1 parent 3a78e10 commit bda0ae2

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/IImportExportConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2009 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -136,7 +136,7 @@ public interface IImportExportConstants {
136136
/**
137137
* The name of the persistent attribute for breakpoint information
138138
*/
139-
String IE_BP_PERSISTANT = "persistant"; //$NON-NLS-1$
139+
String IE_BP_PERSISTENT = "persistent"; //$NON-NLS-1$
140140

141141
/**
142142
* The default file extension for breakpoint export files

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005, 2022 IBM Corporation and others.
2+
* Copyright (c) 2005, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -100,7 +100,7 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException {
100100
IMemento root = memento.createChild(IImportExportConstants.IE_NODE_BREAKPOINT);
101101
root.putString(IImportExportConstants.IE_BP_ENABLED, Boolean.toString(breakpoint.isEnabled()));
102102
root.putString(IImportExportConstants.IE_BP_REGISTERED, Boolean.toString(breakpoint.isRegistered()));
103-
root.putString(IImportExportConstants.IE_BP_PERSISTANT, Boolean.toString(breakpoint.isPersisted()));
103+
root.putString(IImportExportConstants.IE_BP_PERSISTENT, Boolean.toString(breakpoint.isPersisted()));
104104
//write out the resource information
105105
IResource resource = marker.getResource();
106106
IMemento child = root.createChild(IImportExportConstants.IE_NODE_RESOURCE);

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005, 2022 IBM Corporation and others.
2+
* Copyright (c) 2005, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -272,7 +272,12 @@ protected Map<String, Object> collectBreakpointProperties(IMemento memento) {
272272

273273
//collect attributes from the 'breakpoint' node
274274
map.put(IImportExportConstants.IE_BP_ENABLED, memento.getBoolean(IImportExportConstants.IE_BP_ENABLED));
275-
map.put(IImportExportConstants.IE_BP_PERSISTANT, memento.getBoolean(IImportExportConstants.IE_BP_PERSISTANT));
275+
if (memento.getBoolean(IImportExportConstants.IE_BP_PERSISTENT) != null) {
276+
map.put(IImportExportConstants.IE_BP_PERSISTENT,
277+
memento.getBoolean(IImportExportConstants.IE_BP_PERSISTENT));
278+
} else {
279+
map.put(IImportExportConstants.IE_BP_PERSISTENT, memento.getBoolean("persistant")); //$NON-NLS-1$
280+
}
276281
map.put(IImportExportConstants.IE_BP_REGISTERED, memento.getBoolean(IImportExportConstants.IE_BP_REGISTERED));
277282

278283
//collect attributes from the 'marker' node
@@ -338,7 +343,7 @@ protected void restoreBreakpoint(IMarker marker, final Map<String, Object> attri
338343
// create the breakpoint
339344
breakpoint = fManager.createBreakpoint(marker);
340345
breakpoint.setEnabled(((Boolean)attributes.get(IImportExportConstants.IE_BP_ENABLED)).booleanValue());
341-
breakpoint.setPersisted(((Boolean)attributes.get(IImportExportConstants.IE_BP_PERSISTANT)).booleanValue());
346+
breakpoint.setPersisted(((Boolean)attributes.get(IImportExportConstants.IE_BP_PERSISTENT)).booleanValue());
342347
breakpoint.setRegistered(((Boolean)attributes.get(IImportExportConstants.IE_BP_REGISTERED)).booleanValue());
343348
fAdded.add(breakpoint);
344349
if (fImportBreakpoints && fCreateWorkingSets && fCurrentWorkingSetProperty != null) {

0 commit comments

Comments
 (0)