1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 20:45:22 +02:00

extra checking needed in case element is deleted

This commit is contained in:
David McKnight 2007-07-24 19:18:47 +00:00
parent f015bc5c20
commit 64a20e4300

View file

@ -86,7 +86,7 @@ public class DStoreHostFile implements IHostFile
public String getName() public String getName()
{ {
String type = _element.getType(); String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) if (type != null && type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
{ {
// filter doesn't separate path from name // filter doesn't separate path from name
String path = _element.getName(); String path = _element.getName();
@ -123,7 +123,7 @@ public class DStoreHostFile implements IHostFile
public String getParentPath() public String getParentPath()
{ {
String type = _element.getType(); String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) if (type != null && type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
{ {
// filter doesn't separate path from name // filter doesn't separate path from name
String path = _element.getName(); String path = _element.getName();
@ -179,8 +179,8 @@ public class DStoreHostFile implements IHostFile
public boolean isDirectory() public boolean isDirectory()
{ {
String type = _element.getType(); String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) if (type != null && (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
|| type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)))
{ {
return true; return true;
} }
@ -210,7 +210,7 @@ public class DStoreHostFile implements IHostFile
public boolean isFile() public boolean isFile()
{ {
String type = _element.getType(); String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) if (type != null && type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
|| type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
|| type.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
{ {