mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Applied patch from Tracy Miranda (bug 86540: NPE in CProjectSourceLocation).
Check for the project and synchronization are added to "initializeFolders".
This commit is contained in:
parent
6dc9b768e8
commit
1a8eee1a13
2 changed files with 28 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-02-24 Mikhail Khodjaiants
|
||||||
|
Applied patch from Tracy Miranda (bug 86540: NPE in CProjectSourceLocation).
|
||||||
|
Check for the project and synchronization are added to "initializeFolders".
|
||||||
|
* CProjectSourceLocation.java
|
||||||
|
|
||||||
2005-02-22 Mikhail Khodjaiants
|
2005-02-22 Mikhail Khodjaiants
|
||||||
Bug 84799: Implement Memory View and renderings with new rendering APIs.
|
Bug 84799: Implement Memory View and renderings with new rendering APIs.
|
||||||
* CMemoryBlockExtensionRetrieval.java
|
* CMemoryBlockExtensionRetrieval.java
|
||||||
|
|
|
@ -186,7 +186,9 @@ public class CProjectSourceLocation implements IProjectSourceLocation
|
||||||
{
|
{
|
||||||
if ( list.size() > 0 && !searchForDuplicateFiles() )
|
if ( list.size() > 0 && !searchForDuplicateFiles() )
|
||||||
break;
|
break;
|
||||||
IPath path = folders[i].getLocation().append( fileName );
|
IPath path = folders[i].getLocation();
|
||||||
|
if ( path != null ) {
|
||||||
|
path = path.append( fileName );
|
||||||
File file = new File( path.toOSString() );
|
File file = new File( path.toOSString() );
|
||||||
if ( file.exists() )
|
if ( file.exists() )
|
||||||
{
|
{
|
||||||
|
@ -200,6 +202,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ( list.size() > 0 ) ? ( ( list.size() == 1 ) ? list.getFirst() : list ) : null;
|
return ( list.size() > 0 ) ? ( ( list.size() == 1 ) ? list.getFirst() : list ) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +354,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation
|
||||||
private void initializeFolders()
|
private void initializeFolders()
|
||||||
{
|
{
|
||||||
final LinkedList list = new LinkedList();
|
final LinkedList list = new LinkedList();
|
||||||
if ( getProject() != null )
|
if ( getProject() != null && getProject().exists() )
|
||||||
{
|
{
|
||||||
list.add( getProject() );
|
list.add( getProject() );
|
||||||
try
|
try
|
||||||
|
@ -379,8 +382,14 @@ public class CProjectSourceLocation implements IProjectSourceLocation
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
synchronized( this )
|
||||||
|
{
|
||||||
|
if ( fFolders == null )
|
||||||
|
{
|
||||||
fFolders = (IResource[])list.toArray( new IResource[list.size()] );
|
fFolders = (IResource[])list.toArray( new IResource[list.size()] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected IResource[] getFolders()
|
protected IResource[] getFolders()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue