Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 169530 Details for
Bug 313950
CSS Engine creates unnecessary contexts and injections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Illustrative patch - not meant to be applied - just shows the problem
patch DI outside 48.txt (text/plain), 6.17 KB, created by
Oleg Besedin
on 2010-05-21 13:43:19 EDT
(
hide
)
Description:
Illustrative patch - not meant to be applied - just shows the problem
Filename:
MIME Type:
Creator:
Oleg Besedin
Created:
2010-05-21 13:43:19 EDT
Size:
6.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.e4.ui.css.swt >Index: src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyInnerKeylineSWTHandler.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyInnerKeylineSWTHandler.java,v >retrieving revision 1.2 >diff -u -r1.2 CSSPropertyInnerKeylineSWTHandler.java >--- src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyInnerKeylineSWTHandler.java 27 Apr 2010 20:40:37 -0000 1.2 >+++ src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyInnerKeylineSWTHandler.java 21 May 2010 17:42:23 -0000 >@@ -1,9 +1,6 @@ > package org.eclipse.e4.ui.css.swt.properties.custom; > > import java.lang.reflect.Method; >- >-import org.eclipse.e4.core.contexts.ContextInjectionFactory; >-import org.eclipse.e4.core.contexts.EclipseContextFactory; > import org.eclipse.e4.core.contexts.IEclipseContext; > import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler; > import org.eclipse.e4.ui.css.core.engine.CSSEngine; >@@ -29,10 +26,7 @@ > CTabFolderRenderer renderer = ((CTabFolder) control).getRenderer(); > Object appContext = control.getDisplay().getData("org.eclipse.e4.ui.css.context"); > if (appContext != null && appContext instanceof IEclipseContext) { >- IEclipseContext context = (IEclipseContext) appContext; >- IEclipseContext childContext = context.createChild(); >- childContext.set("innerKeyline", newColor); >- ContextInjectionFactory.inject(renderer, childContext); >+ ((IEclipseContext) appContext).set("innerKeyline", newColor); > } else { > Method[] methods = renderer.getClass().getMethods(); > for (int i = 0; i < methods.length; i++) { >Index: src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyOuterKeylineSWTHandler.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyOuterKeylineSWTHandler.java,v >retrieving revision 1.3 >diff -u -r1.3 CSSPropertyOuterKeylineSWTHandler.java >--- src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyOuterKeylineSWTHandler.java 27 Apr 2010 20:40:37 -0000 1.3 >+++ src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyOuterKeylineSWTHandler.java 21 May 2010 17:42:23 -0000 >@@ -11,9 +11,6 @@ > package org.eclipse.e4.ui.css.swt.properties.custom; > > import java.lang.reflect.Method; >- >-import org.eclipse.e4.core.contexts.ContextInjectionFactory; >-import org.eclipse.e4.core.contexts.EclipseContextFactory; > import org.eclipse.e4.core.contexts.IEclipseContext; > import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler; > import org.eclipse.e4.ui.css.core.engine.CSSEngine; >@@ -40,9 +37,7 @@ > Object appContext = control.getDisplay().getData("org.eclipse.e4.ui.css.context"); > if (appContext != null && appContext instanceof IEclipseContext) { > IEclipseContext context = (IEclipseContext) appContext; >- IEclipseContext childContext = context.createChild(); >- childContext.set("outerKeyline", newColor); >- ContextInjectionFactory.inject(renderer, childContext); >+ context.set("outerKeyline", newColor); > } else { > Method[] methods = renderer.getClass().getMethods(); > for (int i = 0; i < methods.length; i++) { >Index: src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java,v >retrieving revision 1.3 >diff -u -r1.3 CSSPropertyUnselectedTabsSWTHandler.java >--- src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java 30 Apr 2010 22:32:51 -0000 1.3 >+++ src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java 21 May 2010 17:42:23 -0000 >@@ -8,24 +8,14 @@ > *******************************************************************************/ > package org.eclipse.e4.ui.css.swt.properties.custom; > >-import org.eclipse.e4.core.contexts.ContextInjectionFactory; > import org.eclipse.e4.core.contexts.IEclipseContext; >- >-import org.eclipse.swt.custom.CTabFolderRenderer; >- >-import org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper; >-import org.eclipse.swt.custom.CTabItem; >- >-import org.eclipse.e4.ui.css.core.resources.IResourcesRegistry; >- >-import java.util.Iterator; > import org.eclipse.e4.ui.css.core.dom.properties.Gradient; > import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler; > import org.eclipse.e4.ui.css.core.engine.CSSEngine; >+import org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper; > import org.eclipse.e4.ui.css.swt.properties.AbstractCSSPropertySWTHandler; > import org.eclipse.swt.custom.CTabFolder; > import org.eclipse.swt.graphics.Color; >-import org.eclipse.swt.graphics.RGB; > import org.eclipse.swt.widgets.Control; > import org.w3c.dom.css.CSSValue; > >@@ -45,19 +35,16 @@ > int[] percents = CSSSWTColorHelper.getPercents(grad); > folder.setBackground(colors, percents, true); > >- CTabFolderRenderer renderer = ((CTabFolder) control).getRenderer(); > Object appContext = control.getDisplay().getData("org.eclipse.e4.ui.css.context"); > if (appContext != null && appContext instanceof IEclipseContext) { > IEclipseContext context = (IEclipseContext) appContext; >- IEclipseContext childContext = context.createChild(); > if (pseudo != null && pseudo.equals("selected")) { >- childContext.set("activeToolbarColors", colors); >- childContext.set("activeToolbarPercents", percents); >+ context.set("activeToolbarColors", colors); >+ context.set("activeToolbarPercents", percents); > } else { >- childContext.set("inactiveToolbarColors", colors); >- childContext.set("inactiveToolbarPercents", percents); >+ context.set("inactiveToolbarColors", colors); >+ context.set("inactiveToolbarPercents", percents); > } >- ContextInjectionFactory.inject(renderer, childContext); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 313950
:
169530
|
173128
|
173573
|
173721