mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
[cleanup] fix compiler warnings
This commit is contained in:
parent
bf8483727c
commit
cc01f2d474
13 changed files with 61 additions and 56 deletions
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.discovery;
|
||||
|
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.discovery;
|
||||
|
@ -22,6 +22,7 @@ import org.eclipse.jface.wizard.IWizardPage;
|
|||
import org.eclipse.jface.wizard.Wizard;
|
||||
import org.eclipse.rse.core.model.IHost;
|
||||
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.actions.SystemRefreshAllAction;
|
||||
import org.eclipse.tm.discovery.model.Pair;
|
||||
|
@ -96,21 +97,34 @@ public class ServiceDiscoveryWizard extends Wizard {
|
|||
String sysTypeString = ((ServiceType) service.eContainer()).getName();
|
||||
|
||||
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) {
|
||||
//copy discovered properties to RSE model
|
||||
IPropertySet ps = conn.getConnectorServices()[0].createPropertySet(Messages.ServiceDiscoveryWizard_DiscoveryPropertySet);
|
||||
//copy discovered properties to RSE models
|
||||
|
||||
Iterator pairIterator = service.getPair().iterator();
|
||||
IConnectorService[] services = conn.getConnectorServices();
|
||||
IPropertySet ps;
|
||||
|
||||
while (pairIterator.hasNext()) {
|
||||
|
||||
Pair pair = (Pair) pairIterator.next();
|
||||
ps.addProperty(pair.getKey(), pair.getValue());
|
||||
|
||||
//add port to the RSE connection
|
||||
if (pair.getKey().equalsIgnoreCase(Messages.ServiceDiscoveryWizard_Port)) {
|
||||
conn.getConnectorServices()[0].setPort(Integer.parseInt(pair.getValue()));
|
||||
|
||||
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);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -121,15 +135,6 @@ public class ServiceDiscoveryWizard extends Wizard {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.engine;
|
||||
|
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* 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;
|
||||
|
@ -80,8 +80,8 @@ public class DeviceItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_Device_address_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Device_address_feature", "_UI_Device_type"),
|
||||
getString("_UI_Device_address_feature"), //$NON-NLS-1$
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Device_address_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ModelPackage.Literals.DEVICE__ADDRESS,
|
||||
true,
|
||||
false,
|
||||
|
@ -101,8 +101,8 @@ public class DeviceItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_Device_name_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Device_name_feature", "_UI_Device_type"),
|
||||
getString("_UI_Device_name_feature"), //$NON-NLS-1$
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Device_name_feature", "_UI_Device_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ModelPackage.Literals.DEVICE__NAME,
|
||||
true,
|
||||
false,
|
||||
|
@ -133,7 +133,7 @@ public class DeviceItemProvider
|
|||
* @generated NOT
|
||||
*/
|
||||
public Object getImage(Object object) {
|
||||
return getResourceLocator().getImage("full/obj16/device");
|
||||
return getResourceLocator().getImage("full/obj16/device"); //$NON-NLS-1$
|
||||
//return null;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public class DeviceItemProvider
|
|||
result.append(address);
|
||||
|
||||
if(name != null)
|
||||
result.append(" ("+name+")");
|
||||
result.append(" ("+name+")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* 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;
|
||||
|
@ -87,7 +87,7 @@ public class NetworkItemProvider
|
|||
* @generated NOT
|
||||
*/
|
||||
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
|
||||
*/
|
||||
public String getText(Object object) {
|
||||
return "Network";
|
||||
return "Network"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* 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;
|
||||
|
@ -79,8 +79,8 @@ public class PairItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_Pair_key_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Pair_key_feature", "_UI_Pair_type"),
|
||||
getString("_UI_Pair_key_feature"), //$NON-NLS-1$
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Pair_key_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ModelPackage.Literals.PAIR__KEY,
|
||||
true,
|
||||
false,
|
||||
|
@ -100,8 +100,8 @@ public class PairItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_Pair_value_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Pair_value_feature", "_UI_Pair_type"),
|
||||
getString("_UI_Pair_value_feature"), //$NON-NLS-1$
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Pair_value_feature", "_UI_Pair_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ModelPackage.Literals.PAIR__VALUE,
|
||||
true,
|
||||
false,
|
||||
|
|
|
@ -76,8 +76,8 @@ public class ServiceItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_Service_name_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Service_name_feature", "_UI_Service_type"),
|
||||
getString("_UI_Service_name_feature"), //$NON-NLS-1$
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_Service_name_feature", "_UI_Service_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ModelPackage.Literals.SERVICE__NAME,
|
||||
true,
|
||||
false,
|
||||
|
@ -108,7 +108,7 @@ public class ServiceItemProvider
|
|||
* @generated not
|
||||
*/
|
||||
public Object getImage(Object object) {
|
||||
return overlayImage(object, getResourceLocator().getImage("full/obj16/service"));
|
||||
return overlayImage(object, getResourceLocator().getImage("full/obj16/service")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,8 +77,8 @@ public class ServiceTypeItemProvider
|
|||
(createItemPropertyDescriptor
|
||||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
||||
getResourceLocator(),
|
||||
getString("_UI_ServiceType_name_feature"),
|
||||
getString("_UI_PropertyDescriptor_description", "_UI_ServiceType_name_feature", "_UI_ServiceType_type"),
|
||||
getString("_UI_ServiceType_name_feature"), //$NON-NLS-1$
|
||||
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,
|
||||
true,
|
||||
false,
|
||||
|
@ -109,7 +109,7 @@ public class ServiceTypeItemProvider
|
|||
* @generated
|
||||
*/
|
||||
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) {
|
||||
String label = ((ServiceType)object).getName();
|
||||
return label == null || label.length() == 0 ? "": label;
|
||||
return label == null || label.length() == 0 ? "": label; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* 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;
|
||||
|
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* 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;
|
||||
|
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.view;
|
||||
|
@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.wizard;
|
||||
|
@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// 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
|
||||
private static Activator plugin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.wizard;
|
||||
|
@ -133,12 +133,12 @@ public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
|
|||
setDescription(Messages.getString("ServiceDiscoveryWizardDisplayPage.WizardPageDescription")); //$NON-NLS-1$
|
||||
|
||||
//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();
|
||||
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)
|
||||
supportedServicesType.add(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue