/[svn]/jsampler/trunk/src/org/jsampler/JSUtils.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/JSUtils.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2287 by iliev, Sun Jul 3 22:01:16 2011 UTC revision 2288 by iliev, Wed Nov 23 21:19:44 2011 UTC
# Line 79  public class JSUtils { Line 79  public class JSUtils {
79          /**          /**
80           * Changes the JSampler's home directory and moves all files from           * Changes the JSampler's home directory and moves all files from
81           * the old JSampler's home directory to the new one. If all files are           * the old JSampler's home directory to the new one. If all files are
82           * moved succesfully, the old directory is deleted.           * moved successfully, the old directory is deleted.
83           * @param path The location of the new JSampler's home directory. If           * @param path The location of the new JSampler's home directory. If
84           * the last directory in the path doesn't exist, it is created.           * the last directory in the path doesn't exist, it is created.
85           */           */
# Line 87  public class JSUtils { Line 87  public class JSUtils {
87          changeJSamplerHome(String path) {          changeJSamplerHome(String path) {
88                  File fNew = new File(path);                  File fNew = new File(path);
89                  if(fNew.exists() && fNew.isFile()) {                  if(fNew.exists() && fNew.isFile()) {
90                          HF.showErrorMessage(i18n.getError("CC.JSamplerHomeIsNotDir!"));                          CC.getViewConfig().showErrorMessage(i18n.getError("CC.JSamplerHomeIsNotDir!"));
91                          return;                          return;
92                  }                  }
93    
94                  if(!fNew.exists()) {                  if(!fNew.exists()) {
95                          if(!fNew.mkdir()) {                          if(!fNew.mkdir()) {
96                                  String s = fNew.getAbsolutePath();                                  String s = fNew.getAbsolutePath();
97                                  HF.showErrorMessage(i18n.getError("CC.mkdirFailed", s));                                  CC.getViewConfig().showErrorMessage(i18n.getError("CC.mkdirFailed", s));
98                                  return;                                  return;
99                          }                          }
100                  }                  }
# Line 150  public class JSUtils { Line 150  public class JSUtils {
150                          }                          }
151                  } catch(Exception e) {                  } catch(Exception e) {
152                          CC.getLogger().log(Level.FINE, HF.getErrorMessage(e), e);                          CC.getLogger().log(Level.FINE, HF.getErrorMessage(e), e);
153                          HF.showErrorMessage(e);                          CC.getViewConfig().showErrorMessage(e);
154                  }                  }
155          }          }
156    
# Line 443  public class JSUtils { Line 443  public class JSUtils {
443                  }                  }
444    
445                  int chnId = 0;                  int chnId = 0;
446                  for(JSChannelsPane cp : CC.getMainFrame().getChannelsPaneList()) {                  for(Object cp : CC.getMainFrame().getChannelsPaneList()) {
447                          for(JSChannel chn : cp.getChannels()) {                          for(JSChannel chn : ((JSChannelsPane)cp).getChannels()) {
448                                  SamplerChannelModel scm;                                  SamplerChannelModel scm;
449                                  scm = CC.getSamplerModel().getChannelById(chn.getChannelId());                                  scm = CC.getSamplerModel().getChannelById(chn.getChannelId());
450                                  exportChannelToLscpScript(scm.getChannelInfo(), chnId, lscpClient);                                  exportChannelToLscpScript(scm.getChannelInfo(), chnId, lscpClient);

Legend:
Removed from v.2287  
changed lines
  Added in v.2288

  ViewVC Help
Powered by ViewVC