1 28 package org.objectweb.openccm.explorer.commandLine; 29 30 31 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 32 33 40 public class DefaultExplorerOption extends DefaultOptionBase { 41 42 43 protected DefaultApplication application_; 44 45 49 public DefaultExplorerOption(DefaultApplication application) { 50 super(); 52 setLabels(new String [] { "--defaultExplorer" }); 53 setArguments(new String [] { "file" }); 54 setDescription(new String [] { "Default explorer XML file (You don't have to use this option !)" }); 55 56 application_ = application; 58 } 59 60 64 68 public void consume(org.objectweb.util.cmdline.api.Iterator iterator) { 69 checkAlreadySet(iterator); 70 String files = consumeArgument(iterator); 71 java.util.List l = new java.util.Vector (); 72 if(files!=null && !files.equals("")){ 73 java.util.StringTokenizer st = new java.util.StringTokenizer (files,";"); 74 while (st.hasMoreTokens()) { 75 String file = st.nextToken(); 76 if(file!=null && !file.equals("")){ 77 l.add(file); 78 } 79 } 80 } 81 application_.setDefaultExplorerConfigFile((String [])l.toArray(new String [l.size()])); 82 } 83 84 } 85 | Popular Tags |