Skip to content
Snippets Groups Projects
Commit 1b9b3275 authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

feat: iss1106

changing menu item name and window name
parent b305105e
No related branches found
Tags
No related merge requests found
......@@ -31,7 +31,7 @@ import net.imagej.ImageJ;
* @author koz01
*
*/
@Plugin(type = Command.class, headless = false, menuPath = "Plugins>SPIM benchmark")
@Plugin(type = Command.class, headless = false, menuPath = "Plugins>" + Constants.MENU_ITEM_NAME + ">" + Constants.SUBMENU_ITEM_NAME)
public class ManageSPIMBenchmark implements Command {
private static Logger log = LoggerFactory
......@@ -61,33 +61,33 @@ public class ManageSPIMBenchmark implements Command {
@Override
public void run() {
try {
Path workingDirPath = Paths.get(workingDirectory.getPath());
final Path workingDirPath = Paths.get(workingDirectory.getPath());
if (!Files.isDirectory(workingDirPath)) {
Files.createDirectories(workingDirPath);
}
FileLock fl = new FileLock(workingDirPath.resolve(LOCK_FILE_NAME));
final FileLock fl = new FileLock(workingDirPath.resolve(LOCK_FILE_NAME));
if(!fl.tryLock()) {
uiService.showDialog("Working directory is already used by someone else", MessageType.ERROR_MESSAGE);
return;
}
try {
JDialog dialog = new BenchmarkSPIMWindow(null,
final JDialog dialog = new BenchmarkSPIMWindow(null,
new BenchmarkSPIMParametersImpl(userName, password, Constants.PHONE, email, workingDirPath));
dialog.setTitle("SPIM workflow computation manager");
dialog.setTitle(Constants.MENU_ITEM_NAME + " " + Constants.SUBMENU_ITEM_NAME);
dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
dialog.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
public void windowClosing(final WindowEvent e) {
super.windowClosing(e);
fl.close();
}
});
dialog.setVisible(true);
} catch(IOException e) {
} catch(final IOException e) {
fl.close();
throw e;
}
} catch (IOException e) {
} catch (final IOException e) {
log.error(e.getMessage(), e);
}
......
......@@ -4,6 +4,10 @@ import java.util.LinkedHashMap;
import java.util.Map;
public interface Constants {
String MENU_ITEM_NAME = "Multiview Reconstruction";
String SUBMENU_ITEM_NAME = "Remote Workflow Manager";
String PHONE = "123456789";
int HAAS_UPDATE_TIMEOUT = 30000;
short UI_TO_HAAS_FREQUENCY_UPDATE_RATIO = 10;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment