• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 5684 for branches

Show
Ignore:
Timestamp:
10/14/08 09:57:47 (7 weeks ago)
Author:
jburel
Message:

Add control to control the file attached to a given object. see ticket #673

Files:
1 modified

  • branches/Beta3.1/SRC/org/openmicroscopy/shoola/agents/metadata/editor/AttachmentsUI.java (modified) (2 diffs)

Legend:

Unmodified
Added
Removed
  • branches/Beta3.1/SRC/org/openmicroscopy/shoola/agents/metadata/editor/AttachmentsUI.java

    r5587 r5684  
    7373 
    7474//Application-internal dependencies 
     75import org.openmicroscopy.shoola.agents.editor.EditorAgent; 
    7576import org.openmicroscopy.shoola.agents.metadata.IconManager; 
    7677import org.openmicroscopy.shoola.agents.metadata.MetadataViewerAgent; 
    … …  
    990991                Iterator i = addedFiles.iterator(); 
    991992                File f; 
     993                List<File> notSupported = new ArrayList<File>(); 
     994                FileAnnotationData data = null; 
    992995                while (i.hasNext()) { 
    993996                        f = (File) i.next(); 
    994                         toAdd.add(new FileAnnotationData(f)); 
     997                        try { 
     998                                data = new FileAnnotationData(f); 
     999                        } catch (Exception e) { 
     1000                                notSupported.add(f); 
     1001                                data = null; 
     1002                        } 
     1003                        if (data != null) toAdd.add(data); 
     1004                } 
     1005                if (notSupported.size() > 0) { 
     1006                        UserNotifier un = EditorAgent.getRegistry().getUserNotifier(); 
     1007                        Iterator<File> k = notSupported.iterator(); 
     1008                        String s = ""; 
     1009                        while (k.hasNext()) { 
     1010                                s += (k.next()).getName(); 
     1011                                s += " "; 
     1012                        } 
     1013                        un.notifyInfo("Attach",  
     1014                                        "The following files cannot be attached: \n"+s); 
    9951015                } 
    9961016                if (addedFileAnnotations.size() > 0) 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/