mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
[cleanup] fix compiler warnings
This commit is contained in:
parent
bbbac20e9b
commit
8aebe43581
14 changed files with 36 additions and 24 deletions
|
@ -14,10 +14,6 @@ import java.util.Enumeration;
|
|||
import java.util.Iterator;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.wizard.IWizardPage;
|
||||
import org.eclipse.jface.wizard.Wizard;
|
||||
import org.eclipse.rse.core.model.IHost;
|
||||
|
@ -128,9 +124,7 @@ public class ServiceDiscoveryWizard extends Wizard {
|
|||
RSEUIPlugin.getDefault().getSystemRegistry().expandHost(conn);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (conn != null) {
|
||||
RSEUIPlugin.getDefault().getSystemRegistry().deleteHost(conn);
|
||||
}
|
||||
} finally {
|
||||
systemRefreshAllAction.run();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -64,6 +64,7 @@ public class ProtocolFactory {
|
|||
public static String[] getQueryList(String protocolName) throws CoreException
|
||||
{
|
||||
IProtocol protocol = null;
|
||||
String[] queries = null;
|
||||
|
||||
IConfigurationElement[] ce = ep.getConfigurationElements();
|
||||
for (int i = 0; i < ce.length; i++) {
|
||||
|
@ -75,11 +76,12 @@ public class ProtocolFactory {
|
|||
}
|
||||
}
|
||||
|
||||
String[] queries = protocol.getQueries();
|
||||
|
||||
if(queries==null)
|
||||
queries = new String[]{};
|
||||
|
||||
if(protocol != null)
|
||||
{
|
||||
queries = protocol.getQueries();
|
||||
if(queries==null)
|
||||
queries = new String[]{};
|
||||
}
|
||||
return queries;
|
||||
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class DeviceItemProvider
|
|||
IItemPropertySource {
|
||||
/**
|
||||
* This constructs an instance from a factory and a notifier.
|
||||
* @param adapterFactory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -46,6 +46,7 @@ public class NetworkItemProvider
|
|||
IItemPropertySource {
|
||||
/**
|
||||
* This constructs an instance from a factory and a notifier.
|
||||
* @param adapterFactory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,7 @@ public class PairItemProvider
|
|||
{
|
||||
/**
|
||||
* This constructs an instance from a factory and a notifier.
|
||||
* @param adapterFactory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -45,6 +45,7 @@ public class ServiceItemProvider
|
|||
IItemPropertySource{
|
||||
/**
|
||||
* This constructs an instance from a factory and a notifier.
|
||||
* @param adapterFactory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -46,6 +46,7 @@ public class ServiceTypeItemProvider
|
|||
{
|
||||
/**
|
||||
* This constructs an instance from a factory and a notifier.
|
||||
* @param adapterFactory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -15,13 +15,13 @@ Contributors:
|
|||
<extension point="org.eclipse.emf.ecore.generated_package">
|
||||
<package
|
||||
uri = "http://www.eclipse.org/tm/discovery"
|
||||
class = "org.eclipse.tm.discovery.model.DiscoveryPackage" />
|
||||
class = "org.eclipse.tm.discovery.model.ModelPackage" />
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.emf.ecore.extension_parser">
|
||||
<parser
|
||||
type="discovery"
|
||||
class="org.eclipse.tm.discovery.model.util.DiscoveryResourceFactoryImpl" />
|
||||
class="org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl" />
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -389,6 +389,10 @@ public interface ModelPackage extends EPackage {
|
|||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
interface Literals {
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
|
||||
|
@ -397,6 +401,7 @@ public interface ModelPackage extends EPackage {
|
|||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
|
||||
* @generated
|
||||
*/
|
||||
|
||||
EClass DEVICE = eINSTANCE.getDevice();
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.eclipse.tm.discovery.model.*;
|
|||
public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
|
||||
/**
|
||||
* Creates the default factory implementation.
|
||||
* @return model factory
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
@ -125,6 +126,7 @@ public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
|
|||
|
||||
/**
|
||||
*
|
||||
* @return model package
|
||||
* @deprecated
|
||||
* @generated
|
||||
*/
|
||||
|
|
|
@ -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.impl;
|
||||
|
@ -103,6 +103,7 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
|
|||
* those of another.
|
||||
* <p>Invocation of this method will not affect any packages that have
|
||||
* already been initialized.
|
||||
* @return the model package
|
||||
*
|
||||
* @see #eNS_URI
|
||||
* @see #createPackageContents()
|
||||
|
|
|
@ -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.util;
|
||||
|
@ -51,6 +51,7 @@ public class ModelSwitch {
|
|||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* @param theEObject
|
||||
*
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
|
|
|
@ -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;
|
||||
|
@ -369,8 +369,8 @@ public class DNSSDProtocol implements IProtocol {
|
|||
|
||||
private void handlePTRRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
|
||||
|
||||
Service service = null;
|
||||
ServiceType serviceType = null;
|
||||
Service service = ModelFactory.eINSTANCE.createService();
|
||||
ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
|
||||
|
||||
//skip dataLength
|
||||
packetInputStream.skip(2);
|
||||
|
@ -442,8 +442,8 @@ public class DNSSDProtocol implements IProtocol {
|
|||
|
||||
private void handleSRVRecord(ByteArrayInputStream packetInputStream, Device device, String name) {
|
||||
|
||||
Service service = null;
|
||||
ServiceType serviceType = null;
|
||||
Service service = ModelFactory.eINSTANCE.createService();
|
||||
ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
|
||||
|
||||
//data of the packet, without bytes for priority-weight-port
|
||||
int dataLength = (packetInputStream.read() << 8 | packetInputStream.read()) - 6;
|
||||
|
@ -541,8 +541,8 @@ public class DNSSDProtocol implements IProtocol {
|
|||
}
|
||||
|
||||
private void handleTXTRecord(ByteArrayInputStream packetInputStream, Device device, String recordName) {
|
||||
ServiceType serviceType = null;
|
||||
Service service = null;;
|
||||
ServiceType serviceType = ModelFactory.eINSTANCE.createServiceType();
|
||||
Service service = ModelFactory.eINSTANCE.createService();
|
||||
int dataLength = packetInputStream.read() << 8 | packetInputStream.read();
|
||||
|
||||
byte [] data = new byte[dataLength];
|
||||
|
|
|
@ -451,7 +451,9 @@ public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
|
|||
|
||||
//update model when pressing return
|
||||
updatePairs(item.getText(0),item.getText(1));
|
||||
|
||||
text.dispose ();
|
||||
e.doit = false;
|
||||
break;
|
||||
case SWT.TRAVERSE_ESCAPE:
|
||||
text.dispose ();
|
||||
e.doit = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue