Skip to content

Commit f345095

Browse files
author
Thorben Groos
authored
Merge pull request #189 from grthor/euclid
Replaced actions with commands
2 parents e8a9195 + abce206 commit f345095

12 files changed

Lines changed: 1434 additions & 1099 deletions

File tree

org.jcryptool.games.numbershark/src/org/jcryptool/games/numbershark/util/CommandState.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public void dispose() {
9494

9595
}
9696

97-
@SuppressWarnings("rawtypes")
9897
@Override
9998
public Map getCurrentState() {
10099

org.jcryptool.visual.euclid/OSGI-INF/l10n/bundle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ Bundle-Vendor = jcryptool.org, by Felix Eckardt, Merlin de la Haye
33
Bundle-Name = Extended Euclidean / Reciprocal Subtraction Plug-in
44
view.name = Extended Euclidean / Reciprocal Subtraction
55
Visual.name = Extended Euclidean / Reciprocal Subtraction
6-
restart.command.name = Restart
6+
restart.command.name = Restart
7+
restart.command.csvexport = Export to CSV
8+
restart.command.pdfexport = Export to PDF
9+
restart.command.texexport = Export to Tex

org.jcryptool.visual.euclid/OSGI-INF/l10n/bundle_de.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ Bundle-Vendor = jcryptool.org, von Felix Eckardt, Merlin de la Haye
33
Bundle-Name = Extended Euclidean / Alternating Removal Plug-in
44
view.name = Erweiterter Euklid / Wechselwegnahme
55
Visual.name = Erweiterter Euklid / Wechselwegnahme
6-
restart.command.name = Neustart
6+
restart.command.name = Neustart
7+
restart.command.csvexport = Exportieren als CSV
8+
restart.command.pdfexport = Exportieren als PDF
9+
restart.command.texexport = Exportieren als Tex

org.jcryptool.visual.euclid/plugin.xml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,115 @@
3232
file="$nl$/help/contexts.xml">
3333
</contexts>
3434
</extension>
35+
36+
<extension
37+
point="org.eclipse.ui.handlers">
38+
<handler
39+
class="org.jcryptool.visual.euclid.handler.RestartHandler"
40+
commandId="org.jcryptool.visual.euclid.restartCommand">
41+
</handler>
42+
<handler
43+
class="org.jcryptool.visual.euclid.handler.ExportToCSVHandler"
44+
commandId="org.jcryptool.visual.euclid.CSVexportCommand">
45+
<activeWhen>
46+
<with
47+
variable="org.jcryptool.visual.euclid.commands.CsvState">
48+
<equals
49+
value="ENABLED">
50+
</equals>
51+
</with>
52+
</activeWhen>
53+
</handler>
54+
<handler
55+
class="org.jcryptool.visual.euclid.handler.ExportToPDFHandler"
56+
commandId="org.jcryptool.visual.euclid.PDFexportCommand">
57+
<activeWhen>
58+
<with
59+
variable="org.jcryptool.visual.euclid.commands.PdfState">
60+
<equals
61+
value="ENABLED">
62+
</equals>
63+
</with>
64+
</activeWhen>
65+
</handler>
66+
<handler
67+
class="org.jcryptool.visual.euclid.handler.ExportToTEXHandler"
68+
commandId="org.jcryptool.visual.euclid.TEXexportCommand">
69+
<activeWhen>
70+
<with
71+
variable="org.jcryptool.visual.euclid.commands.TexState">
72+
<equals
73+
value="ENABLED">
74+
</equals>
75+
</with>
76+
</activeWhen>
77+
</handler>
78+
79+
</extension>
80+
<extension
81+
point="org.eclipse.ui.commands">
82+
<command
83+
id="org.jcryptool.visual.euclid.restartCommand"
84+
name="%restart.command.name">
85+
</command>
86+
<command
87+
id="org.jcryptool.visual.euclid.CSVexportCommand"
88+
name="%restart.command.csvexport">
89+
</command>
90+
<command
91+
id="org.jcryptool.visual.euclid.PDFexportCommand"
92+
name="%restart.command.pdfexport">
93+
</command>
94+
<command
95+
id="org.jcryptool.visual.euclid.TEXexportCommand"
96+
name="%restart.command.texexport">
97+
</command>
98+
</extension>
99+
100+
<extension
101+
point="org.eclipse.ui.menus">
102+
<menuContribution
103+
locationURI="toolbar:org.jcryptool.visual.euclid.view">
104+
<command
105+
commandId="org.jcryptool.visual.euclid.restartCommand"
106+
icon="/icons/view.gif"
107+
style="push">
108+
</command>
109+
</menuContribution>
110+
<menuContribution
111+
locationURI="menu:org.jcryptool.visual.euclid.view">
112+
<command
113+
commandId="org.jcryptool.visual.euclid.CSVexportCommand"
114+
style="push">
115+
</command>
116+
<command
117+
commandId="org.jcryptool.visual.euclid.PDFexportCommand"
118+
style="push">
119+
</command>
120+
<command
121+
commandId="org.jcryptool.visual.euclid.TEXexportCommand"
122+
style="push">
123+
</command>
124+
</menuContribution>
125+
</extension>
126+
127+
<extension
128+
point="org.eclipse.ui.services">
129+
<sourceProvider
130+
provider="org.jcryptool.visual.euclid.handler.CommandState">
131+
<variable
132+
name="org.jcryptool.visual.euclid.commands.CsvState"
133+
priorityLevel="workbench">
134+
</variable>
135+
<variable
136+
name="org.jcryptool.visual.euclid.commands.PsvState"
137+
priorityLevel="workbench">
138+
</variable>
139+
<variable
140+
name="org.jcryptool.visual.euclid.commands.TexState"
141+
priorityLevel="workbench">
142+
</variable>
143+
</sourceProvider>
144+
</extension>
35145

36146
</plugin>

org.jcryptool.visual.euclid/src/org/jcryptool/visual/euclid/FileExporter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public void exportToPDF() {
7272

7373
for (int i=0; i<size; i++) {
7474
table.addCell(new Phrase(euclid[i]));
75-
System.out.println("3 "+i);
7675
}
7776

7877
document.add(new Paragraph("Extended Euclidian"));

0 commit comments

Comments
 (0)