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 312054 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElement.java (-1 / +11 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 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 394-399 Link Here
394
	}
394
	}
395
395
396
	/**
396
	/**
397
	 * Sets the parent container.
398
	 * 
399
	 * @param parent the parent container
400
	 * @since 3.7
401
	 */
402
	protected void setParentContainer(CPUserLibraryElement parent) {
403
		fParentContainer= parent;
404
	}
405
406
	/**
397
	 * Notifies that an attribute has changed
407
	 * Notifies that an attribute has changed
398
	 *
408
	 *
399
	 * @param key the changed key
409
	 * @param key the changed key
(-)ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPUserLibraryElement.java (-1 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 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 84-94 Link Here
84
		}
84
		}
85
	}
85
	}
86
86
87
	/**
88
	 * Creates the new library element with the given name and children elements, also sets itself as the parent
89
	 * container to all the given children elements.
90
	 * 
91
	 * @param name the name of the library element
92
	 * @param isSystemLibrary <code>true</code> if the library is a system library,
93
	 *            <code>false</code> otherwise
94
	 * @param children the children elements of the library element or <code>null</code>
95
	 */
87
	public CPUserLibraryElement(String name, boolean isSystemLibrary, CPListElement[] children) {
96
	public CPUserLibraryElement(String name, boolean isSystemLibrary, CPListElement[] children) {
88
		fName= name;
97
		fName= name;
89
		fChildren= new ArrayList();
98
		fChildren= new ArrayList();
90
		if (children != null) {
99
		if (children != null) {
91
			for (int i= 0; i < children.length; i++) {
100
			for (int i= 0; i < children.length; i++) {
101
				Object container= children[i].getParentContainer();
102
				if (!(container instanceof CPUserLibraryElement))
103
					continue;
104
				CPUserLibraryElement libraryElement= (CPUserLibraryElement)container;
105
				if (!libraryElement.getName().equals(name))
106
					children[i].setParentContainer(this);
92
				fChildren.add(children[i]);
107
				fChildren.add(children[i]);
93
			}
108
			}
94
		}
109
		}

Return to bug 312054