From 5ef9a3b92519afa0a222505352a2c0dec40cb5c6 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Mon, 8 Jul 2013 11:55:50 -0400 Subject: [PATCH] Bug 411970: Some more work on colors and icons for Makefile Editor --- .../icons/obj16/macro_obj.gif | Bin 359 -> 0 bytes .../icons/obj16/trule_obj.gif | Bin 205 -> 0 bytes .../icons/obj16/var_auto.png | Bin 0 -> 263 bytes .../cdt/make/internal/ui/MakeUIImages.java | 5 ++--- .../ui/editor/MakefileContentOutlinePage.java | 7 ++++--- .../ui/editor/MakefileSourceConfiguration.java | 7 +++---- .../makefile/MakefileCompletionProcessor.java | 11 +++++++++-- .../icons/obj16/variable_obj.gif | Bin 206 -> 893 bytes 8 files changed, 18 insertions(+), 12 deletions(-) delete mode 100644 build/org.eclipse.cdt.make.ui/icons/obj16/macro_obj.gif delete mode 100644 build/org.eclipse.cdt.make.ui/icons/obj16/trule_obj.gif create mode 100644 build/org.eclipse.cdt.make.ui/icons/obj16/var_auto.png diff --git a/build/org.eclipse.cdt.make.ui/icons/obj16/macro_obj.gif b/build/org.eclipse.cdt.make.ui/icons/obj16/macro_obj.gif deleted file mode 100644 index fdde5fbb95e50851757a749194ce6a3431bb1afb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 359 zcmZ?wbhEHb6krfwxXQp#S5Vbd+T2kyvA<>Ew4RM~ChuP`<3xJx%B+Sp`K{~Ax;NKM z+|e|BZ|B^Dy$g@DOoEfOLTT#K6{aU`Bz54qxJl zB|@GpTjyQSSo6|If~%!bfuX>+fBlAvKcbsVUTm4=8k1@Bp`yk$BvY-AEqS4bf{m7o zrj)XDt5U17vZjknd1ZAihrEo7sFZ?&?95rSL|sJ6g}6D{6_=}sxClzAimPr=lTcF? dbPViCtV#GtN}CUpjiL_ diff --git a/build/org.eclipse.cdt.make.ui/icons/obj16/trule_obj.gif b/build/org.eclipse.cdt.make.ui/icons/obj16/trule_obj.gif deleted file mode 100644 index dd261127c835e62ce2e2c5020eaeb191d09236ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 205 zcmZ?wbhEHb6krfwIKsg2`1OxZ-~MPs%+Ltv(8$=Kk+4D|VSz@(1pfg4|NsAg{`~pf zyLTr~p4_%=+r)_z+uPe)T3V{AsxmV()6>(Fl9ED0LxIW|a0A7kEQ|~cVhlPUB_KN) zSiKgg_N8RbQ)`^}Dr#Gj(&?8o4EnzqoYdyx;!t3m@xep)prQeDK$Wu7!38pBgg7!h iPfoGis&ep$B+x_vTwPrzpbmtU=09pPfNZ4 diff --git a/build/org.eclipse.cdt.make.ui/icons/obj16/var_auto.png b/build/org.eclipse.cdt.make.ui/icons/obj16/var_auto.png new file mode 100644 index 0000000000000000000000000000000000000000..c50eb2a28d41fb4db1571bec9b8474109b1c6d5c GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^{2Y$ZW{!9W@a@|Lkr1X6oET^vIy z<|HRb%xVzq-T(2{zrWkh&#$ey8xeNc@v4QxX~xKDoHI9nyLGR0I{&MaTIadfU!EL# zv*71}TiMlxtLzGXuUWh5-_LI2*lg4D@pCd4ud09WEppDP^S1j^^|Lqqe4@z4)^=8% z|K{mgbE<2&BN>g2)D>(WsUP;Qo3?%XJi9NZ+kc *

- * Note that org.eclipse.cdt.ui.tests.misc.MakeUISharedImagesTest will verify + * Note that org.eclipse.cdt.ui.tests.misc.MakeUIImagesTest will verify * existence of the images defined here. *

