Skip to content

Commit 2cbcc7c

Browse files
committed
Merge remote branch 'upstream/master'
2 parents 572dfe9 + 3d38a4a commit 2cbcc7c

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Build the Arduino Eclipse Plugin using Maven
2+
node:
3+
script: mvn verify -Pall,juno,all,kepler,all,luna

it.baeyens.arduino.core/plugin.xml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,16 @@
230230
</definition>
231231
</extension >
232232
-->
233-
233+
234+
<!-- Definition to know if the active perspective is Arduino -->
235+
<extension point="org.eclipse.core.expressions.definitions">
236+
<definition id="it.baeyens.definition.isArduinoPerspective">
237+
<with variable="activeWorkbenchWindow.activePerspective">
238+
<equals value="org.eclipse.cdt.ui.CPerspective"/>
239+
</with>
240+
</definition>
241+
</extension>
242+
234243
<!-- Upload project handler
235244
<extension point="org.eclipse.ui.handlers">
236245
<handler
@@ -268,50 +277,74 @@
268277
locationURI="toolbar:org.eclipse.ui.main.toolbar">
269278
<toolbar
270279
id="it.baeyens.arduino.toolbar.main" label="Arduino">
280+
<visibleWhen>
281+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
282+
</visibleWhen>
271283
<command
272284
commandId="it.baeyens.arduino.actions.ArduinoBuildAction"
273285
disabledIcon="icons/check_disabled.png"
274286
icon="icons/check.png"
275287
label="%command.label"
276288
style="push">
289+
<visibleWhen>
290+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
291+
</visibleWhen>
277292
</command>
278293
<command
279294
commandId="it.baeyens.arduino.actions.UploadprojectAction"
280295
disabledIcon="icons/arrow_disabled.png"
281296
icon="icons/arrow.png"
282297
label="%command.label.0"
283298
style="push">
299+
<visibleWhen>
300+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
301+
</visibleWhen>
284302
</command>
285303
<command
286304
commandId="it.baeyens.arduino.actions.NewSketchAction"
287305
disabledIcon="icons/new_disabled.png"
288306
icon="icons/new.png"
289307
label="%command.label.1"
290308
style="push">
309+
<visibleWhen>
310+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
311+
</visibleWhen>
291312
</command>
292313
<command
293314
commandId="org.eclipse.ui.file.save"
294315
disabledIcon="icons/save_disabled.png"
295316
icon="icons/save.png"
296317
style="push">
318+
<visibleWhen>
319+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
320+
</visibleWhen>
297321
</command>
298322
<command
299323
commandId="it.baeyens.arduino.actions.OpenSerialMonitorAction"
300324
disabledIcon="icons/ser_mon_disabled.png"
301325
icon="icons/ser_mon.png"
302326
label="%command.label.2"
303327
style="push">
328+
<visibleWhen>
329+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
330+
</visibleWhen>
304331
</command>
305332
<command
306333
commandId="it.baeyens.arduino.actions.OpenScopeAction"
307334
icon="icons/scope.png"
308335
label="%command.label.5"
309336
style="push">
337+
<visibleWhen>
338+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
339+
</visibleWhen>
310340
</command>
311341
</toolbar>
312342
</menuContribution>
313343
<menuContribution locationURI="menu:org.eclipse.ui.main.menu??after=Run">
314344
<menu label="%menu.label" >
345+
<visibleWhen>
346+
<reference definitionId="it.baeyens.definition.isArduinoPerspective"/>
347+
</visibleWhen>
315348
<command
316349
commandId="it.baeyens.arduino.actions.ArduinoBuildAction"
317350
id="buildProject"

0 commit comments

Comments
 (0)