Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315851

Summary: A back slash is displayed right after the AVD/handset�s name on Device Management view
Product: z_Archived Reporter: Flavio Vantin <vantin>
Component: SequoyahAssignee: TmL Inbox <device.sequoyah-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ericc, kpqb38, nkvg64, wmg040
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
A Sequoyah´s patch to make the text separator generic wmg040: iplog+

Description Flavio Vantin CLA 2010-06-04 18:20:42 EDT
Created attachment 171184 [details]
A Sequoyah´s patch to make the text separator generic

Please, consider the patch file attached.

When a handset or android virtual device (AVD) is connected to PC, the Device Management view, which is used by Motodev Studio for Android tool, shows a back slash between the handset serial number and the information about the android platform version in use. This back slash is just a text separator that could be removed or changed.

I am proposing a little change in order to make this separator generic, i.e., the classes which implement the IInstance interface would define its own separator or would use a default one.

A high level design:

- Add two new declarations in the org.eclipse.sequoyah.device.framework.model.IInstance interface:
    -> public String getSeparator();
    -> public void setSeparator(String separator);

- Implement these methods in the AbstractMobileInstance abstract class:
    -> org.eclipse.sequoyah.device.framework.model.AbstractMobileInstance
    -> add a new instance variable, whose default value is the back slash:
       private String separator = "\\";

- Change the following statement in the public method getInstanceName() of ViewerInstanceNode class:
    -> class org.eclipse.sequoyah.device.framework.ui.view.model.ViewerInstanceNode
       
       public String getInstanceName() {
           ...
            if (instance != null) {
                instanceName = instance.getName();
                String suffix = instance.getNameSuffix();
                if (suffix != null) {
    ->              instance.setSeparator("");
    ->              instanceName = instanceName + instance.getSeparator() + " (" + suffix + ")";
                }
            }
            return instanceName;
        }

Thx,
Flavio Vantin.
Comment 1 Daniel Drigo Pastore CLA 2010-06-24 15:01:32 EDT
Merged on trunk@2158.

Build ID 1.0.0.N20100614-0335.
Comment 2 Eric Cloninger CLA 2010-08-11 12:05:39 EDT
+1 for Helios SR1