* @@ -45,14 +45,13 @@ import org.eclipse.swt.graphics.Image; public class MakeUIImages { // images public static final String IMG_OBJS_TARGET = "icons/obj16/target_obj.gif"; //$NON-NLS-1$ - public static final String IMG_OBJS_TARGET_RULE = "icons/obj16/trule_obj.gif"; //$NON-NLS-1$ - public static final String IMG_OBJS_MACRO = "icons/obj16/macro_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_INFERENCE_RULE = "icons/obj16/irule_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_RELATION = "icons/obj16/relation_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_COMMAND = "icons/obj16/command_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_INCLUDE = "icons/obj16/include_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_ENVIRONMENT = "icons/obj16/environment_obj.gif"; //$NON-NLS-1$ public static final String IMG_OBJS_ENV_VAR = "icons/obj16/envvar_obj.gif"; //$NON-NLS-1$ + public static final String IMG_OBJS_AUTO_VARIABLE = "icons/obj16/var_auto.png"; //$NON-NLS-1$ public static final String IMG_ETOOL_MAKEFILE = "icons/etool16/makefile.gif"; //$NON-NLS-1$ public static final String IMG_ETOOL_TARGET_BUILD = "icons/etool16/target_build.png"; //$NON-NLS-1$ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java index 8aed95ee2f0..56a0e534963 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java @@ -30,6 +30,7 @@ import org.eclipse.cdt.make.internal.core.makefile.NullMakefile; import org.eclipse.cdt.make.internal.ui.MakeUIImages; import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; import org.eclipse.cdt.make.ui.IWorkingCopyManager; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; @@ -160,15 +161,15 @@ public class MakefileContentOutlinePage extends ContentOutlinePage { @Override public Image getImage(Object element) { if (element instanceof ITargetRule) { - return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_TARGET_RULE); + return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_TARGET); } else if (element instanceof IInferenceRule) { return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_INFERENCE_RULE); } else if (element instanceof IMacroDefinition) { - return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MACRO); + return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_VARIABLE); } else if (element instanceof ICommand) { return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_COMMAND); } else if (element instanceof IInclude) { - return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_INCLUDE); + return MakeUIImages.getImage(MakeUIImages.IMG_ETOOL_MAKEFILE); } else if (element instanceof IBadDirective) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); } else if (element instanceof IParent) { diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java index 57b364cb176..2f2b7d238dd 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileSourceConfiguration.java @@ -92,10 +92,9 @@ public class MakefileSourceConfiguration extends TextSourceViewerConfiguration { assistant.enableAutoActivation(true); assistant.setAutoActivationDelay(500); - assistant.setProposalPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW); - assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW); - //Set to Carolina blue - assistant.setContextInformationPopupBackground(fColorManager.getColor(new RGB(0, 191, 255))); + assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY); + assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE); + assistant.setContextInformationPopupBackground(fColorManager.getColor(new RGB(255, 255, 255))); return assistant; } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java index 370313e6952..79098c5622b 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java @@ -18,11 +18,13 @@ import org.eclipse.cdt.make.core.makefile.IDirective; import org.eclipse.cdt.make.core.makefile.IMacroDefinition; import org.eclipse.cdt.make.core.makefile.IMakefile; import org.eclipse.cdt.make.core.makefile.IRule; +import org.eclipse.cdt.make.internal.core.makefile.gnu.AutomaticVariable; import org.eclipse.cdt.make.internal.ui.MakeUIImages; import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; import org.eclipse.cdt.make.internal.ui.text.CompletionProposalComparator; import org.eclipse.cdt.make.internal.ui.text.WordPartDetector; import org.eclipse.cdt.make.ui.IWorkingCopyManager; +import org.eclipse.cdt.ui.CDTSharedImages; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.TextPresentation; import org.eclipse.jface.text.contentassist.CompletionProposal; @@ -87,8 +89,9 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor { } protected IContextInformationValidator fValidator = new Validator(); - protected Image imageMacro = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MACRO); - protected Image imageTarget = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_TARGET_RULE); + protected Image imageMacro = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_VARIABLE); + protected Image imageAutomaticVariable = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_AUTO_VARIABLE); + protected Image imageTarget = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_TARGET); protected CompletionProposalComparator comparator = new CompletionProposalComparator(); protected IEditorPart fEditor; @@ -126,6 +129,10 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor { name = ((IMacroDefinition) statement).getName(); image = imageMacro; infoString = ((IMacroDefinition)statement).getValue().toString(); + } else if (statement instanceof AutomaticVariable) { + name = ((IMacroDefinition) statement).getName(); + image = imageAutomaticVariable; + infoString = ((IMacroDefinition)statement).getValue().toString(); } else if (statement instanceof IRule) { name = ((IRule) statement).getTarget().toString(); image = imageTarget; diff --git a/core/org.eclipse.cdt.ui/icons/obj16/variable_obj.gif b/core/org.eclipse.cdt.ui/icons/obj16/variable_obj.gif index 727812daf624bec5cf365994d9475b14a44798d9..6f97d4d36bdc4a4fa494e3dfba13435e26f2197c 100644 GIT binary patch literal 893 zcmZ?wbhEHb6krfw_|Cu}leT2et}8Kpdumpl`Sb6OPurFw*Pf(I+hbC+X3eoXOZMG~ znY5>6-I<(OM@-7rFpPrH5Exz|p!k!8k%57QK?me5P@Z7th+^R6knz~C;9xU{u#(Az z2M)~4T#_;z4jUPnTR5dyBn}ulG_$Zvn+R-hXz-lKF3S*cQmCPM3ZIO^49U++9a$N~ gL~iV4aA0U*XXwaL2vIyYl}kh`_SBY@hZ-2H0gYljF8}}l literal 206 zcmZ?wbhEHb6krfwIKsdnle);DXthDnDzmb+X60*bs@MCrZTADB_H9x9yW=M9O`f(t zYu2IcS%+Z^fkBi(2c!yQCj+Z@ zf@)t%=DZA7LmlU(0>WnnndeUa^TywH=9-p*6Goz3%}YLIC^5{tpuW&kfrE+Bu{3HD gg9v-e!vzc;e%ubpZy9ug;$B#~uD|{My8weV0OOBH_y7O^