Skip to content

Commit

Permalink
Cyactivator cleaned of some unused factories and examole
Browse files Browse the repository at this point in the history
  • Loading branch information
herme committed Jan 22, 2024
1 parent ed87840 commit 93789f7
Showing 1 changed file with 22 additions and 50 deletions.
72 changes: 22 additions & 50 deletions src/main/java/be/kuleuven/mgG/internal/CyActivator.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@
import be.kuleuven.mgG.internal.tasks.CreateNetworkTaskFactory;
import be.kuleuven.mgG.internal.tasks.ImportFileTaskFactory;
import be.kuleuven.mgG.internal.tasks.ImportMetadataTaskFactory;
import be.kuleuven.mgG.internal.tasks.ImportNetworkTaskFactory;
import be.kuleuven.mgG.internal.tasks.ImportNetworkDataTaskFactory;

import be.kuleuven.mgG.internal.tasks.SendDataToServerTaskFactory;
import be.kuleuven.mgG.internal.tasks.ShowResultsPanelAction;
import be.kuleuven.mgG.internal.tasks.ShowResultsPanelTaskFactory;
import be.kuleuven.mgG.internal.tasks.examoleFactory;

import be.kuleuven.mgG.internal.utils.Mutils;
import be.kuleuven.mgG.internal.view.JSONDisplayPanel;

Expand Down Expand Up @@ -97,7 +98,7 @@ public void start(BundleContext bc) {



// Register taskfactory
// Register taskfactories

ImportFileTaskFactory mggImportFileTaskFactory = new ImportFileTaskFactory(MGGManager);
Properties props = new Properties();
Expand Down Expand Up @@ -126,7 +127,7 @@ public void start(BundleContext bc) {
registerService(bc, mggImportMetaDataTaskFactory, TaskFactory.class, metadataprops);


ImportNetworkTaskFactory mggImportNetWorkTaskFactory=new ImportNetworkTaskFactory(MGGManager);
ImportNetworkDataTaskFactory mggImportNetWorkTaskFactory=new ImportNetworkDataTaskFactory(MGGManager);
Properties networkprops=new Properties();
networkprops.setProperty(TITLE, "Import Current Network");
networkprops.setProperty(PREFERRED_MENU, "Apps.MGG.Import Data");
Expand Down Expand Up @@ -180,35 +181,22 @@ public void start(BundleContext bc) {

registerService(bc, mggCheckNetworkTaskFactory , TaskFactory.class, checkNetworkprops);

CreateMGGVisualStyleTaskFactory mggCreateMGGVisualStyleTaskFactory = new CreateMGGVisualStyleTaskFactory (MGGManager);
Properties createMGGvisualprops = new Properties();
createMGGvisualprops.setProperty(TITLE, "MGG visual style");
createMGGvisualprops.setProperty(PREFERRED_MENU, "Apps.MGG.MGG visual style");
createMGGvisualprops.setProperty(IN_TOOL_BAR, "FALSE");
createMGGvisualprops.setProperty(IN_MENU_BAR, "TRUE");
createMGGvisualprops.setProperty(MENU_GRAVITY, "4");
createMGGvisualprops.setProperty(COMMAND_NAMESPACE, "MGG");
createMGGvisualprops.setProperty(COMMAND_DESCRIPTION, "Create MGG visual style");
createMGGvisualprops.setProperty(COMMAND, "MGG_visual_style");

registerService(bc, mggCreateMGGVisualStyleTaskFactory , TaskFactory.class, createMGGvisualprops);


//---------------------
examoleFactory examole = new examoleFactory(MGGManager);
Properties exaprops1 = new Properties();
exaprops1.setProperty(TITLE, "examole");
exaprops1.setProperty(PREFERRED_MENU, "Apps.MGG.examole");
exaprops1.setProperty(IN_TOOL_BAR, "FALSE");
exaprops1.setProperty(IN_MENU_BAR, "TRUE");
exaprops1.setProperty(MENU_GRAVITY, "3");
exaprops1.setProperty(COMMAND_NAMESPACE, "MGG");
exaprops1.setProperty(COMMAND_DESCRIPTION, "examole");
exaprops1.setProperty(COMMAND, "examole");

registerService(bc, examole, TaskFactory.class, exaprops1);

















// Register taskfactory
Expand All @@ -219,7 +207,7 @@ public void start(BundleContext bc) {
Sendprops.setProperty(PREFERRED_MENU, "Apps.MGG");
Sendprops.setProperty(IN_TOOL_BAR, "FALSE");
Sendprops.setProperty(IN_MENU_BAR, "TRUE");
Sendprops.setProperty(MENU_GRAVITY, "2");
Sendprops.setProperty(MENU_GRAVITY, "1");
Sendprops.setProperty(COMMAND_NAMESPACE, "MGG");
Sendprops.setProperty(COMMAND_DESCRIPTION, "Upload data to Microbetag Server and Get the Network");
Sendprops.setProperty(COMMAND, "Get_Network");
Expand All @@ -229,27 +217,11 @@ public void start(BundleContext bc) {



// CreateMGGVisualStyleTaskFactory mggVisualStyleTaskFactory=new CreateMGGVisualStyleTaskFactory(MGGManager);
//
// Properties Visualprops = new Properties();
// Visualprops.setProperty(TITLE, "Apply MGG Visual Style");
// Visualprops.setProperty(PREFERRED_MENU, "Apps.MGG.Visual Style");
// Visualprops.setProperty(IN_TOOL_BAR, "FALSE");
// Visualprops.setProperty(IN_MENU_BAR, "TRUE");
// Visualprops.setProperty(MENU_GRAVITY, "1");
// Visualprops.setProperty(COMMAND_NAMESPACE, "MGG");
// Visualprops.setProperty(COMMAND_DESCRIPTION, "Get MGG visual Style");
// Visualprops.setProperty(COMMAND, "Get_Style");
//
// registerService(bc,mggVisualStyleTaskFactory, TaskFactory.class, Visualprops);
//




CreateMGGVisualStyle createVisualStyleAction = new CreateMGGVisualStyle(MGGManager);
// CreateMGGVisualStyle createVisualStyleAction = new CreateMGGVisualStyle(MGGManager);

registerService(bc, createVisualStyleAction, CyAction.class, new Properties());
// registerService(bc, createVisualStyleAction, CyAction.class, new Properties());

{
ShowResultsPanelAction sra = new ShowResultsPanelAction("Show results panel", MGGManager);
Expand All @@ -259,7 +231,7 @@ public void start(BundleContext bc) {
//showResults.reregister();
MGGManager.setShowResultsPanelTaskFactory(showResults);

// Now bring up the side panel if the current network is a STRING network
// Now bring up the side panel if the current network is a MGG network
CyNetwork current = MGGManager.getCurrentNetwork();
if (Mutils.ifHaveMGG(current)) {
// It's the current network. Bring up the results panel
Expand Down

0 comments on commit 93789f7

Please sign in to comment.