Bug 376302 - [CSS] editor ruler not/hardly visible
Summary: [CSS] editor ruler not/hardly visible
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: usability
Depends on:
Blocks:
 
Reported: 2012-04-08 15:19 EDT by Stephan Herrmann CLA
Modified: 2020-07-18 13:42 EDT (History)
5 users (show)

See Also:


Attachments
Editor in Default theme (49.29 KB, image/png)
2012-04-10 10:55 EDT, Stephan Herrmann CLA
no flags Details
default after some switching back and forth (45.58 KB, image/png)
2012-04-10 10:57 EDT, Stephan Herrmann CLA
no flags Details
Windows 7 3.8 vs. 4.2 for reference (4.2 M6) (7.53 KB, image/png)
2012-04-11 10:13 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2012-04-08 15:19:56 EDT
SDK 4.2M6 on Linux/GTK

(1) Open a Java editor
(2) Try to set a breakpoint by double click in the left ruler

=> The ruler is not visible.

Workaround:
- Click into the editor, the current method will be marked by blue color in the ruler. The rest of the ruler remains invisible.

I also noticed, that switching themes gives "non-deterministic" results: I started with "classic" where I saw no indication of a ruler. Then I switched around between classic / default / GTK, noticed that "classic" looks different depending (a) on whether default or GTK was your previous theme and (b) depending on some factor unknown to me the classic theme *sometimes* shows a useful gray ruler.

Some time into this switching I detected a barely visible difference between very light gray and white to show the ruler, not sure if this has always been there. But anyway not enough contrast to easily find the ruler, at least to my old eyes...
Comment 1 Paul Webster CLA 2012-04-10 09:17:51 EDT
Can you attach an image, please?  I'm on gtk2-2.18.9 on RHEL6 and I can see it as a light-blue ruler (outside of the method selection).

But I see it's a more visible grey in 3.8.

PW
Comment 2 Stephan Herrmann CLA 2012-04-10 10:55:07 EDT
Created attachment 213806 [details]
Editor in Default theme

This what I see in the default scheme. Note, that switching themes gives different results from time to time.

E.g., I started the workbench in the classic theme, saw a gray ruler, switched to default and back to classic and now also the classic theme as a white ruler.
Comment 3 Stephan Herrmann CLA 2012-04-10 10:57:24 EDT
Created attachment 213807 [details]
default after some switching back and forth

This time I went from default to GTK and back to default and now it has a barely visible light gray ruler. Not sure what other colors it has in stock if I keep switching :)
Comment 4 Paul Webster CLA 2012-04-10 11:05:05 EDT
(In reply to comment #2)
> 
> E.g., I started the workbench in the classic theme, saw a gray ruler, switched
> to default and back to classic and now also the classic theme as a white ruler.

We currently only support switching themes and then restarting.  Swapping back and forth will update some widgets successfully and some not.  This will continue to improve, but not for 4.2

PW
Comment 5 Paul Webster CLA 2012-04-10 11:06:39 EDT
(In reply to comment #3) 
> This time I went from default to GTK and back to default and now it has a
> barely visible light gray ruler. Not sure what other colors it has in stock if
> I keep switching :)

Thanx for the images, Stephan, that helps.

I believe I'm also seeing the same thing as  attachment 213807 [details] (I don't know why I think it looks like light blue :-)

