mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[cleanup] compiler warnings
This commit is contained in:
parent
9f85f90d7a
commit
55e2d369e5
5 changed files with 19 additions and 19 deletions
|
@ -20,8 +20,8 @@ public class DataElementActionFilter implements org.eclipse.ui.IActionFilter {
|
|||
|
||||
|
||||
// constants to be used by Eclipse Filtering and Enablement Support.
|
||||
private static String _type = "type";
|
||||
private static String _name = "name";
|
||||
private static String _type = "type"; //$NON-NLS-1$
|
||||
private static String _name = "name"; //$NON-NLS-1$
|
||||
private static DataElementActionFilter _instance;
|
||||
|
||||
public static DataElementActionFilter getInstance() {
|
||||
|
@ -66,7 +66,7 @@ public class DataElementActionFilter implements org.eclipse.ui.IActionFilter {
|
|||
} else if (name.equals(_name) && target instanceof IDataElement) {
|
||||
// support for "name" filter.
|
||||
IDataElement le = (IDataElement) target;
|
||||
if (value.endsWith("*")) {
|
||||
if (value.endsWith("*")) { //$NON-NLS-1$
|
||||
// we have a wild card test, and * is the last character in the value
|
||||
if (le
|
||||
.getName()
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DesktopElement implements org.eclipse.ui.model.IWorkbenchAdapter
|
|||
IDataElement element = toElement(o);
|
||||
|
||||
|
||||
List objs = element.getAssociated("contents");
|
||||
List objs = element.getAssociated("contents"); //$NON-NLS-1$
|
||||
return objs.toArray();
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class DesktopElement implements org.eclipse.ui.model.IWorkbenchAdapter
|
|||
|
||||
public String getLabel(Object o)
|
||||
{
|
||||
return (String)_element.getElementProperty("value");
|
||||
return (String)_element.getElementProperty("value"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public Object getParent(Object o)
|
||||
|
|
|
@ -36,30 +36,30 @@ public class PropertySource implements IPropertySource
|
|||
|
||||
_properties = new HashMap();
|
||||
|
||||
IDataElement descriptor = (IDataElement)element.getElementProperty("descriptor");
|
||||
IDataElement descriptor = (IDataElement)element.getElementProperty("descriptor"); //$NON-NLS-1$
|
||||
|
||||
List attributes = null;
|
||||
int attributesSize = 0;
|
||||
if (descriptor != null)
|
||||
{
|
||||
attributes = descriptor.getAssociated("attributes");
|
||||
attributes = descriptor.getAssociated("attributes"); //$NON-NLS-1$
|
||||
attributesSize = attributes.size();
|
||||
}
|
||||
|
||||
_descriptors = new IPropertyDescriptor[attributesSize + 2];
|
||||
_descriptors[0] = new TextPropertyDescriptor("type", "type");
|
||||
_descriptors[1] = new TextPropertyDescriptor("name", "name");
|
||||
_descriptors[0] = new TextPropertyDescriptor("type", "type"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
_descriptors[1] = new TextPropertyDescriptor("name", "name"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
for (int i = 0; i < attributesSize; i++)
|
||||
{
|
||||
IDataElement attribute = (IDataElement)attributes.get(i);
|
||||
List types = attribute.getAssociated("attributes");
|
||||
List types = attribute.getAssociated("attributes"); //$NON-NLS-1$
|
||||
|
||||
String type = null;
|
||||
if (types.size() > 0)
|
||||
type = ((IDataElement)types.get(0)).getName();
|
||||
else
|
||||
type = "String";
|
||||
type = "String"; //$NON-NLS-1$
|
||||
|
||||
_properties.put(attribute.getName(), type);
|
||||
_descriptors[i+2] = new TextPropertyDescriptor(attribute.getName(), attribute.getName());
|
||||
|
@ -93,13 +93,13 @@ public class PropertySource implements IPropertySource
|
|||
Object result = null;
|
||||
|
||||
// find the appropriate attribute
|
||||
List attributes = _dataElement.getAssociated("attributes");
|
||||
List attributes = _dataElement.getAssociated("attributes"); //$NON-NLS-1$
|
||||
for (int i = 0; i < attributes.size(); i++)
|
||||
{
|
||||
IDataElement attribute = (IDataElement)attributes.get(i);
|
||||
if (attribute.getType().equals(name))
|
||||
{
|
||||
result = attribute.getElementProperty("value");
|
||||
result = attribute.getElementProperty("value"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,10 +107,10 @@ public class PropertySource implements IPropertySource
|
|||
{
|
||||
String type = (String)_properties.get(name);
|
||||
|
||||
if (type != null && type.equals("Integer"))
|
||||
result = "0";
|
||||
else if (type != null && type.equals("Float"))
|
||||
result = "0.0";
|
||||
if (type != null && type.equals("Integer")) //$NON-NLS-1$
|
||||
result = "0"; //$NON-NLS-1$
|
||||
else if (type != null && type.equals("Float")) //$NON-NLS-1$
|
||||
result = "0.0"; //$NON-NLS-1$
|
||||
else
|
||||
result = _dataElement.getElementProperty(name);
|
||||
}
|
||||
|
|
|
@ -65,6 +65,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
* @return the image descriptor
|
||||
*/
|
||||
public static ImageDescriptor getImageDescriptor(String path) {
|
||||
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.connectorservice.local", path);
|
||||
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.connectorservice.local", path); //$NON-NLS-1$
|
||||
}
|
||||
}
|
|
@ -41,7 +41,7 @@ public class LocalConnectorService extends AbstractConnectorService
|
|||
|
||||
|
||||
/**
|
||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#disconnect()
|
||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#disconnect(IProgressMonitor)
|
||||
*/
|
||||
public void internalDisconnect(IProgressMonitor monitor) throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue