1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

cleanup: generics + loops to enhanced

This commit is contained in:
Andrew Gvozdev 2009-10-03 05:21:08 +00:00
parent e922ea8c0c
commit 643d18269f

View file

@ -22,7 +22,7 @@ import org.eclipse.core.runtime.IPath;
public class CDefaultFolderData extends CFolderData { public class CDefaultFolderData extends CFolderData {
protected IPath fPath; protected IPath fPath;
// protected boolean fIsExcluded; // protected boolean fIsExcluded;
protected List fLanguageDatas = new ArrayList(); protected List<CLanguageData> fLanguageDatas = new ArrayList<CLanguageData>();
protected String fName; protected String fName;
protected String fId; protected String fId;
protected CConfigurationData fCfg; protected CConfigurationData fCfg;
@ -52,8 +52,8 @@ public class CDefaultFolderData extends CFolderData {
protected void copyDataFrom(CFolderData base, boolean clone){ protected void copyDataFrom(CFolderData base, boolean clone){
if(base != null){ if(base != null){
CLanguageData lDatas[] = base.getLanguageDatas(); CLanguageData lDatas[] = base.getLanguageDatas();
for(int i = 0; i < lDatas.length; i++){ for (CLanguageData lData : lDatas) {
fLanguageDatas.add(copyLanguageData(lDatas[i], clone)); fLanguageDatas.add(copyLanguageData(lData, clone));
} }
// fIsExcluded = base.isExcluded(); // fIsExcluded = base.isExcluded();
@ -66,7 +66,7 @@ public class CDefaultFolderData extends CFolderData {
@Override @Override
public CLanguageData[] getLanguageDatas() { public CLanguageData[] getLanguageDatas() {
return (CLanguageData[])fLanguageDatas.toArray(new CLanguageData[fLanguageDatas.size()]); return fLanguageDatas.toArray(new CLanguageData[fLanguageDatas.size()]);
} }
@Override @Override
@ -149,8 +149,8 @@ public class CDefaultFolderData extends CFolderData {
return true; return true;
CLanguageData lDatas[] = getLanguageDatas(); CLanguageData lDatas[] = getLanguageDatas();
for(int i = 0; i < lDatas.length; i++){ for (CLanguageData lData : lDatas) {
if(fFactory.isModified(lDatas[i])) if(fFactory.isModified(lData))
return true; return true;
} }
@ -162,8 +162,8 @@ public class CDefaultFolderData extends CFolderData {
if(!modified){ if(!modified){
CLanguageData lDatas[] = getLanguageDatas(); CLanguageData lDatas[] = getLanguageDatas();
for(int i = 0; i < lDatas.length; i++){ for (CLanguageData lData : lDatas) {
fFactory.setModified(lDatas[i], false); fFactory.setModified(lData, false);
} }
} }