PW
Comment 6 Stephan Herrmann CLA 2012-04-10 11:18:45 EDT
(In reply to comment #4)
> (In reply to comment #2)
> > 
> > E.g., I started the workbench in the classic theme, saw a gray ruler, switched
> > to default and back to classic and now also the classic theme as a white ruler.
> 
> We currently only support switching themes and then restarting.  Swapping back
> and forth will update some widgets successfully and some not.  This will
> continue to improve, but not for 4.2

Maybe this fact should be communicated somehow?

The obtrusive way: dialog "Changes will only be fully effective after the next restart [Restart now] [Proceed]"

Mild form: label underneath the theme selection "Please note that ..."

Currently it looks to me like live switching is supported but buggy.
Comment 7 Stephan Herrmann CLA 2012-04-10 11:20:37 EDT
(In reply to comment #5)
>(I don't know why I think it looks like light blue :-)

You should probably re-calibrate your monitor to properly display #F8F8F8 :)
Comment 8 Dani Megert CLA 2012-04-11 10:13:10 EDT
Created attachment 213851 [details]
Windows 7 3.8 vs. 4.2 for reference (4.2 M6)
Comment 9 Eric Moffatt CLA 2012-04-12 11:12:32 EDT
I think Window -> New Window will also pick up the new style if you don't want a full restart...
Comment 10 Eric Moffatt CLA 2012-04-16 14:36:25 EDT
Dani, where does the color for this ruler come from? 

I'm trying to figure out if this is some CSS interaction. AFAIK we shouldn't be affecting the internals of any view / editor...
Comment 11 Dani Megert CLA 2012-04-17 13:03:41 EDT
(In reply to comment #10)
> Dani, where does the color for this ruler come from? 
> 
> I'm trying to figure out if this is some CSS interaction. AFAIK we shouldn't be
> affecting the internals of any view / editor...

The ruler gap/parent doesn't have any color set. In 3.x it simply gets the default widget background color since the getBackgroundMode() is INHERIT_NONE. Now, in 4.x almost everything got changed to INHERIT_DEFAULT or even INHERIT_FORCE. But that's not even the main issue here. Even if I explicitly set the background color, this is doomed to fail, because later, the color of "my" canvas gets changed again:

Thread [main] (Suspended (breakpoint at line 2991 in Control))	
	Canvas(Control).setBackground(Color) line: 2991	
	CSSPropertyBackgroundSWTHandler.applyCSSPropertyBackgroundColor(Object, CSSValue, String, CSSEngine) line: 79	
	CSSPropertyBackgroundSWTHandler(AbstractCSSPropertyBackgroundHandler).applyCSSProperty(Object, String, CSSValue, String, CSSEngine) line: 34	
	CSSPropertyBackgroundSWTHandler.applyCSSProperty(Object, String, CSSValue, String, CSSEngine) line: 42	
	CSSSWTEngineImpl(AbstractCSSEngine).applyCSSProperty(Object, String, CSSValue, String) line: 771	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyleDeclaration(Object, CSSStyleDeclaration, String) line: 548	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean, boolean) line: 465	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean) line: 405	
	CSSSWTApplyStylesListener$1.handleEvent(Event) line: 31	
	EventTable.sendEvent(Event) line: 84	
	Display.sendEvent(int, Event) line: 4339	
	Display.runSkin() line: 4248	
	Display.readAndDispatch() line: 3746	
	WorkbenchPage.firePartOpened(CompatibilityPart) line: 4365	
	CompatibilityPart$2.handleEvent(Event) line: 110	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4683	
	E4Application$1.syncExec(Runnable) line: 185	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 57	
	PartImpl(BasicNotifierImpl).eNotify(Notification) line: 374	
	PartImpl.setObject(Object) line: 378	
	ContributedPartRenderer.createWidget(MUIElement, Object) line: 143	
	PartRenderingEngine.createWidget(MUIElement, Object) line: 883	
	PartRenderingEngine.safeCreateGui(MUIElement, Object, IEclipseContext) line: 617	
	PartRenderingEngine.safeCreateGui(MUIElement) line: 719	
	PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 690	
	PartRenderingEngine$7.run() line: 684	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.createGui(MUIElement) line: 669	
	StackRenderer.showTab(MUIElement) line: 1016	
	LazyStackRenderer$1.handleEvent(Event) line: 66	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4683	
	E4Application$1.syncExec(Runnable) line: 185	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 57	
	PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 374	
	PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 171	
	ModelServiceImpl.showElementInWindow(MWindow, MUIElement) line: 418	
	ModelServiceImpl.bringToTop(MUIElement) line: 385	
	PartServiceImpl.delegateBringToTop(MPart) line: 578	
	PartServiceImpl.bringToTop(MPart) line: 314	
	PartServiceImpl.showPart(MPart, EPartService$PartState) line: 962	
	WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento, boolean) line: 3066	
	WorkbenchPage.access$22(WorkbenchPage, IEditorInput, String, boolean, int, IMemento, boolean) line: 2991	
	WorkbenchPage$8.run() line: 2973	
	BusyIndicator.showWhile(Display, Runnable) line: 70	
	WorkbenchPage.openEditor(IEditorInput, String, boolean, int, IMemento, boolean) line: 2969	
	WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 2928	
	WorkbenchPage.openEditor(IEditorInput, String, boolean) line: 2919	
	EditorUtility.openInEditor(IEditorInput, String, boolean) line: 373	
	EditorUtility.openInEditor(Object, boolean) line: 179	
	OpenAction.run(Object[]) line: 249	
	OpenAction.run(IStructuredSelection) line: 228	
	OpenAction(SelectionDispatchAction).dispatchRun(ISelection) line: 275	
	OpenAction(SelectionDispatchAction).run() line: 251	
	PackageExplorerActionGroup.handleOpen(ISelection, boolean) line: 376	
	PackageExplorerPart$4.open(ISelection, boolean) line: 538	
	OpenAndLinkWithEditorHelper$InternalListener.open(OpenEvent) line: 48	
	StructuredViewer$2.run() line: 866	
	SafeRunner.run(ISafeRunnable) line: 42	
	JFaceUtil$1.run(ISafeRunnable) line: 49	
	SafeRunnable.run(ISafeRunnable) line: 175	
	PackageExplorerPart$PackageExplorerProblemTreeViewer(StructuredViewer).fireOpen(OpenEvent) line: 864	
	PackageExplorerPart$PackageExplorerProblemTreeViewer(StructuredViewer).handleOpen(SelectionEvent) line: 1152	
	StructuredViewer$6.handleOpen(SelectionEvent) line: 1256	
	OpenStrategy.fireOpenEvent(SelectionEvent) line: 275	
	OpenStrategy.access$2(OpenStrategy, SelectionEvent) line: 269	
	OpenStrategy$1.handleEvent(Event) line: 309	
	EventTable.sendEvent(Event) line: 84	
	Tree(Widget).sendEvent(Event) line: 1053	
	Display.runDeferredEvents() line: 4165	
	Display.readAndDispatch() line: 3754	
	PartRenderingEngine$9.run() line: 1016	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 910	
	E4Workbench.createAndRunUI(MApplicationElement) line: 86	
	Workbench$4.run() line: 580	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 535	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 124	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 353	
	EclipseStarter.run(String[], Runnable) line: 180	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 601	
	Main.invokeFramework(String[], URL[]) line: 629	
	Main.basicRun(String[]) line: 584	
	Main.run(String[]) line: 1438	
	Main.main(String[]) line: 1414
Comment 12 Eric Moffatt CLA 2012-04-17 13:10:07 EDT
Bogdan, where does the override of the ruler's color come from ?
Comment 13 Markus Keller CLA 2013-10-15 13:29:46 EDT
Same underlying issue as bug 320901 and bug 340889: Ruler, text editor and background have the same color (white).
Comment 14 Eclipse Genie CLA 2020-07-18 13:42:16 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.