summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorNeil Guzman2013-10-04 10:42:27 (EDT)
committer Roland Grunberg2013-10-09 14:29:24 (EDT)
commitc780ec5ded13b1b078004d4edc576e3c94fe800f (patch)
treec7aca10cb5d8127a45c92ab30caffd867b3590c8
parenta8a65c79bbb74c250b7d4932eed53e456783b6a9 (diff)
downloadorg.eclipse.linuxtools-c780ec5ded13b1b078004d4edc576e3c94fe800f.zip
org.eclipse.linuxtools-c780ec5ded13b1b078004d4edc576e3c94fe800f.tar.gz
org.eclipse.linuxtools-c780ec5ded13b1b078004d4edc576e3c94fe800f.tar.bz2
RPM: add toolbar menu icons for RPM Buildrefs/changes/71/16971/7
Simple new feature to allow users to simply click a button to build their RPMs. Build All (binary & source) is the default function. Icons will be improved on in the near future. Bug: 418439 Change-Id: Ie42d5163614b493193e82de79f34339ed25858c3 Signed-off-by: Neil Guzman <nguzman@redhat.com> Reviewed-on: https://git.eclipse.org/r/16971 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com> IP-Clean: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties3
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildAll_16x16_toolbarIcon.PNGbin0 -> 447 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildRPMS_16x16_toolbarIcon.PNGbin0 -> 458 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildSRPM_16x16_toolbarIcon.PNGbin0 -> 457 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml88
5 files changed, 89 insertions, 2 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties b/rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties
index c1c410f..473c0a6 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties
@@ -17,4 +17,7 @@ menu.label = RPM
command.name.0 = Build SRPM
command.name.1 = Build RPMS
command.name.2 = Build ALL
+
command.name.3 = RPM Build Command
+
+toolbar.name = RPM Build
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildAll_16x16_toolbarIcon.PNG b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildAll_16x16_toolbarIcon.PNG
new file mode 100644
index 0000000..e50090a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildAll_16x16_toolbarIcon.PNG
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildRPMS_16x16_toolbarIcon.PNG b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildRPMS_16x16_toolbarIcon.PNG
new file mode 100644
index 0000000..da91ed7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildRPMS_16x16_toolbarIcon.PNG
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildSRPM_16x16_toolbarIcon.PNG b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildSRPM_16x16_toolbarIcon.PNG
new file mode 100644
index 0000000..930f5b0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpmBuildSRPM_16x16_toolbarIcon.PNG
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml
index a46372f..5dda03e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml
@@ -122,7 +122,9 @@
locationURI="popup:org.eclipse.linuxtools.rpm.ui.popup?before=org.eclipse.linuxtools.rpm.ui.buildsep">
<command
commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildSRPM_16x16_toolbarIcon.PNG"
label="%command.name.0"
+ mnemonic="S"
tooltip="%command.name.0">
<visibleWhen>
<iterate
@@ -152,7 +154,9 @@
</command>
<command
commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildRPMS_16x16_toolbarIcon.PNG"
label="%command.name.1"
+ mnemonic="R"
tooltip="%command.name.1">
<visibleWhen>
<iterate
@@ -182,7 +186,9 @@
</command>
<command
commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildAll_16x16_toolbarIcon.PNG"
label="%command.name.2"
+ mnemonic="A"
tooltip="%command.name.2">
<visibleWhen>
<iterate
@@ -220,7 +226,7 @@
<commandParameter
id="buildType"
name="buildType"
- optional="true">
+ optional="false">
</commandParameter>
</command>
</extension>
@@ -231,5 +237,83 @@
commandId="rpmEditor.build.command">
</handler>
</extension>
-
+ <extension
+ name="RPM Toolbar"
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="org.eclipse.linuxtools.rpm.ui.rpmBuildMenu"
+ label="%toolbar.name">
+ <command
+ commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildAll_16x16_toolbarIcon.PNG"
+ label="%toolbar.name"
+ style="pulldown">
+ <visibleWhen>
+ <iterate
+ ifEmpty="false"
+ operator="or">
+ <or>
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.core.resources.name"
+ value="*.spec">
+ </test>
+ </adapt>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor">
+ </equals>
+ </with>
+ </or>
+ </iterate>
+ </visibleWhen>
+ <parameter
+ name="buildType"
+ value="ALL">
+ </parameter>
+ </command>
+ </toolbar>
+ </menuContribution>
+ <menuContribution
+ locationURI="menu:rpmEditor.build.command">
+ <command
+ commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildSRPM_16x16_toolbarIcon.PNG"
+ label="%command.name.0"
+ mnemonic="S"
+ tooltip="%command.name.0">
+ <parameter
+ name="buildType"
+ value="SOURCE">
+ </parameter>
+ </command>
+ <command
+ commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildRPMS_16x16_toolbarIcon.PNG"
+ label="%command.name.1"
+ mnemonic="R"
+ tooltip="%command.name.1">
+ <parameter
+ name="buildType"
+ value="BINARY">
+ </parameter>
+ </command>
+ <command
+ commandId="rpmEditor.build.command"
+ icon="icons/rpmBuildAll_16x16_toolbarIcon.PNG"
+ label="%command.name.2"
+ mnemonic="A"
+ tooltip="%command.name.2">
+ <parameter
+ name="buildType"
+ value="ALL">
+ </parameter>
+ </command>
+ </menuContribution>
+ </extension>
</plugin>