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:
parent
549dd3dc9d
commit
d94ffa1869
30 changed files with 12 additions and 42 deletions
|
@ -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.ICProjectDescriptionManager;
|
||||
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.BatchOperation;
|
||||
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.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.eclipse.core.runtime.content.IContentType;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@ package org.eclipse.cdt.core.model;
|
|||
*******************************************************************************/
|
||||
import java.util.EventObject;
|
||||
|
||||
import org.eclipse.cdt.internal.core.model.CShiftData;
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.model;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.model;
|
||||
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
|
||||
/**
|
||||
* Additions to the <code>ICElement</code> hierarchy provided by
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
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.WorkspaceLanguageConfiguration;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package org.eclipse.cdt.core.settings.model;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
|
||||
public interface ICConfigExtensionReference {
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.Map;
|
|||
|
||||
import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor;
|
||||
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.IPath;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*******************************************************************************/
|
||||
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.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.settings.model;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
package org.eclipse.cdt.internal.core.model;
|
||||
|
||||
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.ResourcesPlugin;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import java.util.Map;
|
|||
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
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.ISourceManipulation;
|
||||
import org.eclipse.cdt.core.model.ISourceRange;
|
||||
|
|
|
@ -14,10 +14,7 @@ package org.eclipse.cdt.internal.core.model;
|
|||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.IBuffer;
|
||||
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.ISourceReference;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
|
|
|
@ -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.EntryStore;
|
||||
import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
||||
public class CLanguageSetting extends CDataProxy implements
|
||||
ICLanguageSetting {
|
||||
|
|
|
@ -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.ICProjectDescriptionManager;
|
||||
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.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
package org.eclipse.cdt.core.dom;
|
||||
|
||||
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.
|
||||
|
|
|
@ -90,7 +90,7 @@ public abstract class GNUScannerExtensionConfiguration extends AbstractScannerEx
|
|||
|
||||
// Kludge for MSVC support until we get a real extension
|
||||
private static final ObjectStyleMacro __stdcall = new ObjectStyleMacro(
|
||||
"__stdcall".toCharArray(), emptyCharArray);
|
||||
"__stdcall".toCharArray(), emptyCharArray); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @return
|
||||
|
|
|
@ -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.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.parser.ParseError;
|
||||
|
||||
/**
|
||||
* Interface for an AST source code parser.
|
||||
|
|
|
@ -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.IASTTranslationUnit;
|
||||
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.ISourceCodeParser;
|
||||
import org.eclipse.cdt.core.index.IIndex;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.parser.IBuiltinBindingsProvider;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
package org.eclipse.cdt.core.index;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.IPDOMManager;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
|
|
|
@ -13,11 +13,8 @@ package org.eclipse.cdt.core.index.export;
|
|||
import java.util.Map;
|
||||
|
||||
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.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
/**
|
||||
* An IExportProjectProvider provides a configured ICProject suitable set up for
|
||||
|
|
|
@ -15,8 +15,9 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
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.NullSourceElementRequestor;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFunction;
|
||||
|
|
|
@ -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.IASTUsingDirective;
|
||||
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.ASTScope;
|
||||
|
||||
|
|
|
@ -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.cpp.ICPPTemplateInstance;
|
||||
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.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package org.eclipse.cdt.core;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectNature;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
|
|
@ -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.ICProjectDescription;
|
||||
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.internal.core.CContentTypes;
|
||||
import org.eclipse.cdt.internal.core.CDTLogWriter;
|
||||
|
|
|
@ -15,7 +15,6 @@ package org.eclipse.cdt.core;
|
|||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.formatter.CodeFormatter;
|
||||
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
|
||||
import org.eclipse.cdt.internal.formatter.CCodeFormatter;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
|
|
|
@ -14,8 +14,6 @@ package org.eclipse.cdt.core.resources;
|
|||
|
||||
import java.util.EventListener;
|
||||
|
||||
import org.eclipse.core.resources.IPathVariableChangeListener;
|
||||
|
||||
|
||||
/**
|
||||
* An interface to be implemented by objects interested in path variable
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.osgi.framework.Bundle;
|
|||
* @since 4.0
|
||||
*/
|
||||
public class TemplateEngineHelper {
|
||||
|
||||
public static final String US = "_"; //$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 STRING_EXTERNALIZATION_MARKER = "%"; //$NON-NLS-1$
|
||||
|
@ -42,6 +42,8 @@ public class TemplateEngineHelper {
|
|||
// This is used while getting the Plugin Path.
|
||||
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_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 ID = "id"; //$NON-NLS-1$
|
||||
public static final String VALUE = "value"; //$NON-NLS-1$
|
||||
|
@ -230,7 +232,7 @@ public class TemplateEngineHelper {
|
|||
String pluginId = ti.getPluginId();
|
||||
String path = ti.getTemplatePath();
|
||||
IPath p = new Path(path);
|
||||
String propertiesPath = "template.properties";
|
||||
String propertiesPath = TEMPLATE_PROPERTIES;
|
||||
if(p.segmentCount() != 0){
|
||||
p = p.removeLastSegments(1);
|
||||
propertiesPath = p.append(propertiesPath).toString();
|
||||
|
@ -246,7 +248,7 @@ public class TemplateEngineHelper {
|
|||
try {
|
||||
value = location != null ? getValueFromProperties(pluginId, location, key.substring(1)) : null;
|
||||
if (value == null) {
|
||||
value = getValueFromProperties(pluginId, "plugin.properties", key.substring(1));
|
||||
value = getValueFromProperties(pluginId, PLUGIN_PROPERTIES, key.substring(1));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
value = key;
|
||||
|
@ -288,13 +290,13 @@ public class TemplateEngineHelper {
|
|||
String country = locale.getCountry();
|
||||
String variant = locale.getVariant();
|
||||
|
||||
url = bundle.getResource(propertiesFile + "_" + lang + "_" + country + "_" + variant);
|
||||
url = bundle.getResource(propertiesFile + US + lang + US + country + US + variant);
|
||||
|
||||
if (url == null) {
|
||||
url = bundle.getResource(propertiesFile + "_" + lang + "_" + country);
|
||||
url = bundle.getResource(propertiesFile + US + lang + US + country);
|
||||
}
|
||||
if (url == null) {
|
||||
url = bundle.getResource(propertiesFile + "_" + lang);
|
||||
url = bundle.getResource(propertiesFile + US + lang);
|
||||
}
|
||||
if (url == null) {
|
||||
url = bundle.getResource(propertiesFile);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class CreateSourceFolder extends ProcessRunner {
|
|||
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.
|
||||
// Also this is not an error. So just return gracefully.
|
||||
if (targetPath == null || targetPath.equals("")) {
|
||||
if (targetPath == null || targetPath.length()==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue