# HG changeset patch # User dadubrow # Date 1279288054 18000 # Node ID f2409b13f0f85fac565859b4322b63e3f52135d8 # Parent 16cfaa469b1cede4523bdfc631bb29b69a01c208 multiple changes to remote agent installer code: + augment xml file structure with optional ordering info for sdk family and versions (ordering not yet implemented) + do not require sdk version to be parseable version string + encode xml file into the server.properties entry rather than providing only dir and adding file name with code + remove unneeded tracing packages entry diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Fri Jul 16 08:47:34 2010 -0500 @@ -35,9 +35,9 @@ import org.osgi.framework.Version; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.cpp.internal.api.utils.core.ListenerList; public class RandomCycleConnectedService implements IConnectedService { diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Fri Jul 16 08:47:34 2010 -0500 @@ -39,9 +39,9 @@ */ public class TestInstallerProvider implements IRemoteAgentInstallerProvider { - private static final Version S60_32 = new Version("3.2"); - private static final Version S60_50 = new Version("5.0"); - private static final Version UIQ_30 = new Version("3.0"); + private static final String S60_32 = "3.2"; + private static final String S60_50 = "5.0"; + private static final String UIQ_30 = "3.0"; private static final String S60 = "S60"; private static final String UIQ = "UIQ"; private static final String INSTALLER_CONTENTS = "This is a mock installer package."; @@ -55,9 +55,9 @@ private static class TestInstaller implements IRemoteAgentInstaller { private final String family; - private final Version version; + private final String version; - public TestInstaller(String family, Version version) { + public TestInstaller(String family, String version) { this.family = family; this.version = version; } @@ -66,7 +66,7 @@ return family; } - public Version getVersion() { + public String getVersion() { return version; } @@ -143,18 +143,18 @@ return new ArrayList(Arrays.asList(familyNames)); } - public List getVersions(String familyName) { + public List getVersions(String familyName) { if (familyName.equals(S60)) { - Version[] versions = { S60_32, S60_50 }; - return new ArrayList(Arrays.asList(versions)); + String[] versions = { S60_32, S60_50 }; + return new ArrayList(Arrays.asList(versions)); } else if (familyName.equals(UIQ)) return Collections.singletonList(UIQ_30); - return Collections.EMPTY_LIST; + return Collections.emptyList(); } - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { if (familyName.equals(S60)) { if (version.equals(S60_32)) return Collections.singletonList(installers[0]); @@ -164,7 +164,7 @@ else if (familyName.equals(UIQ) && version.equals(UIQ_30)) return Collections.singletonList(installers[2]); - return Collections.EMPTY_LIST; + return Collections.emptyList(); } private static void getMockData(IProgressMonitor monitor) throws InterruptedException { diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java --- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Fri Jul 16 08:47:34 2010 -0500 @@ -18,16 +18,22 @@ package com.nokia.carbide.remoteconnections.tests.extensions; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Collections; +import java.util.List; +import java.util.Map; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.swt.graphics.Image; import org.osgi.framework.Version; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.*; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; +import com.nokia.carbide.remoteconnections.interfaces.IService2; +import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; @SuppressWarnings("restriction") public class UnknownStatusService implements IService2 { @@ -111,15 +117,15 @@ return Collections.singletonList(S60); } - public List getVersions(String familyName) { + public List getVersions(String familyName) { if (familyName.equals(S60)) - return Collections.singletonList(new Version(_5_0)); + return Collections.singletonList(_5_0); return null; } - public List getRemoteAgentInstallers(String familyName, Version version) { - if (familyName.equals(S60) && version.equals(new Version(_5_0))) { + public List getRemoteAgentInstallers(String familyName, String version) { + if (familyName.equals(S60) && version.equals(_5_0)) { IRemoteAgentInstaller installer = new IRemoteAgentInstaller() { public boolean fileSupportsInstall() { @@ -183,6 +189,7 @@ return false; } + @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) { return null; } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/plugin.properties --- a/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Fri Jul 16 08:47:34 2010 -0500 @@ -5,4 +5,4 @@ providerName = www.example.org OnDevice.label=On-Device Connections... Import.desc=Import previously exported remote connections into this workspace -Export.desc=Export remote connections from this workspace to the local file system \ No newline at end of file +Export.desc=Export remote connections from this workspace to the local file system diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/plugin.xml --- a/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Fri Jul 16 08:47:34 2010 -0500 @@ -106,4 +106,16 @@ + + + + + + + diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.ecore --- a/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.ecore Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.ecore Fri Jul 16 08:47:34 2010 -0500 @@ -50,6 +50,22 @@
+ + +
+
+
+ + + + +
+
+
+ + @@ -112,4 +128,30 @@ + + +
+
+ + + +
+
+
+ + + + + +
+
+ + + +
+
+
+ + + diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.genmodel --- a/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.genmodel Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.genmodel Fri Jul 16 08:47:34 2010 -0500 @@ -14,6 +14,8 @@ + + @@ -24,5 +26,11 @@ + + + + + + diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.xsd --- a/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.xsd Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/schema/InstallPackages.xsd Fri Jul 16 08:47:34 2010 -0500 @@ -3,6 +3,16 @@ + + + + + + + + + + diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/InstallPackages.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/InstallPackages.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/InstallPackages.java Fri Jul 16 08:47:34 2010 -0500 @@ -19,18 +19,33 @@ package com.nokia.carbide.installpackages; -import com.nokia.carbide.installpackages.gen.InstallPackages.*; -import com.nokia.carbide.installpackages.gen.InstallPackages.util.InstallPackagesResourceFactoryImpl; -import com.nokia.carbide.remoteconnections.Messages; -import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; -import com.nokia.cpp.internal.api.utils.core.*; +import java.io.BufferedOutputStream; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Properties; -import org.apache.commons.httpclient.*; +import org.apache.commons.httpclient.ConnectTimeoutException; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.GetMethod; import org.eclipse.core.net.proxy.IProxyData; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; @@ -38,13 +53,18 @@ import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.osgi.service.datalocation.Location; -import org.osgi.framework.Version; -import java.io.*; -import java.lang.reflect.InvocationTargetException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.*; +import com.nokia.carbide.installpackages.gen.InstallPackages.DocumentRoot; +import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; +import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.util.InstallPackagesResourceFactoryImpl; +import com.nokia.carbide.remoteconnections.Messages; +import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; +import com.nokia.cpp.internal.api.utils.core.Check; +import com.nokia.cpp.internal.api.utils.core.FileUtils; +import com.nokia.cpp.internal.api.utils.core.ProxyUtils; /** * @@ -66,13 +86,13 @@ IRemoteAgentInstallerProvider getRemoteAgentInstallerProvider(); } - private final IServerData serverData; + private final IService service; private List packageList; private String serverPath; - public InstallPackages(IServerData serverData, IRunnableContext runnableContext) { - Check.checkArg(serverData); - this.serverData = serverData; + public InstallPackages(IService service, IRunnableContext runnableContext) { + Check.checkArg(service); + this.service = service; if (runnableContext == null) getPackageList(); else { @@ -129,9 +149,9 @@ return packages; } - + private PackagesType getAvailablePackagesFromServer() throws Exception { - GetMethod getMethod = new GetMethod(getRelativePath(serverData.getMasterFileName())); + GetMethod getMethod = new GetMethod(getMasterFilePath()); HttpClient client = new HttpClient(); setProxyData(client, getMethod); client.getHttpConnectionManager().getParams().setConnectionTimeout(8000); @@ -151,7 +171,7 @@ if (serverStatus >= 200 && serverStatus < 300) { File tempDir = FileUtils.getTemporaryDirectory(); IPath path = new Path(tempDir.getAbsolutePath()); - IPath masterFilePath = path.append(serverData.getMasterFileName()); + IPath masterFilePath = path.append(getMasterFileName()); File masterFile = masterFilePath.toFile(); if (masterFile.exists()) masterFile.delete(); @@ -210,17 +230,16 @@ try { url = new URL(installFilePath); } catch (MalformedURLException e) { - return getRelativePath(installFilePath); + StringBuilder sb = new StringBuilder(); + sb.append(getMasterFileParentPath()); + sb.append('/'); + sb.append(installFilePath); + return sb.toString(); } return url.toString(); } - private String getRelativePath(String installFilePath) { - String path = getServerPath(); - return path + "/" + installFilePath; //$NON-NLS-1$ - } - - private String getServerPath() { + private String getMasterFilePath() { if (serverPath != null) return serverPath; // see if there's an alternate server, otherwise use IServerData @@ -234,7 +253,7 @@ Properties properties = new Properties(); properties.load(is); is.close(); - String key = serverData.getRemoteAgentInstallerProvider().getService().getIdentifier(); + String key = service.getIdentifier(); String pathStr = (String) properties.get(key); if (pathStr != null) return serverPath = pathStr; @@ -243,14 +262,16 @@ } return ""; //$NON-NLS-1$ } - - public static String formatSDKVersion(Version v) { - if (v.getMicro() != 0) - return v.toString(); - StringBuffer sb = new StringBuffer(); - sb.append(v.getMajor()); - sb.append('.'); - sb.append(v.getMinor()); - return sb.toString(); + + private String getMasterFileParentPath() { + String path = getMasterFilePath(); + int fileNameLoc = path.lastIndexOf('/'); + return path.substring(0, fileNameLoc); + } + + private String getMasterFileName() { + String path = getMasterFilePath(); + int fileNameLoc = path.lastIndexOf('/'); + return path.substring(fileNameLoc + 1); } } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesFactory.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesFactory.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesFactory.java Fri Jul 16 08:47:34 2010 -0500 @@ -52,6 +52,24 @@ PackageType createPackageType(); /** + * Returns a new object of class 'SDK Family Type'. + * + * + * @return a new object of class 'SDK Family Type'. + * @generated + */ + SDKFamilyType createSDKFamilyType(); + + /** + * Returns a new object of class 'SDK Version Type'. + * + * + * @return a new object of class 'SDK Version Type'. + * @generated + */ + SDKVersionType createSDKVersionType(); + + /** * Returns the package supported by this factory. * * diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Fri Jul 16 08:47:34 2010 -0500 @@ -125,13 +125,31 @@ int PACKAGES_TYPE = 1; /** + * The feature id for the 'SDK Family' containment reference. + * + * + * @generated + * @ordered + */ + int PACKAGES_TYPE__SDK_FAMILY = 0; + + /** + * The feature id for the 'SDK Version' containment reference. + * + * + * @generated + * @ordered + */ + int PACKAGES_TYPE__SDK_VERSION = 1; + + /** * The feature id for the 'Package' containment reference list. * * * @generated * @ordered */ - int PACKAGES_TYPE__PACKAGE = 0; + int PACKAGES_TYPE__PACKAGE = 2; /** * The number of structural features of the 'Packages Type' class. @@ -140,7 +158,7 @@ * @generated * @ordered */ - int PACKAGES_TYPE_FEATURE_COUNT = 1; + int PACKAGES_TYPE_FEATURE_COUNT = 3; /** * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackageTypeImpl Package Type}' class. @@ -217,6 +235,63 @@ /** + * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType() + * @generated + */ + int SDK_FAMILY_TYPE = 3; + + /** + * The feature id for the 'Order' attribute. + * + * + * @generated + * @ordered + */ + int SDK_FAMILY_TYPE__ORDER = 0; + + /** + * The number of structural features of the 'SDK Family Type' class. + * + * + * @generated + * @ordered + */ + int SDK_FAMILY_TYPE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType() + * @generated + */ + int SDK_VERSION_TYPE = 4; + + /** + * The feature id for the 'Order' attribute. + * + * + * @generated + * @ordered + */ + int SDK_VERSION_TYPE__ORDER = 0; + + /** + * The number of structural features of the 'SDK Version Type' class. + * + * + * @generated + * @ordered + */ + int SDK_VERSION_TYPE_FEATURE_COUNT = 1; + + + /** * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.DocumentRoot Document Root}'. * * @@ -281,6 +356,28 @@ EClass getPackagesType(); /** + * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}'. + * + * + * @return the meta object for the containment reference 'SDK Family'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily() + * @see #getPackagesType() + * @generated + */ + EReference getPackagesType_SDKFamily(); + + /** + * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}'. + * + * + * @return the meta object for the containment reference 'SDK Version'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion() + * @see #getPackagesType() + * @generated + */ + EReference getPackagesType_SDKVersion(); + + /** * Returns the meta object for the containment reference list '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}'. * * @@ -368,6 +465,48 @@ EAttribute getPackageType_SdkVersion(); /** + * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'. + * + * + * @return the meta object for class 'SDK Family Type'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType + * @generated + */ + EClass getSDKFamilyType(); + + /** + * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}'. + * + * + * @return the meta object for the attribute 'Order'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder() + * @see #getSDKFamilyType() + * @generated + */ + EAttribute getSDKFamilyType_Order(); + + /** + * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'. + * + * + * @return the meta object for class 'SDK Version Type'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType + * @generated + */ + EClass getSDKVersionType(); + + /** + * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}'. + * + * + * @return the meta object for the attribute 'Order'. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder() + * @see #getSDKVersionType() + * @generated + */ + EAttribute getSDKVersionType_Order(); + + /** * Returns the factory that creates the instances of the model. * * @@ -442,6 +581,22 @@ EClass PACKAGES_TYPE = eINSTANCE.getPackagesType(); /** + * The meta object literal for the 'SDK Family' containment reference feature. + * + * + * @generated + */ + EReference PACKAGES_TYPE__SDK_FAMILY = eINSTANCE.getPackagesType_SDKFamily(); + + /** + * The meta object literal for the 'SDK Version' containment reference feature. + * + * + * @generated + */ + EReference PACKAGES_TYPE__SDK_VERSION = eINSTANCE.getPackagesType_SDKVersion(); + + /** * The meta object literal for the 'Package' containment reference list feature. * * @@ -507,6 +662,42 @@ */ EAttribute PACKAGE_TYPE__SDK_VERSION = eINSTANCE.getPackageType_SdkVersion(); + /** + * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType() + * @generated + */ + EClass SDK_FAMILY_TYPE = eINSTANCE.getSDKFamilyType(); + + /** + * The meta object literal for the 'Order' attribute feature. + * + * + * @generated + */ + EAttribute SDK_FAMILY_TYPE__ORDER = eINSTANCE.getSDKFamilyType_Order(); + + /** + * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class. + * + * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl + * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType() + * @generated + */ + EClass SDK_VERSION_TYPE = eINSTANCE.getSDKVersionType(); + + /** + * The meta object literal for the 'Order' attribute feature. + * + * + * @generated + */ + EAttribute SDK_VERSION_TYPE__ORDER = eINSTANCE.getSDKVersionType_Order(); + } } //InstallPackagesPackage diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Fri Jul 16 08:47:34 2010 -0500 @@ -17,6 +17,8 @@ *

* The following features are supported: *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}
  • + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}
  • *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}
  • *
*

@@ -27,6 +29,60 @@ */ public interface PackagesType extends EObject { /** + * Returns the value of the 'SDK Family' containment reference. + * + *

+ * If the meaning of the 'SDK Family' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'SDK Family' containment reference. + * @see #setSDKFamily(SDKFamilyType) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKFamily() + * @model containment="true" + * extendedMetaData="kind='element' name='SDKFamily' namespace='##targetNamespace'" + * @generated + */ + SDKFamilyType getSDKFamily(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}' containment reference. + * + * + * @param value the new value of the 'SDK Family' containment reference. + * @see #getSDKFamily() + * @generated + */ + void setSDKFamily(SDKFamilyType value); + + /** + * Returns the value of the 'SDK Version' containment reference. + * + *

+ * If the meaning of the 'SDK Version' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'SDK Version' containment reference. + * @see #setSDKVersion(SDKVersionType) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKVersion() + * @model containment="true" + * extendedMetaData="kind='element' name='SDKVersion' namespace='##targetNamespace'" + * @generated + */ + SDKVersionType getSDKVersion(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}' containment reference. + * + * + * @param value the new value of the 'SDK Version' containment reference. + * @see #getSDKVersion() + * @generated + */ + void setSDKVersion(SDKVersionType value); + + /** * Returns the value of the 'Package' containment reference list. * The list contents are of type {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackageType}. * diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java Fri Jul 16 08:47:34 2010 -0500 @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'SDK Family Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}
  • + *
+ *

+ * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType() + * @model extendedMetaData="name='SDKFamily_._type' kind='empty'" + * @generated + */ +public interface SDKFamilyType extends EObject { + /** + * Returns the value of the 'Order' attribute. + * + *

+ * If the meaning of the 'Order' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Order' attribute. + * @see #setOrder(String) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType_Order() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" + * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'" + * @generated + */ + String getOrder(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}' attribute. + * + * + * @param value the new value of the 'Order' attribute. + * @see #getOrder() + * @generated + */ + void setOrder(String value); + +} // SDKFamilyType diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java Fri Jul 16 08:47:34 2010 -0500 @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'SDK Version Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}
  • + *
+ *

+ * + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType() + * @model extendedMetaData="name='SDKVersion_._type' kind='empty'" + * @generated + */ +public interface SDKVersionType extends EObject { + /** + * Returns the value of the 'Order' attribute. + * + *

+ * If the meaning of the 'Order' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Order' attribute. + * @see #setOrder(String) + * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType_Order() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" + * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'" + * @generated + */ + String getOrder(); + + /** + * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}' attribute. + * + * + * @param value the new value of the 'Order' attribute. + * @see #getOrder() + * @generated + */ + void setOrder(String value); + +} // SDKVersionType diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -9,6 +9,8 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EMap; diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -62,6 +62,8 @@ case InstallPackagesPackage.DOCUMENT_ROOT: return createDocumentRoot(); case InstallPackagesPackage.PACKAGES_TYPE: return createPackagesType(); case InstallPackagesPackage.PACKAGE_TYPE: return createPackageType(); + case InstallPackagesPackage.SDK_FAMILY_TYPE: return createSDKFamilyType(); + case InstallPackagesPackage.SDK_VERSION_TYPE: return createSDKVersionType(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -102,6 +104,26 @@ * * @generated */ + public SDKFamilyType createSDKFamilyType() { + SDKFamilyTypeImpl sdkFamilyType = new SDKFamilyTypeImpl(); + return sdkFamilyType; + } + + /** + * + * + * @generated + */ + public SDKVersionType createSDKVersionType() { + SDKVersionTypeImpl sdkVersionType = new SDKVersionTypeImpl(); + return sdkVersionType; + } + + /** + * + * + * @generated + */ public InstallPackagesPackage getInstallPackagesPackage() { return (InstallPackagesPackage)getEPackage(); } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -11,6 +11,8 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; @@ -49,6 +51,20 @@ private EClass packageTypeEClass = null; /** + * + * + * @generated + */ + private EClass sdkFamilyTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass sdkVersionTypeEClass = null; + + /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. @@ -75,20 +91,10 @@ private static boolean isInited = false; /** - * Creates, registers, and initializes the Package for this - * model, and for any others upon which it depends. Simple - * dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives - * initialization for interdependent packages directly, in parallel - * with this package, itself. - *

Of this package and its interdependencies, all packages which - * have not yet been registered by their URI values are first created - * and registered. The packages are then initialized in two steps: - * meta-model objects for all of the packages are created before any - * are initialized, since one package's meta-model objects may refer to - * those of another. - *

Invocation of this method will not affect any packages that have - * already been initialized. + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link InstallPackagesPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * * * @see #eNS_URI @@ -100,7 +106,7 @@ if (isInited) return (InstallPackagesPackage)EPackage.Registry.INSTANCE.getEPackage(InstallPackagesPackage.eNS_URI); // Obtain or create and register package - InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new InstallPackagesPackageImpl()); + InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InstallPackagesPackageImpl()); isInited = true; @@ -116,6 +122,9 @@ // Mark meta-data to indicate it can't be changed theInstallPackagesPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InstallPackagesPackage.eNS_URI, theInstallPackagesPackage); return theInstallPackagesPackage; } @@ -178,8 +187,26 @@ * * @generated */ + public EReference getPackagesType_SDKFamily() { + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPackagesType_SDKVersion() { + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ public EReference getPackagesType_Package() { - return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0); + return (EReference)packagesTypeEClass.getEStructuralFeatures().get(2); } /** @@ -250,6 +277,42 @@ * * @generated */ + public EClass getSDKFamilyType() { + return sdkFamilyTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSDKFamilyType_Order() { + return (EAttribute)sdkFamilyTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSDKVersionType() { + return sdkVersionTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSDKVersionType_Order() { + return (EAttribute)sdkVersionTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ public InstallPackagesFactory getInstallPackagesFactory() { return (InstallPackagesFactory)getEFactoryInstance(); } @@ -280,6 +343,8 @@ createEReference(documentRootEClass, DOCUMENT_ROOT__PACKAGES); packagesTypeEClass = createEClass(PACKAGES_TYPE); + createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_FAMILY); + createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_VERSION); createEReference(packagesTypeEClass, PACKAGES_TYPE__PACKAGE); packageTypeEClass = createEClass(PACKAGE_TYPE); @@ -289,6 +354,12 @@ createEAttribute(packageTypeEClass, PACKAGE_TYPE__PACKAGE_VERSION); createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_FAMILY); createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_VERSION); + + sdkFamilyTypeEClass = createEClass(SDK_FAMILY_TYPE); + createEAttribute(sdkFamilyTypeEClass, SDK_FAMILY_TYPE__ORDER); + + sdkVersionTypeEClass = createEClass(SDK_VERSION_TYPE); + createEAttribute(sdkVersionTypeEClass, SDK_VERSION_TYPE__ORDER); } /** @@ -331,6 +402,8 @@ initEReference(getDocumentRoot_Packages(), this.getPackagesType(), null, "packages", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(packagesTypeEClass, PackagesType.class, "PackagesType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getPackagesType_SDKFamily(), this.getSDKFamilyType(), null, "sDKFamily", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPackagesType_SDKVersion(), this.getSDKVersionType(), null, "sDKVersion", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getPackagesType_Package(), this.getPackageType(), null, "package", null, 0, -1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(packageTypeEClass, PackageType.class, "PackageType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -341,6 +414,12 @@ initEAttribute(getPackageType_SdkFamily(), theXMLTypePackage.getString(), "sdkFamily", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPackageType_SdkVersion(), theXMLTypePackage.getString(), "sdkVersion", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(sdkFamilyTypeEClass, SDKFamilyType.class, "SDKFamilyType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSDKFamilyType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKFamilyType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(sdkVersionTypeEClass, SDKVersionType.class, "SDKVersionType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSDKVersionType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKVersionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Create resource createResource(eNS_URI); @@ -407,6 +486,22 @@ "kind", "elementOnly" }); addAnnotation + (getPackagesType_SDKFamily(), + source, + new String[] { + "kind", "element", + "name", "SDKFamily", + "namespace", "##targetNamespace" + }); + addAnnotation + (getPackagesType_SDKVersion(), + source, + new String[] { + "kind", "element", + "name", "SDKVersion", + "namespace", "##targetNamespace" + }); + addAnnotation (getPackagesType_Package(), source, new String[] { @@ -468,6 +563,36 @@ "kind", "attribute", "name", "sdkVersion", "namespace", "##targetNamespace" + }); + addAnnotation + (sdkFamilyTypeEClass, + source, + new String[] { + "name", "SDKFamily_._type", + "kind", "empty" + }); + addAnnotation + (getSDKFamilyType_Order(), + source, + new String[] { + "kind", "attribute", + "name", "order", + "namespace", "##targetNamespace" + }); + addAnnotation + (sdkVersionTypeEClass, + source, + new String[] { + "name", "SDKVersion_._type", + "kind", "empty" + }); + addAnnotation + (getSDKVersionType_Order(), + source, + new String[] { + "kind", "attribute", + "name", "order", + "namespace", "##targetNamespace" }); } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -9,8 +9,11 @@ import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; @@ -18,6 +21,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; @@ -30,6 +34,8 @@ *

* The following features are implemented: *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKFamily SDK Family}
  • + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKVersion SDK Version}
  • *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getPackage Package}
  • *
