Skip to content

Commit 82f5985

Browse files
committed
Update tool window toolbar order and titles
1 parent 6c938f2 commit 82f5985

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

swan-assist/src/main/java/de/fraunhofer/iem/swan/assist/ui/MethodTreeRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean
5555
if (methodName.contains("<init>"))
5656
methodName = Formatter.trimProperty(method.getClassName(false));
5757

58-
text.setText("<html><font color='" + HIGHLIGHT_COLOR + "'>" + Formatter.trimProperty(method.getReturnType(false)) + "</font> <b>"+ methodName + "</b>( ) <font color='" +CWE_COLOR + "'>"+StringUtils.join(method.getCWEList(),", ").replaceAll("CWE","")+"</font></html>");
58+
text.setText("<html><font color='" + HIGHLIGHT_COLOR + "'>" + Formatter.trimProperty(method.getReturnType(false)) + "</font> <b>"+ methodName + "</b>( ) <font color='" +CWE_COLOR + "'>"+StringUtils.join(method.getCWEList(),", ")+"</font></html>");
5959
text.setIcon(IconUtils.getNodeIcon(method.getTypesList(false)));
6060

6161
if (method.getUpdateOperation() != null && method.getUpdateOperation().equals(Constants.METHOD_ADDED) && !selected)

swan-assist/src/main/resources/META-INF/plugin.xml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,22 @@
3333
text="Run Analysis">
3434
</action>
3535

36+
<action id="SWAN_Assist.ImportAction" class="de.fraunhofer.iem.swan.assist.actions.ImportAction"
37+
text="Import File"
3638
icon="AllIcons.ToolbarDecorator.Import"
39+
description="Import configuration file">
40+
</action>
41+
42+
<action id="SWAN_Assist.ExportAction"
43+
class="de.fraunhofer.iem.swan.assist.actions.ExportAction"
3744
icon="AllIcons.ToolbarDecorator.Export"
45+
text="Export File"
46+
description="Export configuration file">
47+
</action>
48+
3849
<!--action id="SuggestAction" class="de.fraunhofer.iem.swan.assist.actions.suggest.SuggestAction" text="Suggest Methods"
3950
description="Classify suggested methods" icon="PluginIcons.SUGGEST_ACTION"/-->
40-
<separator/>
51+
4152
<group id="SWAN_Assist.FilterActionGroup" class="de.fraunhofer.iem.swan.assist.actions.filter.FilterActionGroup"
4253
text="Filter Methods"
4354
popup="true" icon="AllIcons.General.Filter">
@@ -82,29 +93,23 @@
8293
<group id="EditorGroup" text="SWAN-Assist" popup="true" icon="PluginIcons.SWAN_ASSIST">
8394
<add-to-group group-id="EditorPopupMenu" />
8495
<action id="SWAN_Assist.Editor.LaunchSWANAction"
85-
class="de.fraunhofer.iem.swan.assist.actions.RunSwanAnalysisAction"
96+
class="de.fraunhofer.iem.swan.assist.actions.RunSwanAction"
8697
icon="AllIcons.Toolwindows.ToolWindowRun"
8798
text="Run Analysis">
8899
</action>
89100

90101
<separator/>
91102

92103
<action id="SWAN_Assist.AddMethodAction" class="de.fraunhofer.iem.swan.assist.actions.method.AddMethodAction"
93-
text="Classify/Re-Classify Method" icon="AllIcons.General.Add">
94-
</action>
95-
96-
<action id="SWAN_Assist.RestoreMethodAction" class="de.fraunhofer.iem.swan.assist.actions.method.RestoreMethodAction"
97-
text="Restore Method" >
104+
text="Add/Edit Method" icon="AllIcons.General.Add">
98105
</action>
99106

100107
<action id="SWAN_Assist.DeleteMethodAction" class="de.fraunhofer.iem.swan.assist.actions.method.DeleteMethodAction"
101-
text="Delete Classification">
102-
</action>
103-
104-
<action id="SWAN_Assist.MethodPropertiesAction" class="de.fraunhofer.iem.swan.assist.actions.method.MethodPropertiesAction"
105-
text="Classification Properties" >
108+
icon="AllIcons.General.Reset"
109+
text="Reset">
106110
</action>
107111

112+
<separator/>
108113
<action id="SWAN_Assist.MethodListAction" class="de.fraunhofer.iem.swan.assist.actions.method.MethodListAction"
109114
text="View Tool Window">
110115
</action>

swan-assist/src/main/resources/dialog_messages.properties

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Restore.Description
44

55
#Dialog for method categories
66
MethodDialog.Method= Method
7-
MethodDialog.UpdateTitle= Update Method
7+
MethodDialog.UpdateTitle= Edit
88
MethodDialog.AddTitle= Add Method
99
MethodDialog.SuggestTitle= Suggested Methods
1010
MethodDialog.Signature= Method
@@ -14,6 +14,9 @@ MethodDialog.Category = Category
1414
MethodDialog.AvailableCategory = Available Categories
1515
MethodDialog.SelectedCategory = Selected Categories
1616

17+
MethodDialog.Category.SRM = Security Relevant Methods (SRM)
18+
MethodDialog.Category.CWE = Common Weakness Enumeration (CWE)
19+
1720
#Dialog for running SWAN
1821
SettingsDialog.Title=Plugin Settings
1922
SettingsDialog.ProjectCheckBox = General Options
@@ -67,7 +70,7 @@ Messages.Error.MethodNotInEditor = Method not found in project or cannot be loca
6770
Messages.Error.PageNotFound = Page Not Found
6871

6972
#Confirmation messages
70-
Messages.Title.DeleteMethod = Delete Method
73+
Messages.Title.DeleteMethod = Remove
7174
Messages.Confirmation.DeleteMethod = Are you sure you want to delete this method?
7275

7376
Messages.Title.RestoreMethod = Restore Method

0 commit comments

Comments
 (0)