From 91369b4692ad88b7f856c6e18774228419d5989e Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Mon, 8 Feb 2016 13:20:48 -0500 Subject: [PATCH] Bug 487471 - Improve look and feel of Launch Bar. New icons that have transparent backgrounds and are 24 pixels square and have hot image counterparts. The Launch button now looks different enough to turn off the mode specific icons for now. Change-Id: Iaa8454ffde5e5c6660a5d0d144ae2af971a7b8c6 --- bundles/org.eclipse.launchbar.ui/.options | 2 ++ .../icons/build2_24.png | Bin 0 -> 1341 bytes .../icons/build2_hot_24.png | Bin 0 -> 1349 bytes .../icons/launch2_24.png | Bin 0 -> 1330 bytes .../icons/launch2_hot_24.png | Bin 0 -> 1328 bytes .../icons/stop2_24.png | Bin 0 -> 1229 bytes .../icons/stop2_hot_24.png | Bin 0 -> 1229 bytes .../launchbar/ui/internal/Activator.java | 34 ++++++++++++++---- .../internal/controls/LaunchBarControl.java | 14 +++++--- .../ui/internal/controls/ModeSelector.java | 8 +++-- 10 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 bundles/org.eclipse.launchbar.ui/.options create mode 100644 bundles/org.eclipse.launchbar.ui/icons/build2_24.png create mode 100644 bundles/org.eclipse.launchbar.ui/icons/build2_hot_24.png create mode 100644 bundles/org.eclipse.launchbar.ui/icons/launch2_24.png create mode 100644 bundles/org.eclipse.launchbar.ui/icons/launch2_hot_24.png create mode 100644 bundles/org.eclipse.launchbar.ui/icons/stop2_24.png create mode 100644 bundles/org.eclipse.launchbar.ui/icons/stop2_hot_24.png diff --git a/bundles/org.eclipse.launchbar.ui/.options b/bundles/org.eclipse.launchbar.ui/.options new file mode 100644 index 00000000000..ed790682059 --- /dev/null +++ b/bundles/org.eclipse.launchbar.ui/.options @@ -0,0 +1,2 @@ +org.eclipse.launchbar.ui/iconSize32=false +org.eclipse.launchbar.ui/launchIconUpdater=false diff --git a/bundles/org.eclipse.launchbar.ui/icons/build2_24.png b/bundles/org.eclipse.launchbar.ui/icons/build2_24.png new file mode 100644 index 0000000000000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=-o(6I(7vocj#GzCZEo`!3>+v;dYIfPu#&ZWzzX2i^rZ^Mu;6+rb@? zNPG+6)c5T6zxpzGe*M(x+{AON=PiJ>H#?ob-|uwRK0yDg0B4PV0id6JRZw95ZvX%Q z>q$gGR7efAm2DD)AP9!noo-}jsx#G@>P&9$m_e>7IK+dqEQF{2fIHPW@;iG0y>ed96%yB z%FBJlOaR!DNQZzA%XAd!ic)QxG6xaPv3{cdNb@o280}6W@DB%KUhyU4WelN#mTF!N z&O4eKFO{w!2U0j)Fu^g?cp^PKc05H@5$J(a6v=xKuz^23ksZ7sU<=O#?BPt{9r!8m z9vlM2MvLuFwTz9uc9tncVF}MJCHskIhnmA5rA=o{I{ur=00000NkvXXu0mjfM`VQx literal 0 HcmV?d00001 diff --git a/bundles/org.eclipse.launchbar.ui/icons/build2_hot_24.png b/bundles/org.eclipse.launchbar.ui/icons/build2_hot_24.png new file mode 100644 index 0000000000000000000000000000000000000000..e77ea27915e0caa7be87fbf64b2137b768890dff GIT binary patch literal 1349 zcmV-L1-kl)P)4Tx062|}Rb6NtRTMtEb7vzY&QokOg>Hg1+lHrgWS zWcKdPn90sKGrRqvPeo9CG3uKX#J{(IASm?@+di}}l?o-=)F3E6wD^Ni=!>T7nL9I? zX}YoAW$t|Qo$sD|?zw001?ah|SeB6#0T!CBEf+H4bBB+JJu8rehoBb*p;u8ID_yBf z0ya+zcePvJL&AGs+11_tpRKn>9TgyPA7ZoSs0)aX0r00)%XR^J`jH<$>RKN5V(7Oq zK*TS4xZz{h!*f1C3ECFkK$#7nA@pGN!$;%jYvwjAKwmYb0gKL(K8 z-kPtb5${A?tlI~wzMrJ6wTdBr=Y%%%EaEMQ&o}4FQ^DA)s*}Z>!FI&AHCpoWI|RUq zx?7s@$8!5^Q=anY%X@i5{QA6kNcMelpE>R6eCYFpmMsVTrI(b06~u#xf1yS} z_UGdMvD``!0~u->P=lA4?YN`hilQ|3tHka)7T{2CGqw zjZfMwx$5irQN_*|e4l)UHmiYuz74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+rb@? zNPG+6)c5T6zxpzGe*M(x+{AON=PiJ>H#?ob-|uwRK0yDg0B4PV0id6JRZw95ZvX%Q z-bqA3R7efAmH`ffAPhyzvJ=Uj^i1wfoXH9G2gEUGfhJmw@?ZM}B9Wyd95g3hUe>Pm zJk0@_P&bQn3yu>x;%C>bHoYGM&t|STLhb}T0gxXAiZ-M+0g`5=b>$9HaeuAss2u>H z5EL!qD*c*}Ma4RK2RS|#^mEqr0{|?5?iTr%&)KxB%Z_oHY{+cx!`_9hLL<^T=H5YV zEwrd+AAQ_6$b?Z#KcFBCK(t6|Pem92c?XTca)3}60Ji9#JxXB!$`*ABmjQ!>0SH@z m-7WuFc&mm7`#(XLEByjF1v;FeHg$^t0000?0^ga literal 0 HcmV?d00001 diff --git a/bundles/org.eclipse.launchbar.ui/icons/stop2_24.png b/bundles/org.eclipse.launchbar.ui/icons/stop2_24.png new file mode 100644 index 0000000000000000000000000000000000000000..88ba331b3e2dc7bc90ebc6e52862651553fa8f3b GIT binary patch literal 1229 zcmV;;1Ty=HP)4Tx062|}Rb6NtRTMtEb7vzY&QokOg>Hg1+lHrgWS zWcKdPn90sKGrRqvPeo9CG3uKX#J{(IASm?@+di}}l?o-=)F3E6wD^Ni=!>T7nL9I? zX}YoAW$t|Qo$sD|?zw001?ah|SeB6#0T!CBEf+H4bBB+JJu8rehoBb*p;u8ID_yBf z0ya+zcePvJL&AGs+11_tpRKn>9TgyPA7ZoSs0)aX0r00)%XR^J`jH<$>RKN5V(7Oq zK*TS4xZz{h!*f1C3ECFkK$#7nA@pGN!$;%jYvwjAKwmYb0gKL(K8 z-kPtb5${A?tlI~wzMrJ6wTdBr=Y%%%EaEMQ&o}4FQ^DA)s*}Z>!FI&AHCpoWI|RUq zx?7s@$8!5^Q=anY%X@i5{QA6kNcMelpE>R6eCYFpmMsVTrI(b06~u#xf1yS} z_UGdMvD``!0~u->P=lA4?YN`hilQ|3tHka)7T{2CGqw zjZfMwx$5irQN_*|e4l)UHmiYuz74Y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)s*}Z>!FI&AHCpoWI|RUq zx?7s@$8!5^Q=anY%X@i5{QA6kNcMelpE>R6eCYFpmMsVTrI(b06~u#xf1yS} z_UGdMvD``!0~u->P=lA4?YN`hilQ|3tHka)7T{2CGqw zjZfMwx$5irQN_*|e4l)UHmiYuz74Yp1t^#>hrJ3-SOXDcC_o0^7T9R1gAN8V6s;5) zieI5-7aQlmJn}lUna#nz!j%5V$X|o`xX!dHWQRV27P1=rj;t2bW$~+pTw@bIek?Zv zKPDL<64`^#UNTAck#RBsB6*5DP4<%UA_FqU$I>2EH_cM;u)Q~SI+rg`Rn{L_AC5qq~L$#SMj%U z$6Cz0vP{G5Y*=%5RT^yu;}-DInZ=349rJPVM6C3K^oO)8y(fJr{l>k`ead~!ea?NsT>_Ci%bnxC;Vy6=b6>{xYV#Ue-+LB$ z7`JEXmTRm^AtP)R9u{)KHsMiWGV&)32xCG~*nyU<>-!d;FP=Re4r3qYr~6#KE>;1F z`>_J_P5xC?ROxV(DIHdCO*p$HRQI@7^PwV@Pvuf+5K}u-6REM(K@W$s zrgorh0{i?O)v0c>QtHxU-hBdD(>iYJ4b2sIOVX2K8m~4gmYVA5h^QEb$V`rCQ-|7Z zS{nuL-t>?3n=-o(6I(7vocj#GzCZEo`!3>+v;dYIfPu#&ZWzzX2i^rZ^Mu;6+rb@? zNPG+6)c5T6zxpzGe*M(x+{AON=PiJ>H#?ob-|uwRK0yDg0B4PV0id6JRZw95ZvX%Q zdr3q=R7eeDU>NFv5t|2$85sU!6DK5gmVp7oJQj3KAj5%}T<{;=5)>OLG#u?B7#8#FHJ!zsZpXLm!u#wQ7oX; r5_H3{S^%>IM3V}TD;iSu4qo*D;rSC+o76Yn00000NkvXXu0mjf2WL## literal 0 HcmV?d00001 diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java index 267458300cc..faefee75261 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java @@ -19,6 +19,7 @@ import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; @@ -43,10 +44,17 @@ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "org.eclipse.launchbar.ui"; //$NON-NLS-1$ + // Options + public static final String OPTION_ICON_SIZE32 = Activator.PLUGIN_ID + "/iconSize32"; //$NON-NLS-1$ + public static final String OPTION_LAUNCH_ICON_UPDATER = Activator.PLUGIN_ID + "/launchIconUpdater"; //$NON-NLS-1$ + // Images public static final String IMG_BUTTON_BUILD = "build"; //$NON-NLS-1$ + public static final String IMG_BUTTON_BUILD_HOT = "build.hot"; //$NON-NLS-1$ public static final String IMG_BUTTON_LAUNCH = "launch"; //$NON-NLS-1$ + public static final String IMG_BUTTON_LAUNCH_HOT = "launch.hot"; //$NON-NLS-1$ public static final String IMG_BUTTON_STOP = "stop"; //$NON-NLS-1$ + public static final String IMG_BUTTON_STOP_HOT = "stop.hot"; //$NON-NLS-1$ public static final String IMG_LOCAL_TARGET = "localTarget"; //$NON-NLS-1$ // Command ids @@ -72,19 +80,33 @@ public class Activator extends AbstractUIPlugin { public Activator() { } + @Override public void start(BundleContext context) throws Exception { super.start(context); plugin = this; ImageRegistry imageRegistry = getImageRegistry(); - imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build.png")); //$NON-NLS-1$ - imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch.png")); //$NON-NLS-1$ - imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop.png")); //$NON-NLS-1$ + if ("true".equals(Platform.getDebugOption(OPTION_ICON_SIZE32))) { //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_BUILD_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_LAUNCH_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_STOP_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop.png")); //$NON-NLS-1$ + } else { + imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build2_24.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_BUILD_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build2_hot_24.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch2_24.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_LAUNCH_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch2_hot_24.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop2_24.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_STOP_HOT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop2_hot_24.png")); //$NON-NLS-1$ + } imageRegistry.put(IMG_LOCAL_TARGET, imageDescriptorFromPlugin(PLUGIN_ID, "icons/localTarget.png")); //$NON-NLS-1$ context.registerService(ILaunchTargetUIManager.class, new LaunchTargetUIManager(), null); } + @Override public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); @@ -124,12 +146,10 @@ public class Activator extends AbstractUIPlugin { } public static void runCommand(String commandId, String... params) { - final ICommandService commandService = (ICommandService) PlatformUI.getWorkbench() - .getService(ICommandService.class); + final ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); Command command = commandService.getCommand(commandId); final Event trigger = new Event(); - final IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench() - .getService(IHandlerService.class); + final IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, trigger); if (params.length == 0) { try { diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/LaunchBarControl.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/LaunchBarControl.java index b3a9b0d1cbd..d697a95a5b4 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/LaunchBarControl.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/LaunchBarControl.java @@ -65,9 +65,12 @@ public class LaunchBarControl implements ILaunchBarListener { }); ToolBar toolBar = new ToolBar(container, SWT.FLAT); - createButton(toolBar, Activator.IMG_BUTTON_BUILD, Messages.LaunchBarControl_Build, Activator.CMD_BUILD); - createButton(toolBar, Activator.IMG_BUTTON_LAUNCH, Messages.LaunchBarControl_Launch, Activator.CMD_LAUNCH); - createButton(toolBar, Activator.IMG_BUTTON_STOP, Messages.LaunchBarControl_Stop, Activator.CMD_STOP); + createButton(toolBar, Activator.IMG_BUTTON_BUILD, Activator.IMG_BUTTON_BUILD_HOT, + Messages.LaunchBarControl_Build, Activator.CMD_BUILD); + createButton(toolBar, Activator.IMG_BUTTON_LAUNCH, Activator.IMG_BUTTON_LAUNCH_HOT, + Messages.LaunchBarControl_Launch, Activator.CMD_LAUNCH); + createButton(toolBar, Activator.IMG_BUTTON_STOP, Activator.IMG_BUTTON_STOP_HOT, Messages.LaunchBarControl_Stop, + Activator.CMD_STOP); modeSelector = new ModeSelector(container, SWT.NONE); modeSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); @@ -106,10 +109,13 @@ public class LaunchBarControl implements ILaunchBarListener { manager.removeListener(this); } - private ToolItem createButton(Composite parent, String imageName, String toolTipText, final String command) { + private ToolItem createButton(Composite parent, String imageName, String hotImageName, String toolTipText, + final String command) { ToolItem button = new ToolItem((ToolBar) parent, SWT.FLAT); Image srcImage = Activator.getDefault().getImage(imageName); button.setImage(srcImage); + Image hotImage = Activator.getDefault().getImage(hotImageName); + button.setHotImage(hotImage); button.setToolTipText(toolTipText); button.setData("command", command); //$NON-NLS-1$ button.addSelectionListener(new SelectionAdapter() { diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ModeSelector.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ModeSelector.java index 9bee28361ac..28127fbb82f 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ModeSelector.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/controls/ModeSelector.java @@ -16,6 +16,7 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Platform; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchMode; @@ -156,7 +157,7 @@ public class ModeSelector extends CSelector { }); } - protected ILaunchGroup getDefaultLaunchGroup(String mode) throws CoreException { + protected ILaunchGroup getDefaultLaunchGroup(String mode) { String groupId = null; if (mode.equals(ILaunchManager.DEBUG_MODE)) { groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP; @@ -205,7 +206,9 @@ public class ModeSelector extends CSelector { if (element == null) element = noModes[0]; super.setSelection(element); - updateLaunchButton(findLaunchButton()); + if ("true".equals(Platform.getDebugOption(Activator.OPTION_LAUNCH_ICON_UPDATER))) { //$NON-NLS-1$ + updateLaunchButton(findLaunchButton()); + } } private ToolItem findLaunchButton() { @@ -229,6 +232,7 @@ public class ModeSelector extends CSelector { return; } toolItem.setImage(Activator.getDefault().getImage(Activator.IMG_BUTTON_LAUNCH)); + Object selection = getSelection(); if (selection instanceof ILaunchMode) { ILaunchMode lmode = (ILaunchMode) selection;