<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.vamsas.test.simpleclient.ClientsFileTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="testClientList add jalview 1.0 add Jalview 2.0 list"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="testClientList add jalview 1.0 add Jalview 2.0 list remove jalview 1.0 vamsas://jalview:1.0/ list add VamsasTest 0.1 list clear list"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:VamsasClient}/test"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/tmp/testClietList"/>
</launchConfiguration>
for (int k=0,i = 0, j = clients.length; i < j; i++)
if (i!=mynum)
newlist[k++] = clients[i];
- if (!putClientList(clients))
+ if (!putClientList(newlist))
throw new Error("Failed to write new clientList!"); // failed to put the clientList to disk.
}
}
* Note: Caller is left to release the lock on the ClientList.
* @param me
* @param disambiguate -
- * flag indicating if the URN for me should be disambiguate to
+ * flag indicating if the URN for me should be disambiguated to
* differentiate between sessions.
* @return index of clientHandle in new list, or -1-position of existing
* clientHandle (if disambiguate is true)
e.printStackTrace(System.err);
return;
}
- int argc=0;
+ int argc=1;
while (argc<args.length) {
- argc++;
Iterator coms = commands.iterator();
int com=-1;
while ((coms!=null) && coms.hasNext()) {
// Add
ClientsFileTest.complainArgs(args.length, argc, "add", 2, "for the Client's 'Name' and 'Version'");
int pos = cfhand.addClient(ch=new ClientHandle(args[argc],args[argc+1]));
- argc+=1;
+ argc+=2;
if (pos!=0)
System.out.println("Client added at "+pos+" as urn:"+ch.getClientUrn());
else
ClientsFileTest.complainArgs(args.length, argc, "remove", 3, "for the Client's 'Name', Version and URN");
ch=new ClientHandle(args[argc], args[argc+1]);
ch.setClientUrn(args[argc+2]);
- argc+=2;
+ argc+=3;
cfhand.removeClient(ch);
System.out.println("Client removed (apparently)");
break;
}
}
if (coms!=null) {
- System.err.println("Unknown command : "+args[argc] + "*Ignored!*");
+ System.err.println("Unknown command : "+args[argc++] + "*Ignored!*");
};
}
}