mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
cosmetics: enhanced loops etc
This commit is contained in:
parent
257f512b69
commit
37c2c68fbd
1 changed files with 30 additions and 31 deletions
|
@ -74,8 +74,8 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
|
|||
PathEntryStoreChangedEvent evt = new PathEntryStoreChangedEvent(this, project, PathEntryStoreChangedEvent.CONTENT_CHANGED);
|
||||
IPathEntryStoreListener[] observers = new IPathEntryStoreListener[fListeners.size()];
|
||||
fListeners.toArray(observers);
|
||||
for (int i = 0; i < observers.length; i++) {
|
||||
observers[i].pathEntryStoreChanged(evt);
|
||||
for (IPathEntryStoreListener observer : observers) {
|
||||
observer.pathEntryStoreChanged(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
|
|||
PathEntryStoreChangedEvent evt = new PathEntryStoreChangedEvent(this, fProject, PathEntryStoreChangedEvent.STORE_CLOSED);
|
||||
IPathEntryStoreListener[] observers = new IPathEntryStoreListener[fListeners.size()];
|
||||
fListeners.toArray(observers);
|
||||
for (int i = 0; i < observers.length; i++) {
|
||||
observers[i].pathEntryStoreChanged(evt);
|
||||
for (IPathEntryStoreListener observer : observers) {
|
||||
observer.pathEntryStoreChanged(evt);
|
||||
}
|
||||
CProjectDescriptionManager.getInstance().removeCProjectDescriptionListener(this);
|
||||
}
|
||||
|
@ -119,9 +119,9 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
|
|||
List<IPathEntry> sysList = es[1];
|
||||
List<IPathEntry> usrList = es[0];
|
||||
List<IPathEntry> newUsrList = new ArrayList<IPathEntry>(entries.length);
|
||||
for(int i = 0; i < entries.length; i++){
|
||||
if(entries[i].getEntryKind() != IPathEntry.CDT_CONTAINER)
|
||||
newUsrList.add(entries[i]);
|
||||
for (IPathEntry entry : entries) {
|
||||
if(entry.getEntryKind() != IPathEntry.CDT_CONTAINER)
|
||||
newUsrList.add(entry);
|
||||
}
|
||||
|
||||
if(!newUsrList.equals(usrList)){
|
||||
|
@ -135,8 +135,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
|
|||
ReferenceSettingsInfo rInfo = tr.applyPathEntries(usrEntries, sysEntries, PathEntryTranslator.OP_REPLACE);
|
||||
cfgDes.removeExternalSettings();
|
||||
ICExternalSetting extSettings[] = rInfo.getExternalSettings();
|
||||
for(int i = 0; i < extSettings.length; i++){
|
||||
ICExternalSetting setting = extSettings[i];
|
||||
for (ICExternalSetting setting : extSettings) {
|
||||
cfgDes.createExternalSetting(setting.getCompatibleLanguageIds(),
|
||||
setting.getCompatibleContentTypeIds(),
|
||||
setting.getCompatibleExtensions(),
|
||||
|
@ -152,8 +151,8 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
|
|||
|
||||
private static void clearCachedEntries(ICProjectDescription des){
|
||||
ICConfigurationDescription[] cfgDess = des.getConfigurations();
|
||||
for(int i = 0; i < cfgDess.length; i++){
|
||||
setCachedEntries(cfgDess[i], null);
|
||||
for (ICConfigurationDescription cfgDes : cfgDess) {
|
||||
setCachedEntries(cfgDes, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue