|
Lines 43-54
Link Here
|
| 43 |
IVirtualComponent referencingComponent, String containerPath) { |
43 |
IVirtualComponent referencingComponent, String containerPath) { |
| 44 |
super(p, referencingComponent); |
44 |
super(p, referencingComponent); |
| 45 |
this.containerPath = containerPath; |
45 |
this.containerPath = containerPath; |
|
|
46 |
loadContainerEntries(); |
| 47 |
} |
| 48 |
|
| 49 |
private void loadContainerEntries() { |
| 46 |
try { |
50 |
try { |
| 47 |
container = JavaCore.getClasspathContainer(new Path(containerPath), JavaCore.create(p)); |
51 |
if( container == null ) { |
| 48 |
containerEntries = container.getClasspathEntries(); |
52 |
IClasspathContainer container2 = |
| 49 |
} catch( JavaModelException jme ) { |
53 |
JavaCore.getClasspathContainer(new Path(containerPath), |
| 50 |
|
54 |
JavaCore.create(getProject())); |
| 51 |
} |
55 |
container = container2; |
|
|
56 |
containerEntries = null; |
| 57 |
} |
| 58 |
if( container != null && containerEntries == null ) { |
| 59 |
containerEntries = container.getClasspathEntries(); |
| 60 |
} |
| 61 |
} catch( JavaModelException jme ) { |
| 62 |
containerEntries = null; |
| 63 |
} |
| 52 |
} |
64 |
} |
| 53 |
|
65 |
|
| 54 |
@Override |
66 |
@Override |
|
Lines 98-107
Link Here
|
| 98 |
@Override |
110 |
@Override |
| 99 |
public IVirtualResource[] members(int memberFlags) throws CoreException { |
111 |
public IVirtualResource[] members(int memberFlags) throws CoreException { |
| 100 |
ArrayList<IVirtualFile> jars = new ArrayList<IVirtualFile>(); |
112 |
ArrayList<IVirtualFile> jars = new ArrayList<IVirtualFile>(); |
| 101 |
for( int i = 0; i < containerEntries.length; i++ ) { |
113 |
loadContainerEntries(); |
| 102 |
if( containerEntries[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) { |
114 |
if (containerEntries != null) |
| 103 |
File f = containerEntries[i].getPath().toFile(); |
115 |
{ |
| 104 |
jars.add(new AbsoluteVirtualFile(getProject(), new Path("/"), f)); //$NON-NLS-1$ |
116 |
for( int i = 0; i < containerEntries.length; i++ ) { |
|
|
117 |
if( containerEntries[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) { |
| 118 |
File f = containerEntries[i].getPath().toFile(); |
| 119 |
jars.add(new AbsoluteVirtualFile(getProject(), new Path("/"), f)); //$NON-NLS-1$ |
| 120 |
} |
| 105 |
} |
121 |
} |
| 106 |
} |
122 |
} |
| 107 |
return jars.toArray(new IVirtualFile[jars.size()]); |
123 |
return jars.toArray(new IVirtualFile[jars.size()]); |