190 |
try { setResult(CC.getClient().getFileInstruments(filename)); } |
try { setResult(CC.getClient().getFileInstruments(filename)); } |
191 |
catch(Exception x) { |
catch(Exception x) { |
192 |
String s = getDescription() + ": " + HF.getErrorMessage(x); |
String s = getDescription() + ": " + HF.getErrorMessage(x); |
193 |
CC.getLogger().log(Level.FINER, s, x); |
CC.getLogger().log(Level.FINE, s, x); |
194 |
|
} |
195 |
|
} |
196 |
|
} |
197 |
|
|
198 |
|
/** |
199 |
|
* This task gets information about the specified instrument. |
200 |
|
*/ |
201 |
|
public static class GetFileInstrument extends EnhancedTask<Instrument> { |
202 |
|
private final String filename; |
203 |
|
private final int instrIdx; |
204 |
|
|
205 |
|
/** Creates a new instance of <code>GetFileInstrument</code>. */ |
206 |
|
public |
207 |
|
GetFileInstrument(String filename, int instrIdx) { |
208 |
|
this.filename = filename; |
209 |
|
this.instrIdx = instrIdx; |
210 |
|
setTitle("Global.GetFileInstrument_task"); |
211 |
|
setDescription(i18n.getMessage("Global.GetFileInstrument.desc")); |
212 |
|
} |
213 |
|
|
214 |
|
/** The entry point of the task. */ |
215 |
|
public void |
216 |
|
run() { |
217 |
|
try { setResult(CC.getClient().getFileInstrumentInfo(filename, instrIdx)); } |
218 |
|
catch(Exception x) { |
219 |
|
String s = getDescription() + ": " + HF.getErrorMessage(x); |
220 |
|
CC.getLogger().log(Level.FINE, s, x); |
221 |
} |
} |
222 |
} |
} |
223 |
} |
} |