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

[cleanup] fix compiler warnings

This commit is contained in:
Javier Montalvo Orus 2006-12-04 18:47:44 +00:00
parent bf8483727c
commit cc01f2d474
13 changed files with 61 additions and 56 deletions

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.discovery; package org.eclipse.rse.discovery;
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.rse.discovery"; public static final String PLUGIN_ID = "org.eclipse.rse.discovery"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.discovery; package org.eclipse.rse.discovery;
@ -22,6 +22,7 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.Wizard;
import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.IPropertySet; import org.eclipse.rse.core.model.IPropertySet;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemRefreshAllAction; import org.eclipse.rse.ui.actions.SystemRefreshAllAction;
import org.eclipse.tm.discovery.model.Pair; import org.eclipse.tm.discovery.model.Pair;
@ -96,21 +97,34 @@ public class ServiceDiscoveryWizard extends Wizard {
String sysTypeString = ((ServiceType) service.eContainer()).getName(); String sysTypeString = ((ServiceType) service.eContainer()).getName();
try { try {
conn = RSEUIPlugin.getDefault().getSystemRegistry().createHost(sysTypeString, service.getName() + "@" + hostName, hostName, "Discovered "+sysTypeString+" server in "+hostName); //$NON-NLS-1$ //$NON-NLS-2$ conn = RSEUIPlugin.getDefault().getSystemRegistry().createHost(sysTypeString, service.getName() + "@" + hostName, hostName, "Discovered "+sysTypeString+" server in "+hostName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (conn != null) { if (conn != null) {
//copy discovered properties to RSE model //copy discovered properties to RSE models
IPropertySet ps = conn.getConnectorServices()[0].createPropertySet(Messages.ServiceDiscoveryWizard_DiscoveryPropertySet);
Iterator pairIterator = service.getPair().iterator();
while (pairIterator.hasNext()) {
Pair pair = (Pair) pairIterator.next();
ps.addProperty(pair.getKey(), pair.getValue());
//add port to the RSE connection Iterator pairIterator = service.getPair().iterator();
if (pair.getKey().equalsIgnoreCase(Messages.ServiceDiscoveryWizard_Port)) { IConnectorService[] services = conn.getConnectorServices();
conn.getConnectorServices()[0].setPort(Integer.parseInt(pair.getValue())); IPropertySet ps;
while (pairIterator.hasNext()) {
Pair pair = (Pair) pairIterator.next();
for(int j=0; j<services.length; j++)
{
if((ps = services[j].getPropertySet(sysTypeString))==null)
{
ps = services[j].createPropertySet(sysTypeString);
}
ps.addProperty(pair.getKey(), pair.getValue());
if (pair.getKey().equalsIgnoreCase(Messages.ServiceDiscoveryWizard_Port)) {
int port = Integer.parseInt(pair.getValue());
services[j].setPort(port);
}
} }
} }
RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn); RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn);
} }
} catch (Exception e) { } catch (Exception e) {
@ -121,15 +135,6 @@ public class ServiceDiscoveryWizard extends Wizard {
systemRefreshAllAction.run(); systemRefreshAllAction.run();
} }
} }
(new Job(Messages.ServiceDiscoveryWizard_SavingMessage) {
protected IStatus run(IProgressMonitor monitor) {
RSEUIPlugin.getDefault().getSystemRegistry().save();
return new Status(IStatus.OK, Messages.ServiceDiscoveryWizard_StatusId, IStatus.OK, Messages.ServiceDiscoveryWizard_StatusMessage, null);
}
}).schedule(5000);
} }
return true; return true;
} }

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.engine; package org.eclipse.tm.discovery.engine;
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.rse.discovery.engine"; public static final String PLUGIN_ID = "org.eclipse.rse.discovery.engine"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.model.provider; package org.eclipse.tm.discovery.model.provider;
@ -80,8 +80,8 @@ public class DeviceItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_Device_address_feature"), getString("_UI_Device_address_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_Device_address_feature", "_UI_Device_type"), getString("_UI_PropertyDescriptor_description", "_UI_Device_address_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.DEVICE__ADDRESS, ModelPackage.Literals.DEVICE__ADDRESS,
true, true,
false, false,
@ -101,8 +101,8 @@ public class DeviceItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_Device_name_feature"), getString("_UI_Device_name_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_Device_name_feature", "_UI_Device_type"), getString("_UI_PropertyDescriptor_description", "_UI_Device_name_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.DEVICE__NAME, ModelPackage.Literals.DEVICE__NAME,
true, true,
false, false,
@ -133,7 +133,7 @@ public class DeviceItemProvider
* @generated NOT * @generated NOT
*/ */
public Object getImage(Object object) { public Object getImage(Object object) {
return getResourceLocator().getImage("full/obj16/device"); return getResourceLocator().getImage("full/obj16/device"); //$NON-NLS-1$
//return null; //return null;
} }
@ -152,7 +152,7 @@ public class DeviceItemProvider
result.append(address); result.append(address);
if(name != null) if(name != null)
result.append(" ("+name+")"); result.append(" ("+name+")"); //$NON-NLS-1$ //$NON-NLS-2$
return result.toString(); return result.toString();
} }

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.model.provider; package org.eclipse.tm.discovery.model.provider;
@ -87,7 +87,7 @@ public class NetworkItemProvider
* @generated NOT * @generated NOT
*/ */
public Object getImage(Object object) { public Object getImage(Object object) {
return getResourceLocator().getImage("full/obj16/network"); return getResourceLocator().getImage("full/obj16/network"); //$NON-NLS-1$
} }
/** /**
@ -96,7 +96,7 @@ public class NetworkItemProvider
* @generated NOT * @generated NOT
*/ */
public String getText(Object object) { public String getText(Object object) {
return "Network"; return "Network"; //$NON-NLS-1$
} }
/** /**

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.model.provider; package org.eclipse.tm.discovery.model.provider;
@ -79,8 +79,8 @@ public class PairItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_Pair_key_feature"), getString("_UI_Pair_key_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_Pair_key_feature", "_UI_Pair_type"), getString("_UI_PropertyDescriptor_description", "_UI_Pair_key_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.PAIR__KEY, ModelPackage.Literals.PAIR__KEY,
true, true,
false, false,
@ -100,8 +100,8 @@ public class PairItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_Pair_value_feature"), getString("_UI_Pair_value_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_Pair_value_feature", "_UI_Pair_type"), getString("_UI_PropertyDescriptor_description", "_UI_Pair_value_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.PAIR__VALUE, ModelPackage.Literals.PAIR__VALUE,
true, true,
false, false,

View file

@ -76,8 +76,8 @@ public class ServiceItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_Service_name_feature"), getString("_UI_Service_name_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_Service_name_feature", "_UI_Service_type"), getString("_UI_PropertyDescriptor_description", "_UI_Service_name_feature", "_UI_Service_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.SERVICE__NAME, ModelPackage.Literals.SERVICE__NAME,
true, true,
false, false,
@ -108,7 +108,7 @@ public class ServiceItemProvider
* @generated not * @generated not
*/ */
public Object getImage(Object object) { public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/service")); return overlayImage(object, getResourceLocator().getImage("full/obj16/service")); //$NON-NLS-1$
} }
/** /**

View file

@ -77,8 +77,8 @@ public class ServiceTypeItemProvider
(createItemPropertyDescriptor (createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getResourceLocator(),
getString("_UI_ServiceType_name_feature"), getString("_UI_ServiceType_name_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_ServiceType_name_feature", "_UI_ServiceType_type"), getString("_UI_PropertyDescriptor_description", "_UI_ServiceType_name_feature", "_UI_ServiceType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ModelPackage.Literals.SERVICE_TYPE__NAME, ModelPackage.Literals.SERVICE_TYPE__NAME,
true, true,
false, false,
@ -109,7 +109,7 @@ public class ServiceTypeItemProvider
* @generated * @generated
*/ */
public Object getImage(Object object) { public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/serviceType")); return overlayImage(object, getResourceLocator().getImage("full/obj16/serviceType")); //$NON-NLS-1$
} }
/** /**
@ -119,7 +119,7 @@ public class ServiceTypeItemProvider
*/ */
public String getText(Object object) { public String getText(Object object) {
String label = ((ServiceType)object).getName(); String label = ((ServiceType)object).getName();
return label == null || label.length() == 0 ? "": label; return label == null || label.length() == 0 ? "": label; //$NON-NLS-1$
} }
/** /**

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.protocol.dnssd; package org.eclipse.tm.discovery.protocol.dnssd;
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.tm.discovery.protocol.dnssd"; public static final String PLUGIN_ID = "org.eclipse.tm.discovery.protocol.dnssd"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.transport.udp; package org.eclipse.tm.discovery.transport.udp;
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.tm.discovery.transport.udp"; public static final String PLUGIN_ID = "org.eclipse.tm.discovery.transport.udp"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.view; package org.eclipse.tm.discovery.view;
@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.rse.discovery.view"; public static final String PLUGIN_ID = "org.eclipse.rse.discovery.view"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.wizard; package org.eclipse.tm.discovery.wizard;
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin { public class Activator extends AbstractUIPlugin {
// The plug-in ID // The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.tm.wizard.pages"; public static final String PLUGIN_ID = "org.eclipse.tm.wizard.pages"; //$NON-NLS-1$
// The shared instance // The shared instance
private static Activator plugin; private static Activator plugin;

View file

@ -5,7 +5,7 @@
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Javier Montalvo Orús (Symbian) - initial API and implementation * Javier Montalvo Orus (Symbian) - initial API and implementation
********************************************************************************/ ********************************************************************************/
package org.eclipse.tm.discovery.wizard; package org.eclipse.tm.discovery.wizard;
@ -133,12 +133,12 @@ public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
setDescription(Messages.getString("ServiceDiscoveryWizardDisplayPage.WizardPageDescription")); //$NON-NLS-1$ setDescription(Messages.getString("ServiceDiscoveryWizardDisplayPage.WizardPageDescription")); //$NON-NLS-1$
//load all service id's from the extension point registry //load all service id's from the extension point registry
//this id will be used to filter the supported services in the view //this id will be used to filter the supported sytem types
IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.rse.ui","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$ IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.rse.core","systemTypes"); //$NON-NLS-1$ //$NON-NLS-2$
IConfigurationElement[] ce = ep.getConfigurationElements(); IConfigurationElement[] ce = ep.getConfigurationElements();
for (int i = 0; i < ce.length; i++) { for (int i = 0; i < ce.length; i++) {
String id = ce[i].getAttribute("id"); //$NON-NLS-1$ String id = ce[i].getAttribute("name"); //$NON-NLS-1$
if(id!=null) if(id!=null)
supportedServicesType.add(id); supportedServicesType.add(id);
} }