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

[142712] predefine basic filter for non-default profiles

This commit is contained in:
David McKnight 2007-01-03 17:23:38 +00:00
parent 26f3f91c10
commit e394dfea79
2 changed files with 31 additions and 3 deletions

View file

@ -384,11 +384,24 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur
filterStrings.add(rootFilesFilterString.toString());
mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_ROOTFILES,filterStrings);
}
else
{
// create an "All"
// need at least some kind of filter predefined for any given profile
// ----------------------
// "Root Files" filter...
// ----------------------
Vector filterStrings = new Vector();
RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
rootFilesFilterString.setPath(getSeparator());
filterStrings.add(rootFilesFilterString.toString());
mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_ROOTFILES,filterStrings);
}
//else
//System.out.println("Did not create default filters because this is not the default private profile: " + mgr.getName());
} catch (Exception exc)
{
SystemBasePlugin.logError("Error creating default filter pool",exc);
SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
}
return pool;
}

View file

@ -175,8 +175,23 @@ public abstract class RemoteProcessSubSystemConfiguration extends
filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL,filterStrings);
filter.setNonChangable(true);
filter.setSingleFilterStringOnly(true);
}
} catch (Exception exc)
}
else
{
Vector filterStrings = new Vector();
// ----------------------
// "All Processes" filter...
// ----------------------
filterStrings = new Vector();
HostProcessFilterImpl allProcessesFilterString = new HostProcessFilterImpl();
filterStrings.add(allProcessesFilterString.toString());
ISystemFilter filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL,filterStrings);
filter.setNonChangable(true);
filter.setSingleFilterStringOnly(true);
}
}
catch (Exception exc)
{
SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
}