Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Resolved refactoring of segment label. Done by Nikhil.
authorlingutln <lingutln@localhost>
Tue, 10 Apr 2012 20:49:54 +0000 (20:49 +0000)
committerlingutln <lingutln@localhost>
Tue, 10 Apr 2012 20:49:54 +0000 (20:49 +0000)
svn path=/; revision=319

Annotation/src/ie/dcu/apps/ist/labelling/Labels.java
Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java
Annotation/src/ie/dcu/swt/SwtUtils.java

index f7d0c13485e3e660e99bfe667e0733991e51ea8f..4a77f4cda07308b456caf1f0c5b7c3e8d91bab03 100644 (file)
@@ -109,7 +109,7 @@ public class Labels
                                                //get the employee element
                                                Element el = (Element)nlist.item(i);
                                                namBankId = new String(DatatypeConverter.parseBase64Binary(getTagValue("namebankID", el)));
-                                               nameBankString = new String(DatatypeConverter.parseBase64Binary(getTagValue("fullNameString", el)));
+                                               nameBankString = new String(DatatypeConverter.parseBase64Binary(getTagValue("nameString", el)));
                                                map.put(namBankId,nameBankString);
                                        }
                                }
index c003c7434c8370f244a50193e97e252ad87d432d..68bfe3c455f6e2053a2ce577425d78ca11530ff5 100644 (file)
@@ -256,16 +256,8 @@ public class SegmentationView extends Composite {
         public void widgetSelected(SelectionEvent arg0) {
                if(view.getContext().isEnabled())
                {
-                       if(comboLabel.getText().indexOf('{') != -1)
-                       {
-                               view.getContext().getEnabledMask().segmentName = comboLabel.getText().substring(0,comboLabel.getText().indexOf('{')-1);
-                               view.getContext().getEnabledMask().accessionId = comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1);
-                       }
-                       else
-                       {
-                               view.getContext().getEnabledMask().segmentName = comboLabel.getText();
-                       }
-               }
+                       view.getContext().getEnabledMask().segmentName = (String) comboLabel.getData(comboLabel.getText());
+               }
                execute(Tool.AssignButton, null);
                }
                });
@@ -297,6 +289,7 @@ public class SegmentationView extends Composite {
                {
                // set text for term label
                        combo.add(term.getFormattedTerm(),i);
+                       combo.setData(term.getFormattedTerm(), term.getName());
                        i++;
                }
        }
@@ -314,7 +307,6 @@ public class SegmentationView extends Composite {
                {
                        speciesCombo.add(species);
                }
-               System.out.println(speciesMap.size());
                searchSpecies.setEnabled(!(speciesCombo.getText().isEmpty()));
                speciesCombo.setListVisible(true);
        }
index 4599a9fdb265803387425e022c755a8a4a822dc0..2e336f17619eb2fe90c67b2d1f482a2b29c95fb8 100644 (file)
@@ -6,6 +6,7 @@ import ie.dcu.util.FileUtils;
 
 import java.io.*;
 
+import org.eclipse.jface.viewers.ComboViewer;
 import org.eclipse.swt.*;
 import org.eclipse.swt.dnd.*;
 import org.eclipse.swt.graphics.*;
@@ -663,7 +664,7 @@ public class SwtUtils {
                item.setControl(combo);
                return combo;
        }
-       
+               
        public static Combo addComboToComposite(Composite parent, int width, int style) {
                Composite box = new Composite(parent, SWT.NONE);
                box.setLayout(new GridLayout(SWT.FILL,false));