Changeset 3798


Ignore:
Timestamp:
03/09/08 13:22:57 (12 years ago)
Author:
melissa
Message:

Added debugging messages to OME plugin and updated OME plugin menu entry.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/OMEPlugin.java

    r3759 r3798  
    5858  /** Executes the plugin. */ 
    5959  public void run(String arg) { 
     60    if (IJ.debugMode) IJ.log("Downloading from OME or OMERO server"); 
    6061    if (!Checker.checkJava() || !Checker.checkImageJ()) return; 
    6162    HashSet missing = new HashSet(); 
     
    6465    Checker.checkLibrary(Checker.OME_JAVA_DS, missing); 
    6566    Checker.checkLibrary(Checker.FORMS, missing); 
    66     if (!Checker.checkMissing(missing)) return; 
     67    if (!Checker.checkMissing(missing)) { 
     68      if (IJ.debugMode) IJ.log("Required libraries are missing, exiting."); 
     69      return; 
     70    } 
    6771    this.arg = arg; 
    6872    runPlugin(); 
     
    128132    cred.password = pass; 
    129133    cred.isOMERO = type.equals("OMERO"); 
     134    if (IJ.debugMode) IJ.log("Attempting to log in to " + server + ":" + port); 
    130135    try { 
    131136      OMEUtils.login(cred); 
     
    136141      getInput(); 
    137142    } 
     143    catch (ClassNotFoundException e) { 
     144      IJ.error("Login failed"); 
     145      e.printStackTrace(); 
     146      getInput(); 
     147    } 
    138148 
    139149    Prefs.set("downloader.server", server); 
     
    141151    Prefs.set("downloader.port", port); 
    142152    Prefs.set("downloader.type", type); 
     153    if (IJ.debugMode) IJ.log("Login successful!"); 
    143154  } 
    144155 
     
    153164    OMEUtils.logout(cred.isOMERO); 
    154165    IJ.showStatus("OME: Completed"); 
     166    if (IJ.debugMode) IJ.log("Logged out."); 
    155167  } 
    156168 
     
    167179 
    168180      // prompt for search criteria 
     181 
     182      if (IJ.debugMode) IJ.log("Prompting for search criteria..."); 
    169183 
    170184      String name = null, firstName = null, lastName = null, iname = null, 
     
    186200 
    187201        if (searchBox.wasCanceled()) { 
     202          if (IJ.debugMode) IJ.log("Search cancelled, returning."); 
    188203          cancelPlugin = true; 
    189204          return; 
     
    212227      if (id != null && id.trim().equals("")) id = null; 
    213228 
     229      if (IJ.debugMode) IJ.log("Search for matching images..."); 
     230 
    214231      // filter images based on search terms 
    215232      OMEUtils.filterPixels(firstName, lastName, iname, created, id, 
     
    220237      long[] images = null; 
    221238      if (arg == null || arg.trim().equals("")) { 
     239        if (IJ.debugMode) IJ.log("Found images..."); 
    222240        images = new OMEUtils().showTable(cred); 
    223241      } 
    224242 
    225243      if (images == null || images.length == 0) { 
     244        if (IJ.debugMode) IJ.log("No images found!"); 
    226245        logout(); 
    227246        return; 
     
    230249      // download into ImageJ 
    231250      for (int i=0; i<images.length; i++) { 
     251        if (IJ.debugMode("Downloading image ID " + images[i]); 
    232252        String type = cred.isOMERO ? "OMERO server" : "OME server"; 
    233253        String file = "location=[" + type + "] open=[" + cred.server + 
  • trunk/loci/plugins/plugins.config

    r3644 r3798  
    3434 
    3535Plugins>LOCI, "-" 
    36 Plugins>LOCI, "Download from OME", loci.plugins.LociImporter("location=[OME server]") 
     36Plugins>LOCI, "Download from OME or OMERO", loci.plugins.LociImporter("location=[OME server]") 
    3737Plugins>LOCI, "Upload to OME", loci.plugins.LociUploader("") 
    3838 
Note: See TracChangeset for help on using the changeset viewer.