1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 10:05:24 +02:00

[cleanup] compiler warnings

This commit is contained in:
Martin Oberhuber 2006-11-28 13:28:50 +00:00
parent 9f85f90d7a
commit 55e2d369e5
5 changed files with 19 additions and 19 deletions

View file

@ -20,8 +20,8 @@ public class DataElementActionFilter implements org.eclipse.ui.IActionFilter {
// constants to be used by Eclipse Filtering and Enablement Support. // constants to be used by Eclipse Filtering and Enablement Support.
private static String _type = "type"; private static String _type = "type"; //$NON-NLS-1$
private static String _name = "name"; private static String _name = "name"; //$NON-NLS-1$
private static DataElementActionFilter _instance; private static DataElementActionFilter _instance;
public static DataElementActionFilter getInstance() { public static DataElementActionFilter getInstance() {
@ -66,7 +66,7 @@ public class DataElementActionFilter implements org.eclipse.ui.IActionFilter {
} else if (name.equals(_name) && target instanceof IDataElement) { } else if (name.equals(_name) && target instanceof IDataElement) {
// support for "name" filter. // support for "name" filter.
IDataElement le = (IDataElement) target; 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 // we have a wild card test, and * is the last character in the value
if (le if (le
.getName() .getName()

View file

@ -51,7 +51,7 @@ public class DesktopElement implements org.eclipse.ui.model.IWorkbenchAdapter
IDataElement element = toElement(o); IDataElement element = toElement(o);
List objs = element.getAssociated("contents"); List objs = element.getAssociated("contents"); //$NON-NLS-1$
return objs.toArray(); return objs.toArray();
} }
@ -62,7 +62,7 @@ public class DesktopElement implements org.eclipse.ui.model.IWorkbenchAdapter
public String getLabel(Object o) public String getLabel(Object o)
{ {
return (String)_element.getElementProperty("value"); return (String)_element.getElementProperty("value"); //$NON-NLS-1$
} }
public Object getParent(Object o) public Object getParent(Object o)

View file

@ -36,30 +36,30 @@ public class PropertySource implements IPropertySource
_properties = new HashMap(); _properties = new HashMap();
IDataElement descriptor = (IDataElement)element.getElementProperty("descriptor"); IDataElement descriptor = (IDataElement)element.getElementProperty("descriptor"); //$NON-NLS-1$
List attributes = null; List attributes = null;
int attributesSize = 0; int attributesSize = 0;
if (descriptor != null) if (descriptor != null)
{ {
attributes = descriptor.getAssociated("attributes"); attributes = descriptor.getAssociated("attributes"); //$NON-NLS-1$
attributesSize = attributes.size(); attributesSize = attributes.size();
} }
_descriptors = new IPropertyDescriptor[attributesSize + 2]; _descriptors = new IPropertyDescriptor[attributesSize + 2];
_descriptors[0] = new TextPropertyDescriptor("type", "type"); _descriptors[0] = new TextPropertyDescriptor("type", "type"); //$NON-NLS-1$ //$NON-NLS-2$
_descriptors[1] = new TextPropertyDescriptor("name", "name"); _descriptors[1] = new TextPropertyDescriptor("name", "name"); //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < attributesSize; i++) for (int i = 0; i < attributesSize; i++)
{ {
IDataElement attribute = (IDataElement)attributes.get(i); IDataElement attribute = (IDataElement)attributes.get(i);
List types = attribute.getAssociated("attributes"); List types = attribute.getAssociated("attributes"); //$NON-NLS-1$
String type = null; String type = null;
if (types.size() > 0) if (types.size() > 0)
type = ((IDataElement)types.get(0)).getName(); type = ((IDataElement)types.get(0)).getName();
else else
type = "String"; type = "String"; //$NON-NLS-1$
_properties.put(attribute.getName(), type); _properties.put(attribute.getName(), type);
_descriptors[i+2] = new TextPropertyDescriptor(attribute.getName(), attribute.getName()); _descriptors[i+2] = new TextPropertyDescriptor(attribute.getName(), attribute.getName());
@ -93,13 +93,13 @@ public class PropertySource implements IPropertySource
Object result = null; Object result = null;
// find the appropriate attribute // 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++) for (int i = 0; i < attributes.size(); i++)
{ {
IDataElement attribute = (IDataElement)attributes.get(i); IDataElement attribute = (IDataElement)attributes.get(i);
if (attribute.getType().equals(name)) 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); String type = (String)_properties.get(name);
if (type != null && type.equals("Integer")) if (type != null && type.equals("Integer")) //$NON-NLS-1$
result = "0"; result = "0"; //$NON-NLS-1$
else if (type != null && type.equals("Float")) else if (type != null && type.equals("Float")) //$NON-NLS-1$
result = "0.0"; result = "0.0"; //$NON-NLS-1$
else else
result = _dataElement.getElementProperty(name); result = _dataElement.getElementProperty(name);
} }

View file

@ -65,6 +65,6 @@ public class Activator extends AbstractUIPlugin {
* @return the image descriptor * @return the image descriptor
*/ */
public static ImageDescriptor getImageDescriptor(String path) { 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$
} }
} }

View file

@ -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 public void internalDisconnect(IProgressMonitor monitor) throws Exception
{ {