Skip to content

Commit

Permalink
Merge pull request #1329 from virtualcell/release-N5-experience
Browse files Browse the repository at this point in the history
Release n5 experience
  • Loading branch information
AvocadoMoon committed Aug 16, 2024
2 parents 1cd8a8a + 917733c commit 9d84243
Show file tree
Hide file tree
Showing 32 changed files with 1,015 additions and 791 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void main(String[] args) {
try {
ErrorUtils.setDebug(true);
PropertyLoader.loadProperties(ArrayUtils.addAll(REQUIRED_CLIENT_PROPERTIES, REQUIRED_LOCAL_PROPERTIES));
Injector injector = Guice.createInjector(new VCellServerModule());
Injector injector = Guice.createInjector(new VCellStandaloneModule());

VCellClientDevMain vcellClientStandalone = injector.getInstance(VCellClientDevMain.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.vcell.standalone;

import cbit.vcell.field.db.LocalExternalDataIdentifierServiceImpl;
import cbit.vcell.message.VCMessagingService;
import cbit.vcell.message.jms.activeMQ.VCMessagingServiceActiveMQ;
import cbit.vcell.message.server.bootstrap.LocalVCellConnectionFactory;
import cbit.vcell.message.server.bootstrap.LocalVCellConnectionServiceImpl;
import cbit.vcell.server.LocalVCellConnectionService;
import cbit.vcell.server.VCellConnectionFactory;
import cbit.vcell.simdata.ExternalDataIdentifierService;
import com.google.inject.AbstractModule;
import org.vcell.service.registration.RegistrationService;
import org.vcell.service.registration.localdb.LocaldbRegistrationService;

public class VCellStandaloneModule extends AbstractModule {
@Override
protected void configure() {
bind(ExternalDataIdentifierService.class).toInstance(new LocalExternalDataIdentifierServiceImpl());

bind(LocalVCellConnectionService.class).toInstance(new LocalVCellConnectionServiceImpl());
bind(VCellConnectionFactory.class).to(LocalVCellConnectionFactory.class).asEagerSingleton();

bind(RegistrationService.class).toInstance(new LocaldbRegistrationService());
}
}
1 change: 1 addition & 0 deletions vcell-api/src/main/java/org/vcell/rest/VCellApiMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public static void main(String[] args) {
private static final String REQUIRED_SERVICE_PROPERTIES[] = {
PropertyLoader.vcellServerIDProperty,
PropertyLoader.vcellServerPrefixV0,
PropertyLoader.vcellSoftwareVersion,
PropertyLoader.installationRoot,
PropertyLoader.dbConnectURL,
PropertyLoader.dbDriverName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2253,15 +2253,16 @@ private void updateChoiceVariableType(PDEDataContext pdeDataContext){

DataIdentifier[] dataIDArr = pdeDataContext.getDataIdentifiers();
for (int i = 0; i < dataIDArr.length; i++) {
// String vmPrefix = (dataIDArr[i].getVariableType().equals(VariableType.VOLUME)
// ?"V"
// :(dataIDArr[i].getVariableType().equals(VariableType.MEMBRANE)?"M":"?"));
VariableType variableType = dataIDArr[i].getVariableType();

String varListName = dataIDArr[i].getName();//"("+vmPrefix+") "+dataIDArr[i].getName();
boolean allowedVolumeExport = variableType.equals(VariableType.VOLUME) ||
(variableType.equals(VariableType.POSTPROCESSING) && !getSelectedFormat().equals(ExportFormat.N5));
if(getBothVarRadioButton().isSelected()){
dataIdentifierTreeSet.add(varListName);
}else if(getVolVarRadioButton().isSelected() && (dataIDArr[i].getVariableType().equals(VariableType.VOLUME) || dataIDArr[i].getVariableType().equals(VariableType.POSTPROCESSING))){
}else if(getVolVarRadioButton().isSelected() && allowedVolumeExport){
dataIdentifierTreeSet.add(varListName);
}else if(getMembVarRadioButton().isSelected() && dataIDArr[i].getVariableType().equals(VariableType.MEMBRANE)){
}else if(getMembVarRadioButton().isSelected() && variableType.equals(VariableType.MEMBRANE)){
dataIdentifierTreeSet.add(varListName);
}
}
Expand Down Expand Up @@ -2433,6 +2434,7 @@ private void updateInterface() {
break;
case N5:
getJRadioButtonROI().setEnabled(false);
getROISelections().setEnabled(false);
getJRadioButtonSlice().setEnabled(false);
getMembVarRadioButton().setEnabled(false);
getBothVarRadioButton().setEnabled(false);
Expand Down
10 changes: 9 additions & 1 deletion vcell-client/src/main/java/cbit/vcell/desktop/ClientLogin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
import cbit.vcell.client.server.ClientServerInfo;
import cbit.vcell.client.task.AsynchClientTask;
import cbit.vcell.server.Auth0ConnectionUtils;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Key;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import org.vcell.DependencyConstants;
import org.vcell.util.document.User;
import org.vcell.util.gui.VCellIcons;
import scala.util.parsing.combinator.testing.Str;

import javax.swing.*;
import java.util.Hashtable;
Expand Down Expand Up @@ -103,13 +106,18 @@ public void run(Hashtable<String, Object> hashTable) throws Exception {
return task;
}

@Inject @Named(DependencyConstants.VCELL_QUARKUS_API_HOST)
static String hostname;

@Inject
public static AsynchClientTask connectToServer(Auth0ConnectionUtils auth0ConnectionUtils,
ClientServerInfo clientServerInfo){

AsynchClientTask task = new AsynchClientTask("Connecting to Server", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
String hostname = VCellClientMain.injector.getInstance(Key.get(String.class, Names.named(DependencyConstants.VCELL_QUARKUS_API_HOST)));


// String hostname = VCellClientMain.injector.getInstance(Key.get(String.class, Names.named(DependencyConstants.VCELL_QUARKUS_API_HOST)));
// try server connection
boolean login = (boolean)hashTable.get("login");
boolean isGuest = (boolean)hashTable.get("guest");
Expand Down
Loading

0 comments on commit 9d84243

Please sign in to comment.