1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for. Use set instead of list when collecting the shared library names: different libraries can have same soname.

This commit is contained in:
Mikhail Khodjaiants 2006-04-11 20:07:21 +00:00
parent 39e1b6c5d3
commit 12c6d13e42
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2006-04-11 Mikhail Khodjaiants
Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for.
Use set instead of list when collecting the shared library names: different libraries can have same soname.
* SolibSearchPathBlock.java
2006-04-11 Mikhail Khodjaiants 2006-04-11 Mikhail Khodjaiants
Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for. Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for.
Use soname instead of shared library name. Use soname instead of shared library name.

View file

@ -16,9 +16,11 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Observable; import java.util.Observable;
import java.util.Set;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IBinaryParser; import org.eclipse.cdt.core.IBinaryParser;
import org.eclipse.cdt.core.ICExtensionReference; import org.eclipse.cdt.core.ICExtensionReference;
@ -419,7 +421,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
protected boolean selectFromList() { protected boolean selectFromList() {
boolean changed = false; boolean changed = false;
List dirList = fDirList.getSelectedElements(); List dirList = fDirList.getSelectedElements();
final ArrayList libs = new ArrayList( 10 ); final HashSet libs = new HashSet( 10 );
if ( generateLibraryList( (IPath[])dirList.toArray( new IPath[dirList.size()] ), libs ) ) { if ( generateLibraryList( (IPath[])dirList.toArray( new IPath[dirList.size()] ), libs ) ) {
ITreeContentProvider cp = new ITreeContentProvider() { ITreeContentProvider cp = new ITreeContentProvider() {
@ -438,8 +440,8 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
} }
public Object[] getElements( Object inputElement ) { public Object[] getElements( Object inputElement ) {
if ( inputElement instanceof List ) { if ( inputElement instanceof Set ) {
return ((List)inputElement).toArray(); return ((Set)inputElement).toArray();
} }
return new Object[0]; return new Object[0];
} }
@ -474,7 +476,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
return changed; return changed;
} }
private boolean generateLibraryList( final IPath[] paths, final List libs ) { private boolean generateLibraryList( final IPath[] paths, final Set libs ) {
boolean result = true; boolean result = true;
IRunnableWithProgress runnable = new IRunnableWithProgress() { IRunnableWithProgress runnable = new IRunnableWithProgress() {