Skip to content

Commit

Permalink
Added an entry for the keystore in the algorithm dropdown menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorben Groos committed Jun 19, 2018
1 parent 48a240f commit d26d0de
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion org.jcryptool.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ Export-Package: org.jcryptool.core,
Import-Package: org.jcryptool.core.logging.utils,
org.jcryptool.core.operations,
org.jcryptool.core.util.constants,
org.jcryptool.core.util.directories
org.jcryptool.core.util.directories,
org.jcryptool.crypto.keystore.commands
Automatic-Module-Name: org.jcryptool.core
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@

import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.CommandManager;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
Expand All @@ -44,8 +48,10 @@
import org.eclipse.ui.menus.CommandContributionItemParameter;
import org.eclipse.ui.services.IServiceLocator;
import org.jcryptool.core.actions.ShowPluginViewHandler;
import org.jcryptool.core.logging.utils.LogUtil;
import org.jcryptool.core.operations.CommandInfo;
import org.jcryptool.core.operations.OperationsPlugin;
import org.jcryptool.crypto.keystore.commands.OpenKeystoreHandler;

/**
* <p>
Expand Down Expand Up @@ -393,7 +399,26 @@ public int compare(String id1, String id2) {
}

menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));


//This is the keystore entry in the algorithm drop down menu
IAction openKeystoreAction = new Action() {
@Override
public void run() {
try {
new OpenKeystoreHandler().execute(new ExecutionEvent());
} catch (ExecutionException e) {
LogUtil.logError(e.getMessage());
}
super.run();
}

@Override
public String getText() {
return Messages.ApplicationActionBarAdvisor_Keystore;
}

};
menu.add(openKeystoreAction);
return menu;
}

Expand Down
2 changes: 2 additions & 0 deletions org.jcryptool.core/src/org/jcryptool/core/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class Messages extends NLS {

public static String ApplicationActionBarAdvisor_5;

public static String ApplicationActionBarAdvisor_Keystore;

public static String ApplicationWorkbenchAdvisor_4;

public static String applicationActionBarAdvisor_Menu_Algorithms;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ApplicationActionBarAdvisor_0=Analysis
ApplicationActionBarAdvisor_1=Open with
ApplicationActionBarAdvisor_2=Visuals
ApplicationActionBarAdvisor_5=Games
ApplicationActionBarAdvisor_Keystore=Keystore
ApplicationWorkbenchAdvisor_4=unsaved
applicationActionBarAdvisor_Menu_Algorithms=Algorithms
applicationActionBarAdvisor_Menu_Algorithms_Asymmetric=Asymmetric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ApplicationActionBarAdvisor_0=Analysen
ApplicationActionBarAdvisor_1=\u00d6ffnen mit
ApplicationActionBarAdvisor_2=Visualisierungen
ApplicationActionBarAdvisor_5=Spiele
ApplicationActionBarAdvisor_Keystore=Schl\u00fcsselspeicher
ApplicationWorkbenchAdvisor_4=unbenannt
applicationActionBarAdvisor_Menu_Algorithms=Algorithmen
applicationActionBarAdvisor_Menu_Algorithms_Asymmetric=Asymmetrisch
Expand Down

0 comments on commit d26d0de

Please sign in to comment.