1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

compilation warnings

This commit is contained in:
Andrew Gvozdev 2010-04-29 19:15:13 +00:00
parent 844ab2144c
commit cffc49b240
7 changed files with 28 additions and 20 deletions

View file

@ -370,6 +370,7 @@ public class MakeCorePlugin extends Plugin {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#startup()
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -26,6 +26,7 @@ public class MakeCDataFactory extends CDataFactory {
return fInstance;
}
@Override
public CLanguageData createLanguageData(CConfigurationData cfg,
CResourceData rcBase, CLanguageData base, String id, boolean clone) {
if(id == null)
@ -33,6 +34,7 @@ public class MakeCDataFactory extends CDataFactory {
return new MakeLanguageData(id, base);
}
@Override
public CLanguageData createLanguageData(CConfigurationData cfg,
CResourceData rcBase, String id, String name, String languageId,
int supportedKinds, String[] rcTypes, boolean isContentTypes) {

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -25,6 +25,7 @@ public class MakeDiscoveredInfoProcessor extends CDataDiscoveredInfoProcessor {
return fInstance;
}
@Override
protected void setInfoForData(CConfigurationData cfgData,
CResourceData rcData, CLanguageData data, PathInfo pi,
CResourceData baseRcData, CLanguageData baseLangData) {

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -34,6 +34,7 @@ public class MakeLanguageData extends UserAndDiscoveredEntryLanguageData {
fSupportedKinds = kinds;
}
@Override
protected void copySettingsFrom(CLanguageData data) {
super.copySettingsFrom(data);
if(data instanceof MakeLanguageData){
@ -41,6 +42,7 @@ public class MakeLanguageData extends UserAndDiscoveredEntryLanguageData {
}
}
@Override
protected ICLanguageSettingEntry[] getAllDiscoveredEntries(int kind) {
if(fDiscoveredCache != null){
int roFlag = canDisableDiscoveredEntries(kind) ? 0 : ICLanguageSettingEntry.READONLY;

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others.
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -28,6 +28,7 @@ public class MakefileReader extends LineNumberReader {
}
@Override
public String readLine() throws IOException {
boolean done = false;
StringBuffer buffer = new StringBuffer();

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2009 IBM Corporation and others.
* Copyright (c) 2004, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -11,9 +11,9 @@
package org.eclipse.cdt.make.internal.core.scannerconfig;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.IPathEntry;
@ -37,7 +37,7 @@ public class PerFileDiscoveredPathContainer extends DiscoveredPathContainer
* @see org.eclipse.cdt.core.model.IPathEntryContainerExtension#getPathEntries(org.eclipse.core.runtime.IPath, int)
*/
public IPathEntry[] getPathEntries(IPath path, int mask) {
ArrayList entries = new ArrayList();
ArrayList<IPathEntry> entries = new ArrayList<IPathEntry>();
try {
IDiscoveredPathInfo info = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(fProject);
if (info instanceof IPerFileDiscoveredPathInfo) {
@ -56,10 +56,10 @@ public class PerFileDiscoveredPathContainer extends DiscoveredPathContainer
}
}
if ((mask & IPathEntry.CDT_MACRO) != 0) {
Map syms = filePathInfo.getSymbols(path);
for (Iterator iter = syms.entrySet().iterator(); iter.hasNext(); ) {
Entry entry = (Entry)iter.next();
entries.add(CoreModel.newMacroEntry(path, (String)entry.getKey(), (String)entry.getValue()));
Map<String, String> syms = filePathInfo.getSymbols(path);
Set<Entry<String, String>> entrySet = syms.entrySet();
for (Entry<String, String> entry : entrySet) {
entries.add(CoreModel.newMacroEntry(path, entry.getKey(), entry.getValue()));
}
}
// compare the resource with include and macros files
@ -88,7 +88,7 @@ public class PerFileDiscoveredPathContainer extends DiscoveredPathContainer
catch (CoreException e) {
//
}
return (IPathEntry[]) entries.toArray(new IPathEntry[entries.size()]);
return entries.toArray(new IPathEntry[entries.size()]);
}
/* (non-Javadoc)

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -10,16 +10,17 @@
*******************************************************************************/
package org.eclipse.cdt.make.internal.core.scannerconfig.util;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.cdt.core.settings.model.CMacroEntry;
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
import org.eclipse.cdt.core.settings.model.ICMacroEntry;
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.make.core.scannerconfig.PathInfo;
import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo;
import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo;
import org.eclipse.cdt.make.core.scannerconfig.PathInfo;
import org.eclipse.core.runtime.IPath;
public class PathInfoToLangSettingsConverter {
@ -73,13 +74,13 @@ public class PathInfoToLangSettingsConverter {
return entries;
}
private static ICMacroEntry[] calculateEntries(int flags, Map map){
private static ICMacroEntry[] calculateEntries(int flags, Map<String, String> map){
ICMacroEntry entries[] = new ICMacroEntry[map.size()];
int num = 0;
for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
Map.Entry entry = (Map.Entry)iter.next();
String name = (String)entry.getKey();
String value = (String)entry.getValue();
Set<Entry<String, String>> entrySet = map.entrySet();
for (Entry<String, String> entry : entrySet) {
String name = entry.getKey();
String value = entry.getValue();
entries[num++] = new CMacroEntry(name, value, flags);
}
return entries;