forked from SpartanRefactoring/Main
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.xml
More file actions
208 lines (188 loc) · 7.78 KB
/
Copy pathplugin.xml
File metadata and controls
208 lines (188 loc) · 7.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<!-- Which class to run at startup -->
<extension point="org.eclipse.ui.startup">
<startup class="il.org.spartan.plugin.Plugin"/>
</extension>
<!-- Builder, i.e, the system component that keeps generating spartan tips when
the program changes: https://goo.gl/sIqIBC
-->
<extension
name="Spartan tipper"
id="spartan.tipper"
point="org.eclipse.core.resources.builders"
>
<!-- the central part of tipping: which Java class to run on changes -->
<builder hasNature="true">
<run class="il.org.spartan.plugin.Builder"/>
</builder>
</extension>
<!-- Preferences page -->
<extension point="org.eclipse.ui.preferencePages">
<page
name="Laconization Tips"
class="il.org.spartan.plugin.PreferencesPage"
id="il.org.spartan.plugin.PluginPreferencesPage"
category="org.eclipse.jdt.ui.preferences.JavaBasePreferencePage">
</page>
</extension>
<!-- Preferences-->
<extension point="org.eclipse.core.runtime.preferences">
<scope
name="PluginPreferencesPage"
class="il.org.spartan.plugin.PreferencesPage"
/>
<initializer class="il.org.spartan.plugin.PreferencesDefaultValuesInitializer"/>
</extension>
<!-- Daniel Mittleman' application, used to produce the PLATEAU submission-->
<extension
point="org.eclipse.core.runtime.applications"
name="Batch spartanization"
id="il.org.spartan.spartanizer.application"
>
<application>
<run class="il.org.spartan.spartanizer.cmdline.Application"/>
</application>
</extension>
<!-- Matteo Orru's application, work in progres-->
<extension
point="org.eclipse.core.runtime.applications"
name="Metrics collector by Matteo Orru"
id="il.org.spartan.spartanizer.collectmetricsapp"
>
<application>
<run class="il.org.spartan.spartanizer.cmdline.CollectMetricsApp"></run>
</application>
</extension>
<!-- Marker: for showing the tips of spartanizaton
https://goo.gl/OI2pBd -->
<extension
id="il.org.spartan.tip"
name="Laconize"
point="org.eclipse.core.resources.markers"
>
<!-- in the future we may want to break this into several kinds, renaming,
syntactic baggage, ternarization, etc. -->
<super type="org.eclipse.core.resources.problemmarker"/>
</extension>
<extension point="org.eclipse.ui.editors.annotationTypes">
<type
name="il.org.spartan.tip"
super="org.eclipse.ui.workbench.texteditor.info"
markerType="org.eclipse.jdt.core.problem"
markerSeverity="0"
/>
</extension>
<!-- Marker resolution: this is where the quick fixg menus gets bound to the
Java class which generates several quick fix for tips. -->
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
markerType="il.org.spartan.tip"
class="il.org.spartan.plugin.QuickFixer"
/>
</extension>
<!-- Marker annotation: This defines the contents of markers (tips) collected by
applying the build to files of our nature -->
<extension point="org.eclipse.ui.editors.markerAnnotationSpecification">
<specification
annotationType="il.org.spartan.tip"
colorPreferenceKey="il.org.spartan.spartanizationMarker.color"
colorPreferenceValue="255,69,0"
contributesToHeader="true"
includeOnPreferencePage="true"
label="Tip"
overviewRulerPreferenceKey="il.org.spartan.plugin.spartanizationMarker.overview"
overviewRulerPreferenceValue="true"
presentationLayer="0"
textPreferenceKey="il.org.spartan.spartanizationMarker.text"
textPreferenceValue="true"
textStylePreferenceValue="PROBLEM_UNDERLINE"
verticalRulerPreferenceKey="il.org.spartan.plugin.spartanizationMarker.ruler"
verticalRulerPreferenceValue="true">
</specification>
</extension>
<!-- Nature: trust us, without this mystery, there would be no tips
shown/generated, manual is a bit vague, but that's the bottom line -->
<extension
point = "org.eclipse.core.resources.natures"
name = "Spartanizable"
id = "il.org.spartan.nature"
>
<runtime>
<run class="il.org.spartan.plugin.Nature"/>
</runtime>
<builder id="spartan.tipper"/>
</extension>
<!-- List of our abstract commands:
http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_cmd_commands.htm
-->
<extension point="org.eclipse.ui.commands">
<command id="il.org.spartan.LaconizeCurrent" name="active Window"/>
<command id="il.org.spartan.LaconizeAll" name="entire Project"/>
<command id="il.org.spartan.TipsToggleOnOff" name="Tips On/Off">
<state class="org.eclipse.ui.handlers.RegistryToggleState:true" id="org.eclipse.ui.commands.toggleState"/>
</command>
<command id="il.org.spartan.RefreshAll" name="Refresh all projects (slow)" />
<command id="il.org.spartan.SpartanizeableAll" name="Add spartanization nature to all projects" />
</extension>
<!-- Handlers of commands: which class to activate for each command id -->
<extension point="org.eclipse.ui.handlers">
<handler commandId="il.org.spartan.LaconizeAll" class="il.org.spartan.plugin.LaconizeProject"/>
<handler commandId="il.org.spartan.LaconizeCurrent" class="il.org.spartan.plugin.LaconizeCurrent"/>
<handler commandId="il.org.spartan.TipsToggleOnOff" class="il.org.spartan.plugin.TipsOnOffToggle" />
<handler commandId="il.org.spartan.RefreshAll" class="il.org.spartan.plugin.RefreshAll"/>
<handler commandId="il.org.spartan.SpartanizeableAll" class="il.org.spartan.plugin.SpartanizeableAll"/>
</extension>
<!-- Menus -->
<extension point="org.eclipse.ui.menus">
<!-- Toolbar button -->
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar id="il.org.spartan.plugin.toolbars.spartanToolbar">
<command
tooltip="Fully laconize compilation unit shown in editor"
commandId="il.org.spartan.LaconizeCurrent"
icon="platform:/plugin/org.eclipse.team.ui/icons/full/obj/changeset_obj.gif"
id="il.org.spartan.plugin.toolbars.HelmetButton">
</command>
</toolbar>
</menuContribution>
<!-- Popup menus -->
<menuContribution allPopups="true" locationURI="popup:org.eclipse.ui.popup.any?after=additions" >
<menu id="il.org.spartan.menus.spartanization" label="Laconize..." mnemonic="L">
<command commandId="il.org.spartan.LaconizeCurrent" style="push" mnemonic="W"/>
<command commandId="il.org.spartan.LaconizeAll" style="push" mnemonic="P"/>
<command commandId="il.org.spartan.RefreshAll" style="push" mnemonic="R"/>
<command commandId="il.org.spartan.SpartanizeableAll" style="push" mnemonic="N"/>
<command commandId="il.org.spartan.TipsToggleOnOff"
id="il.org.spartan.menus.TipsToggleOnOff"
style="push"
mnemonic="O">
</command>
<visibleWhen>
<with variable="activePartId">
<equals value="org.eclipse.ui.views.ProblemView" />
</with>
</visibleWhen>
</menu>
</menuContribution>
<!-- Top line, main menu -->
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?before=navigate">
<menu id="org.eclipse.jdt.ui.refactoring.menu" label="Refactor">
<menu label="Laconize..." mnemonic="L">
<command commandId="il.org.spartan.LaconizeCurrent" style="push" mnemonic="W"/>
<command commandId="il.org.spartan.LaconizeAll" style="push" mnemonic="P"/>
<command commandId="il.org.spartan.TipsToggleOnOff" style="push" mnemonic="O"/>
<command commandId="il.org.spartan.RefreshAll" style="push" mnemonic="R"/>
<command commandId="il.org.spartan.SpartanizeableAll" style="push" mnemonic="N"/>
</menu>
</menu>
</menuContribution>
</extension>
<!-- Shortcuts -->
<extension point="org.eclipse.ui.bindings">
<key sequence="Ctrl+5"
commandId="il.org.spartan.LaconizeCurrent"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
</extension>
</plugin>