*

@@ -38,6 +44,24 @@ */ public class PackagesTypeImpl extends EObjectImpl implements PackagesType { /** + * The cached value of the '{@link #getSDKFamily() SDK Family}' containment reference. + * + * + * @see #getSDKFamily() + * @generated + * @ordered + */ + protected SDKFamilyType sDKFamily; + /** + * The cached value of the '{@link #getSDKVersion() SDK Version}' containment reference. + * + * + * @see #getSDKVersion() + * @generated + * @ordered + */ + protected SDKVersionType sDKVersion; + /** * The cached value of the '{@link #getPackage() Package}' containment reference list. * * @@ -71,6 +95,92 @@ * * @generated */ + public SDKFamilyType getSDKFamily() { + return sDKFamily; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSDKFamily(SDKFamilyType newSDKFamily, NotificationChain msgs) { + SDKFamilyType oldSDKFamily = sDKFamily; + sDKFamily = newSDKFamily; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, oldSDKFamily, newSDKFamily); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSDKFamily(SDKFamilyType newSDKFamily) { + if (newSDKFamily != sDKFamily) { + NotificationChain msgs = null; + if (sDKFamily != null) + msgs = ((InternalEObject)sDKFamily).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs); + if (newSDKFamily != null) + msgs = ((InternalEObject)newSDKFamily).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs); + msgs = basicSetSDKFamily(newSDKFamily, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, newSDKFamily, newSDKFamily)); + } + + /** + * + * + * @generated + */ + public SDKVersionType getSDKVersion() { + return sDKVersion; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSDKVersion(SDKVersionType newSDKVersion, NotificationChain msgs) { + SDKVersionType oldSDKVersion = sDKVersion; + sDKVersion = newSDKVersion; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, oldSDKVersion, newSDKVersion); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSDKVersion(SDKVersionType newSDKVersion) { + if (newSDKVersion != sDKVersion) { + NotificationChain msgs = null; + if (sDKVersion != null) + msgs = ((InternalEObject)sDKVersion).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs); + if (newSDKVersion != null) + msgs = ((InternalEObject)newSDKVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs); + msgs = basicSetSDKVersion(newSDKVersion, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, newSDKVersion, newSDKVersion)); + } + + /** + * + * + * @generated + */ public EList getPackage() { if (package_ == null) { package_ = new EObjectContainmentEList(PackageType.class, this, InstallPackagesPackage.PACKAGES_TYPE__PACKAGE); @@ -86,6 +196,10 @@ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return basicSetSDKFamily(null, msgs); + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return basicSetSDKVersion(null, msgs); case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return ((InternalEList)getPackage()).basicRemove(otherEnd, msgs); } @@ -100,6 +214,10 @@ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return getSDKFamily(); + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return getSDKVersion(); case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return getPackage(); } @@ -115,6 +233,12 @@ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + setSDKFamily((SDKFamilyType)newValue); + return; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + setSDKVersion((SDKVersionType)newValue); + return; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: getPackage().clear(); getPackage().addAll((Collection)newValue); @@ -131,6 +255,12 @@ @Override public void eUnset(int featureID) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + setSDKFamily((SDKFamilyType)null); + return; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + setSDKVersion((SDKVersionType)null); + return; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: getPackage().clear(); return; @@ -146,6 +276,10 @@ @Override public boolean eIsSet(int featureID) { switch (featureID) { + case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY: + return sDKFamily != null; + case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION: + return sDKVersion != null; case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE: return package_ != null && !package_.isEmpty(); } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -0,0 +1,167 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages.impl; + +import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'SDK Family Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl#getOrder Order}
  • + *
+ *

+ * + * @generated + */ +public class SDKFamilyTypeImpl extends EObjectImpl implements SDKFamilyType { + /** + * The default value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected static final String ORDER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected String order = ORDER_EDEFAULT; + + /** + * + * + * @generated + */ + protected SDKFamilyTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InstallPackagesPackage.Literals.SDK_FAMILY_TYPE; + } + + /** + * + * + * @generated + */ + public String getOrder() { + return order; + } + + /** + * + * + * @generated + */ + public void setOrder(String newOrder) { + String oldOrder = order; + order = newOrder; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER, oldOrder, order)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + return getOrder(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + setOrder((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + setOrder(ORDER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER: + return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (order: "); + result.append(order); + result.append(')'); + return result.toString(); + } + +} //SDKFamilyTypeImpl diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java Fri Jul 16 08:47:34 2010 -0500 @@ -0,0 +1,167 @@ +/** + * + * + * + * $Id$ + */ +package com.nokia.carbide.installpackages.gen.InstallPackages.impl; + +import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage; +import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'SDK Version Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl#getOrder Order}
  • + *
+ *

+ * + * @generated + */ +public class SDKVersionTypeImpl extends EObjectImpl implements SDKVersionType { + /** + * The default value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected static final String ORDER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOrder() Order}' attribute. + * + * + * @see #getOrder() + * @generated + * @ordered + */ + protected String order = ORDER_EDEFAULT; + + /** + * + * + * @generated + */ + protected SDKVersionTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InstallPackagesPackage.Literals.SDK_VERSION_TYPE; + } + + /** + * + * + * @generated + */ + public String getOrder() { + return order; + } + + /** + * + * + * @generated + */ + public void setOrder(String newOrder) { + String oldOrder = order; + order = newOrder; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_VERSION_TYPE__ORDER, oldOrder, order)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + return getOrder(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + setOrder((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + setOrder(ORDER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER: + return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (order: "); + result.append(order); + result.append(')'); + return result.toString(); + } + +} //SDKVersionTypeImpl diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Fri Jul 16 08:47:34 2010 -0500 @@ -83,6 +83,14 @@ return createPackageTypeAdapter(); } @Override + public Adapter caseSDKFamilyType(SDKFamilyType object) { + return createSDKFamilyTypeAdapter(); + } + @Override + public Adapter caseSDKVersionType(SDKVersionType object) { + return createSDKVersionTypeAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -145,6 +153,34 @@ } /** + * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType + * @generated + */ + public Adapter createSDKFamilyTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType + * @generated + */ + public Adapter createSDKVersionTypeAdapter() { + return null; + } + + /** * Creates a new adapter for the default case. * * This default implementation returns null. diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Fri Jul 16 08:47:34 2010 -0500 @@ -104,6 +104,18 @@ if (result == null) result = defaultCase(theEObject); return result; } + case InstallPackagesPackage.SDK_FAMILY_TYPE: { + SDKFamilyType sdkFamilyType = (SDKFamilyType)theEObject; + T result = caseSDKFamilyType(sdkFamilyType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case InstallPackagesPackage.SDK_VERSION_TYPE: { + SDKVersionType sdkVersionType = (SDKVersionType)theEObject; + T result = caseSDKVersionType(sdkVersionType); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -154,6 +166,36 @@ } /** + * Returns the result of interpreting the object as an instance of 'SDK Family Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'SDK Family Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSDKFamilyType(SDKFamilyType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'SDK Version Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'SDK Version Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSDKVersionType(SDKVersionType object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of 'EObject'. * * This implementation returns null; diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Fri Jul 16 08:47:34 2010 -0500 @@ -26,6 +26,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.widgets.Display; +import org.osgi.framework.Version; import com.nokia.carbide.remoteconnections.Messages; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; @@ -220,4 +221,8 @@ currentStatus = new Status(); currentStatus.setEStatus(status.internalGetEStatus(), status.getShortDescription(), status.getLongDescription()); } + + public void setDeviceOS(String familyName, Version version) { + // @deprecated + } } \ No newline at end of file diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Fri Jul 16 08:47:34 2010 -0500 @@ -16,26 +16,34 @@ */ package com.nokia.carbide.remoteconnections.interfaces; -import com.nokia.carbide.installpackages.InstallPackages; -import com.nokia.carbide.installpackages.InstallPackages.IServerData; -import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; -import com.nokia.carbide.remoteconnections.Messages; -import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.GetMethod; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.Image; import org.osgi.framework.Version; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.util.*; +import com.nokia.carbide.installpackages.InstallPackages; +import com.nokia.carbide.installpackages.InstallPackages.IServerData; +import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType; +import com.nokia.carbide.remoteconnections.Messages; +import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; public abstract class AbstractPackageInstallerProvider implements IRemoteAgentInstallerProvider { @@ -165,11 +173,14 @@ private List packageList; private Map imageCache; + /** + * @deprecated + */ protected abstract IServerData getServerData(); public List getSDKFamilyNames(IRunnableContext runnableContext) { if (packages == null) - packages = new InstallPackages(getServerData(), runnableContext); + packages = new InstallPackages(getService(), runnableContext); Set sdkFamilyNames = new HashSet(); packageList = packages.getAvailablePackageList(); if (packageList == null) @@ -183,26 +194,25 @@ return sdkFamilyNameList; } - @SuppressWarnings("unchecked") - public List getVersions(String familyName) { - Set versions = new HashSet(); + public List getVersions(String familyName) { + Set versions = new HashSet(); for (PackageType packageType : packageList) { if (packageType.getSdkFamily().equals(familyName)) { try { - versions.add(new Version(packageType.getSdkVersion())); + versions.add(packageType.getSdkVersion()); } catch (IllegalArgumentException e) { RemoteConnectionsActivator.logError(e); } } } - List versionList = new ArrayList(versions); + List versionList = new ArrayList(versions); Collections.sort(versionList); Collections.reverse(versionList); return versionList; } - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { Set installers = new HashSet(); if (packageList == null) { getSDKFamilyNames(null); @@ -210,7 +220,7 @@ for (PackageType packageType : packageList) { if (packageType.getSdkFamily().equals(familyName)) { try { - if (version.equals(new Version(packageType.getSdkVersion()))) { + if (version.equals(packageType.getSdkVersion())) { installers.add(new PackageTypeInstaller(packages, packageType)); } } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Fri Jul 16 08:47:34 2010 -0500 @@ -20,6 +20,8 @@ import org.osgi.framework.Version; +import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2; + /** * An interface for a service connected to a remote agent via a connection */ @@ -87,6 +89,8 @@ * Set the device OS values, to potentially affect the information for the user. * @param familyName * @param version + * @deprecated + * @see IConnectedService2#setDeviceOS(String, String) */ void setDeviceOS(String familyName, Version version); diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Fri Jul 16 08:47:34 2010 -0500 @@ -112,7 +112,7 @@ * @param familyName String * @return List */ - List getVersions(String familyName); + List getVersions(String familyName); /** * Return the IRemoteAgentInstaller objects for a given sdk family + version qualifier @@ -120,7 +120,7 @@ * @param version * @return */ - List getRemoteAgentInstallers(String familyName, Version version); + List getRemoteAgentInstallers(String familyName, String version); /** * Dispose this provider diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Fri Jul 16 08:47:34 2010 -0500 @@ -28,6 +28,13 @@ public interface IConnectedService2 extends IConnectedService { /** + * Set the device OS values, to potentially affect the information for the user. + * @param familyName + * @param version + */ + void setDeviceOS(String familyName, String version); + + /** * Return the properties for this connected service * @return Map */ diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Fri Jul 16 08:47:34 2010 -0500 @@ -83,30 +83,31 @@ import org.eclipse.ui.PlatformUI; import org.osgi.framework.Version; -import com.nokia.carbide.installpackages.InstallPackages; import com.nokia.carbide.remoteconnections.Messages; import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter; import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2; +import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; import com.nokia.carbide.remoteconnections.interfaces.IConnectionTypeProvider; import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents; import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.remoteconnections.interfaces.IService2; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter; -import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents; +import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2; import com.nokia.carbide.remoteconnections.internal.registry.Registry; import com.nokia.cpp.internal.api.utils.core.Check; import com.nokia.cpp.internal.api.utils.core.FileUtils; import com.nokia.cpp.internal.api.utils.core.HostOS; +import com.nokia.cpp.internal.api.utils.core.ObjectUtils; import com.nokia.cpp.internal.api.utils.core.Pair; import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; @@ -307,20 +308,20 @@ @SuppressWarnings("unchecked") public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection(); - Pair pair = (Pair) selection.getFirstElement(); + Pair pair = (Pair) selection.getFirstElement(); setSelectionToInstallComposite(pair); - if (connectedService != null) - connectedService.setDeviceOS(pair.first, pair.second); + if (connectedService instanceof IConnectedService2) + ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second); } }); deviceOSComboViewer.setContentProvider(new ArrayContentProvider()); deviceOSComboViewer.setLabelProvider(new LabelProvider() { - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String getText(Object element) { Check.checkState(element instanceof Pair); Pair pair = (Pair) element; - return MessageFormat.format("{0} {1}", pair.first, InstallPackages.formatSDKVersion(pair.second)); //$NON-NLS-1$ + return MessageFormat.format("{0} {1}", pair.first, pair.second); //$NON-NLS-1$ } }); deviceOSComboViewer.getControl().setToolTipText(Messages.getString("ConnectionSettingsPage.DeviceOSComboToolTip")); //$NON-NLS-1$ @@ -446,9 +447,6 @@ String label = ((IRemoteAgentInstaller) value).getLabel(); return label == null ? Messages.getString("ConnectionSettingsPage.UnlabeledPackageLabel") : label; //$NON-NLS-1$ } - if (value instanceof Version) - return InstallPackages.formatSDKVersion((Version) value); - return value.toString(); } @@ -715,7 +713,7 @@ } // update sdk combo - List> deviceOSPairs = createDeviceOSPairs(); + List> deviceOSPairs = createDeviceOSPairs(); deviceOSComboViewer.setInput(deviceOSPairs); if (!deviceOSPairs.isEmpty()) { deviceOSComboViewer.getCombo().select(0); @@ -737,7 +735,7 @@ } - protected void setSelectionToInstallComposite(Pair pair) { + protected void setSelectionToInstallComposite(Pair pair) { Object input = installerTreeViewer.getInput(); if (input instanceof TreeNode[]) { TreeNode node = findTreeNodeForPair((TreeNode[]) input, pair); @@ -748,14 +746,14 @@ } } - @SuppressWarnings("unchecked") - private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) { + private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) { for (TreeNode treeNode : treeNodes) { Object value = treeNode.getValue(); if (value instanceof IRemoteAgentInstaller) { TreeNode versionNode = treeNode.getParent(); TreeNode familyNode = versionNode.getParent(); - if (pair.equals(new Pair(familyNode.getValue(), versionNode.getValue()))) + if (ObjectUtils.equals(pair.first, familyNode.getValue()) && + ObjectUtils.equals(pair.second, versionNode.getValue())) return treeNode; } TreeNode[] children = treeNode.getChildren(); @@ -786,9 +784,10 @@ connectedService = Registry.instance().createConnectedService(service, connection); IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection(); - Pair pair = (Pair) selection.getFirstElement(); - if (pair != null) - connectedService.setDeviceOS(pair.first, pair.second); + Pair pair = (Pair) selection.getFirstElement(); + if (pair != null && connectedService instanceof IConnectedService2) { + ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second); + } connectedService.addStatusChangedListener(statusListener = new IStatusChangedListener() { public void statusChanged(final IStatus status) { Display.getDefault().asyncExec(new Runnable() { @@ -899,12 +898,12 @@ private void createFamilySubNodes(TreeNode familyNode, IRemoteAgentInstallerProvider installerProvider) { String familyName = familyNode.getValue().toString(); - List versions = installerProvider.getVersions(familyName); + List versions = installerProvider.getVersions(familyName); List childList = new ArrayList(); TreeNode[] children = familyNode.getChildren(); if (children != null) childList.addAll(Arrays.asList(children)); - for (Version version : versions) { + for (String version : versions) { TreeNode versionNode = getVersionNode(familyNode, version); if (versionNode == null) { versionNode = new TreeNode(version); @@ -916,7 +915,7 @@ familyNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()])); } - private TreeNode getVersionNode(TreeNode familyNode, Version version) { + private TreeNode getVersionNode(TreeNode familyNode, String version) { TreeNode[] children = familyNode.getChildren(); if (children != null) { for (TreeNode node : children) { @@ -929,7 +928,7 @@ private void createInstallerNodes(TreeNode versionNode, IRemoteAgentInstallerProvider installerProvider) { String familyName = versionNode.getParent().getValue().toString(); - Version version = (Version) versionNode.getValue(); + String version = versionNode.getValue().toString(); List installers = installerProvider.getRemoteAgentInstallers(familyName, version); List childList = new ArrayList(); @@ -944,14 +943,14 @@ versionNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()])); } - private synchronized List> createDeviceOSPairs() { - List> deviceOSPairs = new ArrayList>(); + private synchronized List> createDeviceOSPairs() { + List> deviceOSPairs = new ArrayList>(); for (IRemoteAgentInstallerProvider installerProvider : installerProviders) { List familyNames = installerProvider.getSDKFamilyNames(null); for (String familyName : familyNames) { - List versions = installerProvider.getVersions(familyName); - for (Version version : versions) { - Pair pair = new Pair(familyName, version); + List versions = installerProvider.getVersions(familyName); + for (String version : versions) { + Pair pair = new Pair(familyName, version); if (!deviceOSPairs.contains(pair)) deviceOSPairs.add(pair); } diff -r 16cfaa469b1c -r f2409b13f0f8 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Thu Jul 15 15:29:49 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Fri Jul 16 08:47:34 2010 -0500 @@ -161,7 +161,7 @@ return getConnectionType().getDescription(); } - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) private int getCurrentTypeIndex() { IConnection connectionToEdit = settingsWizard.getConnectionToEdit(); if (connectionToEdit != null) { diff -r 16cfaa469b1c -r f2409b13f0f8 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Fri Jul 16 08:47:34 2010 -0500 @@ -29,10 +29,10 @@ import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; -import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller; import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.IUSBConnectionType; import com.nokia.carbide.trk.support.connection.SerialConnectionType; @@ -92,7 +92,7 @@ private static final int REQUIRED_MSG_LEN = SYS_TRK_RESPONSE_STR.length + SYS_TRK_RESPONSE_STR_OFFSET; - private Pair deviceOS; + private Pair deviceOS; private TRKService trkService; static Class startTCFServer = TCFClassFactory.class; // force the tcf plugin to load @@ -365,7 +365,7 @@ return new TestResult(estatus, getShortDescription(estatus), message); } - public void setDeviceOS(String familyName, Version version) { - deviceOS = new Pair(familyName, version); + public void setDeviceOS(String familyName, String version) { + deviceOS = new Pair(familyName, version); } } diff -r 16cfaa469b1c -r f2409b13f0f8 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Fri Jul 16 08:47:34 2010 -0500 @@ -23,14 +23,13 @@ import java.util.Arrays; import org.eclipse.core.runtime.IProgressMonitor; -import org.osgi.framework.Version; import com.freescale.cdt.debug.cw.core.SerialConnectionSettings; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2; import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionType; import com.nokia.carbide.remoteconnections.interfaces.IService; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.IUSBConnectionType; import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory; @@ -244,7 +243,7 @@ return new TestResult(estatus, getShortDescription(estatus), message); } - public void setDeviceOS(String familyName, Version version) { + public void setDeviceOS(String familyName, String version) { // unimplemented } } \ No newline at end of file diff -r 16cfaa469b1c -r f2409b13f0f8 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java Thu Jul 15 15:29:49 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingInstallerProvider.java Fri Jul 16 08:47:34 2010 -0500 @@ -18,40 +18,28 @@ package com.nokia.carbide.trk.support.service; -import com.nokia.carbide.installpackages.InstallPackages.IServerData; -import com.nokia.carbide.remoteconnections.interfaces.*; -import com.nokia.carbide.trk.support.Activator; +import java.util.List; import org.eclipse.jface.operation.IRunnableContext; -import org.osgi.framework.Version; -import java.net.URL; -import java.util.List; +import com.nokia.carbide.installpackages.InstallPackages.IServerData; +import com.nokia.carbide.remoteconnections.interfaces.AbstractPackageInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; /** - * + * @deprecated */ public class TracingInstallerProvider extends AbstractPackageInstallerProvider { public class ServerData implements IServerData { - private static final String SERVER = "http://dacvs002.americas.nokia.com/trk"; //$NON-NLS-1$ - private static final String MASTER_FILE_NAME = "TracingPackages.xml"; //$NON-NLS-1$ + private static final String MASTER_FILE_NAME = "TracingPackages.xml"; //$NON-NLS-1$ public String getMasterFileName() { return MASTER_FILE_NAME; } - public URL getRelativePathRoot() { - URL url = null; - try { - url = new URL(SERVER); - } catch (Exception e) { - Activator.log(e); - } - return url; - } - public IRemoteAgentInstallerProvider getRemoteAgentInstallerProvider() { return TracingInstallerProvider.this; } @@ -65,7 +53,7 @@ } @Override - public List getRemoteAgentInstallers(String familyName, Version version) { + public List getRemoteAgentInstallers(String familyName, String version) { return super.getRemoteAgentInstallers(familyName, version); } @@ -75,7 +63,7 @@ } @Override - public List getVersions(String familyName) { + public List getVersions(String familyName) { return super.getVersions(familyName); } diff -r 16cfaa469b1c -r f2409b13f0f8 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java Thu Jul 15 15:29:49 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingService.java Fri Jul 16 08:47:34 2010 -0500 @@ -18,16 +18,18 @@ package com.nokia.carbide.trk.support.service; -import com.nokia.carbide.remoteconnections.interfaces.*; +import java.util.Arrays; +import java.util.Collection; + +import com.nokia.carbide.remoteconnections.interfaces.AbstractSynchronizedConnection; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnection; +import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider; +import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.TCPIPConnectionType; import com.nokia.carbide.trk.support.connection.USBConnectionType; import com.nokia.cpp.internal.api.utils.core.Check; -import com.nokia.cpp.internal.api.utils.core.HostOS; - - -import java.util.Arrays; -import java.util.Collection; /** * Implementation of IService for Tracing @@ -59,9 +61,7 @@ } public IRemoteAgentInstallerProvider getInstallerProvider() { - if (HostOS.IS_UNIX) - return null; // TODO: implement - return new TracingInstallerProvider(this); + return null; } public boolean isTestable() {