mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Compiler warnings.
This commit is contained in:
parent
8517a2d791
commit
b0780772c9
2 changed files with 69 additions and 71 deletions
|
@ -40,15 +40,14 @@ public final class CExternalSetting implements ICExternalSetting {
|
|||
initEntryStore(entries);
|
||||
}
|
||||
|
||||
public CExternalSetting(String[] languageIDs,
|
||||
String[] contentTypeIds, String[] extensions,
|
||||
public CExternalSetting(String[] languageIDs, String[] contentTypeIds, String[] extensions,
|
||||
ICSettingEntry[] entries) {
|
||||
if (languageIDs != null)
|
||||
fLanguageIds = (String[])languageIDs.clone();
|
||||
fLanguageIds = languageIDs.clone();
|
||||
if (contentTypeIds != null)
|
||||
fContentTypeIds = (String[])contentTypeIds.clone();
|
||||
fContentTypeIds = contentTypeIds.clone();
|
||||
if (extensions != null)
|
||||
fExtensions = (String[])extensions.clone();
|
||||
fExtensions = extensions.clone();
|
||||
|
||||
initEntryStore(entries);
|
||||
}
|
||||
|
@ -68,15 +67,15 @@ public final class CExternalSetting implements ICExternalSetting {
|
|||
getEntriesSet(entry.getKind(), true).addEntry(entry);
|
||||
}
|
||||
|
||||
/* private void trimToSize(){
|
||||
int kinds[] = KindBasedStore.getSupportedKinds();
|
||||
for(int i = 0; i < kinds.length; i++){
|
||||
CEntriesSet set = getEntriesSet(kinds[i], false);
|
||||
if(set != null)
|
||||
set.trimToSize();
|
||||
}
|
||||
}
|
||||
*/
|
||||
// private void trimToSize() {
|
||||
// int kinds[] = KindBasedStore.getSupportedKinds();
|
||||
// for (int i = 0; i < kinds.length; i++) {
|
||||
// CEntriesSet set = getEntriesSet(kinds[i], false);
|
||||
// if (set != null)
|
||||
// set.trimToSize();
|
||||
// }
|
||||
// }
|
||||
|
||||
private CEntriesSet getEntriesSet(int kind, boolean create) {
|
||||
CEntriesSet set = (CEntriesSet)fStore.get(kind);
|
||||
if (set == null && create) {
|
||||
|
@ -88,19 +87,19 @@ public final class CExternalSetting implements ICExternalSetting {
|
|||
|
||||
public String[] getCompatibleContentTypeIds() {
|
||||
if (fContentTypeIds != null)
|
||||
return (String[])fContentTypeIds.clone();
|
||||
return fContentTypeIds.clone();
|
||||
return null;
|
||||
}
|
||||
|
||||
public String[] getCompatibleExtensions() {
|
||||
if (fExtensions != null)
|
||||
return (String[])fExtensions.clone();
|
||||
return fExtensions.clone();
|
||||
return null;
|
||||
}
|
||||
|
||||
public String[] getCompatibleLanguageIds() {
|
||||
if (fLanguageIds != null)
|
||||
return (String[])fLanguageIds.clone();
|
||||
return fLanguageIds.clone();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -116,7 +115,7 @@ public final class CExternalSetting implements ICExternalSetting {
|
|||
// }
|
||||
|
||||
public ICSettingEntry[] getEntries() {
|
||||
List result = new ArrayList();
|
||||
List<ICSettingEntry> result = new ArrayList<ICSettingEntry>();
|
||||
int kinds[] = KindBasedStore.getAllEntryKinds();
|
||||
for (int i = 0; i < kinds.length; i++) {
|
||||
CEntriesSet list = getEntriesSet(kinds[i], false);
|
||||
|
@ -124,6 +123,6 @@ public final class CExternalSetting implements ICExternalSetting {
|
|||
result.addAll(Arrays.asList(list.toArray()));
|
||||
}
|
||||
|
||||
return (ICSettingEntry[])result.toArray(new ICSettingEntry[result.size()]);
|
||||
return result.toArray(new ICSettingEntry[result.size()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,15 +103,15 @@ public final class CProjectDescriptionEvent {
|
|||
}
|
||||
} else if (newCfg == null) {
|
||||
delta = new CProjectDescriptionDelta(null, oldCfg);
|
||||
} else {
|
||||
if(newCfg.getId().equals(oldCfg.getId())){
|
||||
} else if (newCfg.getId().equals(oldCfg.getId())) {
|
||||
delta = findCfgDelta(fProjDelta, newCfg.getId());
|
||||
} else {
|
||||
delta = CProjectDescriptionManager.getInstance().createDelta(newCfg, oldCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COPY_CREATED:
|
||||
break;
|
||||
}
|
||||
|
@ -145,5 +145,4 @@ public final class CProjectDescriptionEvent {
|
|||
public ICProjectDescription getAppliedCProjectDescription() {
|
||||
return fAppliedDescription;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue