1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

fix for Bug 161936

This commit is contained in:
David McKnight 2006-10-23 14:47:30 +00:00
parent 962e32e92c
commit a1cc2c6641
3 changed files with 14 additions and 4 deletions

View file

@ -149,6 +149,7 @@ public abstract class AbstractDStoreService implements IDStoreService
}
catch (Exception e)
{
e.printStackTrace();
}
}
return new DataElement[0];

View file

@ -53,6 +53,10 @@ public class DStoreHostFile implements IHostFile
public static String getNameFromPath(String path)
{
int lastSlash = path.lastIndexOf('/');
if (lastSlash == -1) // account for windows
{
lastSlash = path.lastIndexOf('\\');
}
if (lastSlash > 0 && lastSlash != path.length() - 1)
{
return path.substring(lastSlash);
@ -63,6 +67,10 @@ public class DStoreHostFile implements IHostFile
public static String getParentPathFromPath(String path)
{
int lastSlash = path.lastIndexOf('/');
if (lastSlash == -1) // acount for windows
{
lastSlash = path.lastIndexOf('\\');
}
if (lastSlash > 0 && lastSlash != path.length() - 1)
{
return path.substring(0, lastSlash);

View file

@ -699,17 +699,18 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
if (filter.isPromptable() || !doesFilterTypeMatch(filter, remoteObjectAbsoluteName))
return false;
boolean would = false;
ISystemFilterString[] strings = filter.getSystemFilterStrings();
String[] strings = filter.getFilterStrings();
if (strings != null)
{
for (int idx=0; !would && (idx<strings.length); idx++)
{
if (strings[idx].getString().equals("*"))
if (strings[idx].equals("*"))
would = true;
else if (strings[idx].getString().equals("./*"))
else if (strings[idx].equals("./*"))
would = true;
else
would = doesFilterStringMatch(strings[idx].getString(), remoteObjectAbsoluteName, strings[idx].getParentSystemFilter().areStringsCaseSensitive());
would = doesFilterStringMatch(strings[idx], remoteObjectAbsoluteName, filter.areStringsCaseSensitive());
}
}
return would;