mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 06:55:23 +02:00
[334837] Ordering of Library list entries incorrect after migration
This commit is contained in:
parent
1bccd4eeaa
commit
ffc18ac763
2 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -15,19 +15,21 @@
|
||||||
* Martin Oberhuber (Wind River) - Added Javadoc.
|
* Martin Oberhuber (Wind River) - Added Javadoc.
|
||||||
* David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
|
* David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
|
||||||
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
|
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
|
||||||
|
* David McKnight (IBM) - [334837] Ordering of Library list entries incorrect after migration
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.model;
|
package org.eclipse.rse.core.model;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Observable;
|
import java.util.Observable;
|
||||||
import java.util.Observer;
|
import java.util.Observer;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Hashmap based implementation of the {@link IPropertySet} interface.
|
* A LinkedHashmap based implementation of the {@link IPropertySet} interface.
|
||||||
*
|
*
|
||||||
* Not thread-safe since the underlying {@link java.util.HashMap} is
|
* Not thread-safe since the underlying {@link java.util.HashMap} is
|
||||||
* not thread-safe.
|
* not thread-safe.
|
||||||
|
@ -51,7 +53,7 @@ public class PropertySet extends RSEModelObject implements IPropertySet, IRSEMod
|
||||||
public PropertySet(IPropertySet propertySet) {
|
public PropertySet(IPropertySet propertySet) {
|
||||||
_name = propertySet.getName();
|
_name = propertySet.getName();
|
||||||
_description = propertySet.getDescription();
|
_description = propertySet.getDescription();
|
||||||
_properties = new HashMap();
|
_properties = new LinkedHashMap();
|
||||||
if (propertySet instanceof ILabeledObject) {
|
if (propertySet instanceof ILabeledObject) {
|
||||||
ILabeledObject p = (ILabeledObject) propertySet;
|
ILabeledObject p = (ILabeledObject) propertySet;
|
||||||
_label = p.getLabel();
|
_label = p.getLabel();
|
||||||
|
@ -72,7 +74,7 @@ public class PropertySet extends RSEModelObject implements IPropertySet, IRSEMod
|
||||||
*/
|
*/
|
||||||
public PropertySet(String name) {
|
public PropertySet(String name) {
|
||||||
_name = name;
|
_name = name;
|
||||||
_properties = new HashMap();
|
_properties = new LinkedHashMap();
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +112,7 @@ public class PropertySet extends RSEModelObject implements IPropertySet, IRSEMod
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProperties(Map map) {
|
public void setProperties(Map map) {
|
||||||
_properties = new HashMap(map.size());
|
_properties = new LinkedHashMap(map.size());
|
||||||
for (Iterator z = map.keySet().iterator(); z.hasNext();) {
|
for (Iterator z = map.keySet().iterator(); z.hasNext();) {
|
||||||
String key = (String) z.next();
|
String key = (String) z.next();
|
||||||
Object value = map.get(key);
|
Object value = map.get(key);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
|
* Copyright (c) 2006, 2011 IBM Corporation. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -13,13 +13,14 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||||
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
|
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
|
||||||
|
* David McKnight (IBM) - [334837] Ordering of Library list entries incorrect after migration
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.model;
|
package org.eclipse.rse.core.model;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ public abstract class PropertySetContainer extends RSEPersistableObject implemen
|
||||||
private Map _propertySets;
|
private Map _propertySets;
|
||||||
|
|
||||||
public PropertySetContainer() {
|
public PropertySetContainer() {
|
||||||
_propertySets = new HashMap();
|
_propertySets = new LinkedHashMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IPropertySet[] getPropertySets() {
|
public IPropertySet[] getPropertySets() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue