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

fix warnings (imports, string externalization)

This commit is contained in:
Andrew Ferguson 2007-05-30 14:41:47 +00:00
parent 549dd3dc9d
commit d94ffa1869
30 changed files with 12 additions and 42 deletions

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener; import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager; import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
import org.eclipse.cdt.core.settings.model.ICSettingEntry; import org.eclipse.cdt.core.settings.model.ICSettingEntry;
import org.eclipse.cdt.core.settings.model.WriteAccessException;
import org.eclipse.cdt.internal.core.model.APathEntry; import org.eclipse.cdt.internal.core.model.APathEntry;
import org.eclipse.cdt.internal.core.model.BatchOperation; import org.eclipse.cdt.internal.core.model.BatchOperation;
import org.eclipse.cdt.internal.core.model.CModel; import org.eclipse.cdt.internal.core.model.CModel;
@ -51,7 +50,6 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.content.IContentType; import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.ISchedulingRule;

View file

@ -12,8 +12,6 @@ package org.eclipse.cdt.core.model;
*******************************************************************************/ *******************************************************************************/
import java.util.EventObject; import java.util.EventObject;
import org.eclipse.cdt.internal.core.model.CShiftData;
/** /**
* An element changed event describes a change to the structure or contents * An element changed event describes a change to the structure or contents
* of a tree of C elements. The changes to the elements are described by * of a tree of C elements. The changes to the elements are described by

View file

@ -13,7 +13,6 @@ package org.eclipse.cdt.core.model;
import java.util.Map; import java.util.Map;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import org.eclipse.core.runtime.IAdaptable;
/** /**
* Additions to the <code>ICElement</code> hierarchy provided by * Additions to the <code>ICElement</code> hierarchy provided by

View file

@ -24,7 +24,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.language.ProjectLanguageConfiguration; import org.eclipse.cdt.core.language.ProjectLanguageConfiguration;
import org.eclipse.cdt.core.language.WorkspaceLanguageConfiguration; import org.eclipse.cdt.core.language.WorkspaceLanguageConfiguration;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.core.settings.model; package org.eclipse.cdt.core.settings.model;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
public interface ICConfigExtensionReference { public interface ICConfigExtensionReference {
/** /**

View file

@ -14,7 +14,6 @@ import java.util.Map;
import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor; import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.QualifiedName; import org.eclipse.core.runtime.QualifiedName;

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.settings.model; package org.eclipse.cdt.core.settings.model;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.settings.model; package org.eclipse.cdt.core.settings.model;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
/** /**

View file

@ -12,7 +12,6 @@
package org.eclipse.cdt.internal.core.model; package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICModel;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.resources.ResourcesPlugin;

View file

@ -15,7 +15,6 @@ import java.util.Map;
import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.model.IOpenable; import org.eclipse.cdt.core.model.IOpenable;
import org.eclipse.cdt.core.model.ISourceManipulation; import org.eclipse.cdt.core.model.ISourceManipulation;
import org.eclipse.cdt.core.model.ISourceRange; import org.eclipse.cdt.core.model.ISourceRange;

View file

@ -14,10 +14,7 @@ package org.eclipse.cdt.internal.core.model;
import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.IBuffer; import org.eclipse.cdt.core.model.IBuffer;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IMember;
import org.eclipse.cdt.core.model.ISourceManipulation;
import org.eclipse.cdt.core.model.ISourceRange; import org.eclipse.cdt.core.model.ISourceRange;
import org.eclipse.cdt.core.model.ISourceReference;
import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;

View file

@ -22,7 +22,6 @@ import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.core.settings.model.util.EntryStore; import org.eclipse.cdt.core.settings.model.util.EntryStore;
import org.eclipse.cdt.core.settings.model.util.KindBasedStore; import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
import org.eclipse.core.resources.IProject;
public class CLanguageSetting extends CDataProxy implements public class CLanguageSetting extends CDataProxy implements
ICLanguageSetting { ICLanguageSetting {

View file

@ -18,7 +18,6 @@ import org.eclipse.cdt.core.settings.model.CProjectDescriptionEvent;
import org.eclipse.cdt.core.settings.model.ICDescriptionDelta; import org.eclipse.cdt.core.settings.model.ICDescriptionDelta;
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager; import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
import org.eclipse.cdt.internal.core.model.CModelOperation; import org.eclipse.cdt.internal.core.model.CModelOperation;
import org.eclipse.cdt.internal.core.model.CModelStatus;
import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.CompositeWorkspaceRunnable; import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.CompositeWorkspaceRunnable;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IProjectDescription;

View file

@ -12,7 +12,6 @@
package org.eclipse.cdt.core.dom; package org.eclipse.cdt.core.dom;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation; import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTNode;
/** /**
* Common interface for names in the index and the AST. * Common interface for names in the index and the AST.

View file

@ -90,7 +90,7 @@ public abstract class GNUScannerExtensionConfiguration extends AbstractScannerEx
// Kludge for MSVC support until we get a real extension // Kludge for MSVC support until we get a real extension
private static final ObjectStyleMacro __stdcall = new ObjectStyleMacro( private static final ObjectStyleMacro __stdcall = new ObjectStyleMacro(
"__stdcall".toCharArray(), emptyCharArray); "__stdcall".toCharArray(), emptyCharArray); //$NON-NLS-1$
/** /**
* @return * @return

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.core.dom.parser;
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode; import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.parser.ParseError;
/** /**
* Interface for an AST source code parser. * Interface for an AST source code parser.

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.c.CASTVisitor; import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
import org.eclipse.cdt.core.dom.parser.AbstractScannerExtensionConfiguration;
import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration; import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
import org.eclipse.cdt.core.dom.parser.ISourceCodeParser; import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
import org.eclipse.cdt.core.index.IIndex; import org.eclipse.cdt.core.index.IIndex;

View file

@ -12,7 +12,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.parser.cpp; package org.eclipse.cdt.core.dom.parser.cpp;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider; import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider;
/** /**

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.core.index; package org.eclipse.cdt.core.index;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.IPDOMManager; import org.eclipse.cdt.core.dom.IPDOMManager;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;

View file

@ -13,11 +13,8 @@ package org.eclipse.cdt.core.index.export;
import java.util.Map; import java.util.Map;
import org.eclipse.cdt.core.index.IIndexLocationConverter; import org.eclipse.cdt.core.index.IIndexLocationConverter;
import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
import org.eclipse.cdt.core.index.URIRelativeLocationConverter;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
/** /**
* An IExportProjectProvider provides a configured ICProject suitable set up for * An IExportProjectProvider provides a configured ICProject suitable set up for

View file

@ -15,8 +15,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import org.eclipse.cdt.core.parser.*; import org.eclipse.cdt.core.parser.IProblem;
import org.eclipse.cdt.core.parser.IQuickParseCallback; import org.eclipse.cdt.core.parser.IQuickParseCallback;
import org.eclipse.cdt.core.parser.NullSourceElementRequestor;
import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException; import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException;
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit; import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
import org.eclipse.cdt.core.parser.ast.IASTFunction; import org.eclipse.cdt.core.parser.ast.IASTFunction;

View file

@ -30,7 +30,6 @@ import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration; import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTUsingDirective; import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
import org.eclipse.cdt.core.parser.ast.IASTVariable; import org.eclipse.cdt.core.parser.ast.IASTVariable;
import org.eclipse.cdt.internal.core.parser.QuickParseCallback;
import org.eclipse.cdt.internal.core.parser.ast.complete.ASTLinkageSpecification; import org.eclipse.cdt.internal.core.parser.ast.complete.ASTLinkageSpecification;
import org.eclipse.cdt.internal.core.parser.ast.complete.ASTScope; import org.eclipse.cdt.internal.core.parser.ast.complete.ASTScope;

View file

@ -22,7 +22,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
import org.eclipse.cdt.core.index.IIndexBinding; import org.eclipse.cdt.core.index.IIndexBinding;
import org.eclipse.cdt.internal.core.index.IIndexFragmentBindingComparator;
import org.eclipse.cdt.internal.core.index.IIndexFragment; import org.eclipse.cdt.internal.core.index.IIndexFragment;
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
import org.eclipse.cdt.internal.core.pdom.PDOM; import org.eclipse.cdt.internal.core.pdom.PDOM;

View file

@ -11,7 +11,6 @@
package org.eclipse.cdt.core; package org.eclipse.cdt.core;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;

View file

@ -39,7 +39,6 @@ import org.eclipse.cdt.core.resources.IPathEntryVariableManager;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager; import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
import org.eclipse.cdt.core.settings.model.WriteAccessException;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.internal.core.CContentTypes; import org.eclipse.cdt.internal.core.CContentTypes;
import org.eclipse.cdt.internal.core.CDTLogWriter; import org.eclipse.cdt.internal.core.CDTLogWriter;

View file

@ -15,7 +15,6 @@ package org.eclipse.cdt.core;
import java.util.Map; import java.util.Map;
import org.eclipse.cdt.core.formatter.CodeFormatter; import org.eclipse.cdt.core.formatter.CodeFormatter;
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
import org.eclipse.cdt.internal.formatter.CCodeFormatter; import org.eclipse.cdt.internal.formatter.CCodeFormatter;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;

View file

@ -14,8 +14,6 @@ package org.eclipse.cdt.core.resources;
import java.util.EventListener; import java.util.EventListener;
import org.eclipse.core.resources.IPathVariableChangeListener;
/** /**
* An interface to be implemented by objects interested in path variable * An interface to be implemented by objects interested in path variable

View file

@ -34,7 +34,7 @@ import org.osgi.framework.Bundle;
* @since 4.0 * @since 4.0
*/ */
public class TemplateEngineHelper { public class TemplateEngineHelper {
public static final String US = "_"; //$NON-NLS-1$
public static final String OPEN_MARKER = "$("; //$NON-NLS-1$ public static final String OPEN_MARKER = "$("; //$NON-NLS-1$
public static final String CLOSE_MARKER = ")"; //$NON-NLS-1$ public static final String CLOSE_MARKER = ")"; //$NON-NLS-1$
public static final String STRING_EXTERNALIZATION_MARKER = "%"; //$NON-NLS-1$ public static final String STRING_EXTERNALIZATION_MARKER = "%"; //$NON-NLS-1$
@ -42,6 +42,8 @@ public class TemplateEngineHelper {
// This is used while getting the Plugin Path. // This is used while getting the Plugin Path.
public static final String PROJRESOURCE = "plugin.xml"; //$NON-NLS-1$ public static final String PROJRESOURCE = "plugin.xml"; //$NON-NLS-1$
public static final String PLUGIN_ID = "pluginId"; //$NON-NLS-1$ public static final String PLUGIN_ID = "pluginId"; //$NON-NLS-1$
public static final String PLUGIN_PROPERTIES = "plugin.properties"; //$NON-NLS-1$
public static final String TEMPLATE_PROPERTIES = "templates.properties"; //$NON-NLS-1$
public static final String BOOLTRUE = "true"; //$NON-NLS-1$ public static final String BOOLTRUE = "true"; //$NON-NLS-1$
public static final String ID = "id"; //$NON-NLS-1$ public static final String ID = "id"; //$NON-NLS-1$
public static final String VALUE = "value"; //$NON-NLS-1$ public static final String VALUE = "value"; //$NON-NLS-1$
@ -230,7 +232,7 @@ public class TemplateEngineHelper {
String pluginId = ti.getPluginId(); String pluginId = ti.getPluginId();
String path = ti.getTemplatePath(); String path = ti.getTemplatePath();
IPath p = new Path(path); IPath p = new Path(path);
String propertiesPath = "template.properties"; String propertiesPath = TEMPLATE_PROPERTIES;
if(p.segmentCount() != 0){ if(p.segmentCount() != 0){
p = p.removeLastSegments(1); p = p.removeLastSegments(1);
propertiesPath = p.append(propertiesPath).toString(); propertiesPath = p.append(propertiesPath).toString();
@ -246,7 +248,7 @@ public class TemplateEngineHelper {
try { try {
value = location != null ? getValueFromProperties(pluginId, location, key.substring(1)) : null; value = location != null ? getValueFromProperties(pluginId, location, key.substring(1)) : null;
if (value == null) { if (value == null) {
value = getValueFromProperties(pluginId, "plugin.properties", key.substring(1)); value = getValueFromProperties(pluginId, PLUGIN_PROPERTIES, key.substring(1));
} }
} catch (IOException e) { } catch (IOException e) {
value = key; value = key;
@ -288,13 +290,13 @@ public class TemplateEngineHelper {
String country = locale.getCountry(); String country = locale.getCountry();
String variant = locale.getVariant(); String variant = locale.getVariant();
url = bundle.getResource(propertiesFile + "_" + lang + "_" + country + "_" + variant); url = bundle.getResource(propertiesFile + US + lang + US + country + US + variant);
if (url == null) { if (url == null) {
url = bundle.getResource(propertiesFile + "_" + lang + "_" + country); url = bundle.getResource(propertiesFile + US + lang + US + country);
} }
if (url == null) { if (url == null) {
url = bundle.getResource(propertiesFile + "_" + lang); url = bundle.getResource(propertiesFile + US + lang);
} }
if (url == null) { if (url == null) {
url = bundle.getResource(propertiesFile); url = bundle.getResource(propertiesFile);

View file

@ -50,7 +50,7 @@ public class CreateSourceFolder extends ProcessRunner {
protected void createSourceFolder(String projectName, String targetPath, IProgressMonitor monitor) throws ProcessFailureException { protected void createSourceFolder(String projectName, String targetPath, IProgressMonitor monitor) throws ProcessFailureException {
//If the targetPath is an empty string, there will be no source folder to create. //If the targetPath is an empty string, there will be no source folder to create.
// Also this is not an error. So just return gracefully. // Also this is not an error. So just return gracefully.
if (targetPath == null || targetPath.equals("")) { if (targetPath == null || targetPath.length()==0) {
return; return;
} }