View | Details | Raw Unified | Return to bug 163883
Collapse All | Expand All

(-)src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java (-2 / +16 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType 
14
 * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType 
15
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
15
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
16
 * Kevin Doyle (IBM) - [163883] Multiple filter strings are disabled
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.persistence.dom;
19
package org.eclipse.rse.internal.persistence.dom;
Lines 28-34 Link Here
28
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
29
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
29
import org.eclipse.rse.core.filters.ISystemFilterString;
30
import org.eclipse.rse.core.filters.ISystemFilterString;
30
import org.eclipse.rse.core.model.IHost;
31
import org.eclipse.rse.core.model.IHost;
31
import org.eclipse.rse.core.model.IProperty;
32
import org.eclipse.rse.core.model.IPropertySet;
32
import org.eclipse.rse.core.model.IPropertySet;
33
import org.eclipse.rse.core.model.IPropertyType;
33
import org.eclipse.rse.core.model.IPropertyType;
34
import org.eclipse.rse.core.model.IRSEModelObject;
34
import org.eclipse.rse.core.model.IRSEModelObject;
Lines 201-209 Link Here
201
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filterPool.isSetStringsCaseSensitive()));
201
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filterPool.isSetStringsCaseSensitive()));
202
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filterPool.supportsDuplicateFilterStrings()));
202
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filterPool.supportsDuplicateFilterStrings()));
203
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, Integer.toString(filterPool.getRelease()));
203
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, Integer.toString(filterPool.getRelease()));
204
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(filterPool.isSetSingleFilterStringOnly()));
205
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME, filterPool.getOwningParentName());
204
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME, filterPool.getOwningParentName());
206
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filterPool.isNonRenamable()));
205
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filterPool.isNonRenamable()));
206
			
207
			boolean isSingleFilterStringOnly = false;
208
			boolean isSingleFilterStringOnlyESet = filterPool.isSetSingleFilterStringOnly();
209
			
210
			// if ESet is true then calling isSingleFilterStringOnly() will return
211
			// the value stored in the filter pool and not in the fp manager
212
			// in the false case isSingleFilterStringOnly should be false as that what it is by default
213
			if (isSingleFilterStringOnlyESet)
214
				isSingleFilterStringOnly = filterPool.isSingleFilterStringOnly();
215
			else
216
				isSingleFilterStringOnly = false;
217
			
218
			node.addAttribute("singleFilterStringOnlyESet", getBooleanString(isSingleFilterStringOnlyESet)); //$NON-NLS-1$
219
			node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(isSingleFilterStringOnly));
220
			
207
		}
221
		}
208
		ISystemFilter[] filters = filterPool.getSystemFilters();
222
		ISystemFilter[] filters = filterPool.getSystemFilters();
209
		for (int i = 0; i < filters.length; i++) {
223
		for (int i = 0; i < filters.length; i++) {
(-)src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java (-2 / +26 lines)
Lines 14-19 Link Here
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
16
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
16
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
17
 * Kevin Doyle (IBM) - [163883] Multiple filter strings are disabled
17
 ********************************************************************************/
18
 ********************************************************************************/
18
19
19
package org.eclipse.rse.internal.persistence.dom;
20
package org.eclipse.rse.internal.persistence.dom;
Lines 353-359 Link Here
353
		boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue());
354
		boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue());
354
		boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue());
355
		boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue());
355
		int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue());
356
		int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue());
356
		boolean isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue());
357
		
358
		// Since old profiles won't have an "singleFilterStringOnlyESet" attribute
359
		// we must give it a default value.
360
		// False has been chosen because if the persistence is not correct then we
361
		// don't know what the proper value should be, so
362
		// we want it to check with the filter pool manager to decide
363
		// if multi filter strings are allowed
364
		boolean isSingleFilterStringOnlyESet = false;
365
		boolean isSetSingleFilterStringOnly = false;
366
		RSEDOMNodeAttribute attribute = node.getAttribute("singleFilterStringOnlyESet"); //$NON-NLS-1$
367
		if (attribute != null)
368
		{
369
			isSingleFilterStringOnlyESet = getBooleanValue(attribute.getValue());
370
			isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue());
371
		}
372
		
357
		String owningParentName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME).getValue();
373
		String owningParentName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME).getValue();
358
		boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue());
374
		boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue());
359
375
Lines 379-385 Link Here
379
				filterPool.setStringsCaseSensitive(isSetStringsCaseSensitive);
395
				filterPool.setStringsCaseSensitive(isSetStringsCaseSensitive);
380
				filterPool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings);
396
				filterPool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings);
381
				filterPool.setRelease(release);
397
				filterPool.setRelease(release);
382
				filterPool.setSingleFilterStringOnly(isSetSingleFilterStringOnly);
398
				
399
				// if single filter string only has been set in the past then set
400
				// the value to the persisted one which will set ESet to true
401
				// In the false case we don't do anything because the persistence
402
				// could be messed up or ESet has never been set before
403
				// in which case single filter string only should be false
404
				if (isSingleFilterStringOnlyESet)
405
					filterPool.setSingleFilterStringOnly(isSetSingleFilterStringOnly);
406
				
383
				filterPool.setOwningParentName(owningParentName);
407
				filterPool.setOwningParentName(owningParentName);
384
				filterPool.setNonRenamable(isNonRenamable);
408
				filterPool.setNonRenamable(isNonRenamable);
385
//				filterPool.wasRestored();
409
//				filterPool.wasRestored();

Return to bug 163883