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 251391 Details for
Bug 459517
[console] Auto-scroll lock should not affect the view state
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]
Auto scroll lock enabled per page
Bug 459517 - [console] Auto-scroll lock should not affect the view state After Review.patch (text/plain), 4.99 KB, created by
Sarika Sinha
on 2015-03-09 02:52:28 EDT
(
hide
)
Description:
Auto scroll lock enabled per page
Filename:
MIME Type:
Creator:
Sarika Sinha
Created:
2015-03-09 02:52:28 EDT
Size:
4.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.console >diff --git src/org/eclipse/ui/console/IScrollLockStateProvider.java src/org/eclipse/ui/console/IScrollLockStateProvider.java >index 457bd15..269bde4 100644 >--- src/org/eclipse/ui/console/IScrollLockStateProvider.java >+++ src/org/eclipse/ui/console/IScrollLockStateProvider.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2014 IBM Corporation and others. >+ * Copyright (c) 2014, 2015 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -25,7 +25,7 @@ > public interface IScrollLockStateProvider { > > /** >- * Sets the scroll lock state. >+ * Sets the scroll lock state set by user manually. > * > * @param scrollLock <code>true</code> to turn scroll lock on, otherwise > * <code>false</code> >@@ -33,10 +33,28 @@ > public void setScrollLock(boolean scrollLock); > > /** >- * Returns the scroll lock state. >+ * Sets the scroll lock state for the current page automatically due to >+ * user's action on console page. >+ * >+ * @param scrollLock <code>true</code> to turn scroll lock on, otherwise >+ * <code>false</code> >+ */ >+ public void setAutoScrollLock(boolean scrollLock); >+ >+ /** >+ * Returns the scroll lock state of the current page set by user manually. > * > * @return <code>true</code> if scroll lock is on, <code>false</code> > * otherwise > */ > public boolean getScrollLock(); >+ >+ /** >+ * Returns the scroll lock state of the Page which was manually set by user >+ * or automatically set due to user's action on console page. >+ * >+ * @return <code>true</code> if scroll lock is on, <code>false</code> >+ * otherwise >+ */ >+ public boolean getAutoScrollLock(); > } >diff --git src/org/eclipse/ui/console/TextConsoleViewer.java src/org/eclipse/ui/console/TextConsoleViewer.java >index ce731be..504f0ce 100644 >--- src/org/eclipse/ui/console/TextConsoleViewer.java >+++ src/org/eclipse/ui/console/TextConsoleViewer.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2014 IBM Corporation and others. >+ * Copyright (c) 2000, 2015 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -148,8 +148,8 @@ > // set the scroll Lock setting for Console Viewer and Console View > private void setScrollLock(boolean lock) { > userHoldsScrollLock.set(lock); >- if (scrollLockStateProvider != null && scrollLockStateProvider.getScrollLock() != lock) { >- scrollLockStateProvider.setScrollLock(lock); >+ if (scrollLockStateProvider != null && scrollLockStateProvider.getAutoScrollLock() != lock) { >+ scrollLockStateProvider.setAutoScrollLock(lock); > } > } > >diff --git src/org/eclipse/ui/internal/console/ConsoleView.java src/org/eclipse/ui/internal/console/ConsoleView.java >index fdfc65b..714fe9d 100644 >--- src/org/eclipse/ui/internal/console/ConsoleView.java >+++ src/org/eclipse/ui/internal/console/ConsoleView.java >@@ -185,7 +185,6 @@ > } > IPage page = getCurrentPage(); > if (page instanceof IOConsolePage) { >- ((IOConsolePage)page).setAutoScroll(!fScrollLock); > ((IOConsolePage) page).setWordWrap(fWordWrap); > } > } >@@ -795,4 +794,22 @@ > setPinned(true); > } > } >+ >+ @Override >+ public void setAutoScrollLock(boolean scrollLock) { >+ IPage page = getCurrentPage(); >+ if (page instanceof IOConsolePage) { >+ ((IOConsolePage) page).setAutoScroll(!scrollLock); >+ } >+ >+ } >+ >+ @Override >+ public boolean getAutoScrollLock() { >+ IPage page = getCurrentPage(); >+ if (page instanceof IOConsolePage) { >+ return !((IOConsolePage) page).isAutoScroll(); >+ } >+ return fScrollLock; >+ } > } >diff --git src/org/eclipse/ui/internal/console/IOConsolePage.java src/org/eclipse/ui/internal/console/IOConsolePage.java >index a31c6c0..1b876a9 100644 >--- src/org/eclipse/ui/internal/console/IOConsolePage.java >+++ src/org/eclipse/ui/internal/console/IOConsolePage.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2014 IBM Corporation and others. >+ * Copyright (c) 2000, 2015 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -78,6 +78,14 @@ > } > } > >+ public boolean isAutoScroll() { >+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer(); >+ if (viewer != null) { >+ return viewer.isAutoScroll(); >+ >+ } >+ return false; >+ } > public void setWordWrap(boolean wordwrap) { > IOConsoleViewer viewer = (IOConsoleViewer) getViewer(); > if (viewer != null) {
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 459517
:
251043
|
251044
| 251391