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 109653 Details for
Bug 238257
Request a help text when no tab is open in the "Terminals" view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch that sets help text for terminals, shells and monitor views
emptyViewText.diff (text/plain), 10.51 KB, created by
Anna Dushistova
on 2008-08-11 07:38:19 EDT
(
hide
)
Description:
patch that sets help text for terminals, shells and monitor views
Filename:
MIME Type:
Creator:
Anna Dushistova
Created:
2008-08-11 07:38:19 EDT
Size:
10.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.terminals.ui >Index: src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java,v >retrieving revision 1.3 >diff -u -r1.3 TerminalViewer.java >--- src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java 5 May 2008 10:28:30 -0000 1.3 >+++ src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java 11 Aug 2008 11:29:42 -0000 >@@ -23,7 +23,8 @@ > * Anna Dushistova (MontaVista) - Adapted from SystemCommandsViewPart > * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits > * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl >- ********************************************************************************/ >+ * Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views >+ *********************************************************************************/ > package org.eclipse.rse.internal.terminals.ui.views; > > import org.eclipse.jface.action.IMenuListener; >@@ -42,13 +43,16 @@ > import org.eclipse.rse.ui.messages.ISystemMessageLine; > import org.eclipse.rse.ui.model.ISystemShellProvider; > import org.eclipse.rse.ui.view.IRSEViewPart; >+import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.SelectionListener; > import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.ISelectionListener; > import org.eclipse.ui.ISelectionService; > import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.part.PageBook; > import org.eclipse.ui.part.ViewPart; > > public class TerminalViewer extends ViewPart implements ISelectionListener, >@@ -56,14 +60,26 @@ > ISystemResourceChangeListener, ISystemShellProvider, IRSEViewPart, > IMenuListener, ISystemMessageLine { > >- private TerminalViewTab tabFolder; >+ private TerminalViewTab tabFolder; >+ >+ private PageBook pagebook; >+ >+ private Label noTabShownLabel; > > public static String VIEW_ID = "org.eclipse.rse.terminals.ui.view.TerminalView"; //$NON-NLS-1$ > > public void createPartControl(Composite parent) { >- tabFolder = new TerminalViewTab(parent, this); >+ pagebook = new PageBook(parent, SWT.NONE); >+ >+ tabFolder = new TerminalViewTab(pagebook, this); > tabFolder.getFolder().addSelectionListener(this); > >+ // Page 2: Nothing selected >+ noTabShownLabel = new Label(pagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); >+ noTabShownLabel.setText("To open a terminal, right-click the Terminal subsystem under the target. Then select 'Launch Terminal' from the context menu."); // >+ showEmptyPage(); >+ >+ > ISelectionService selectionService = getSite().getWorkbenchWindow() > .getSelectionService(); > selectionService.addSelectionListener(this); >@@ -107,6 +123,11 @@ > if (source instanceof TerminalElement) { > tabFolder.disposePageFor(((TerminalElement) source).getName()); > } >+ }else if(event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH){ >+ if(tabFolder.getSelectedTab()==null) >+ showEmptyPage(); >+ else >+ showTabsPage(); > } > } > >@@ -198,5 +219,13 @@ > public TerminalViewTab getTabFolder() { > return tabFolder; > } >+ >+ private void showEmptyPage() { >+ pagebook.showPage(noTabShownLabel); >+ } >+ >+ private void showTabsPage(){ >+ pagebook.showPage(tabFolder); >+ } > > } >\ No newline at end of file >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java,v >retrieving revision 1.10 >diff -u -r1.10 SystemMonitorViewPart.java >--- UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java 5 Apr 2008 17:47:22 -0000 1.10 >+++ UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java 11 Aug 2008 11:29:43 -0000 >@@ -20,6 +20,7 @@ > * Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers > * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings > * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types >+ * Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views > ********************************************************************************/ > > package org.eclipse.rse.internal.ui.view.monitor; >@@ -81,6 +82,7 @@ > import org.eclipse.ui.ISelectionService; > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.part.CellEditorActionHandler; >+import org.eclipse.ui.part.PageBook; > import org.eclipse.ui.part.ViewPart; > import org.eclipse.ui.views.properties.IPropertyDescriptor; > >@@ -635,6 +637,10 @@ > > private ISelectionChangedListener selectionListener = null; > >+ private PageBook pagebook; >+ >+ private Label noTabShownLabel; >+ > // constants > public static final String ID = "org.eclipse.rse.ui.view.monitorView"; //$NON-NLS-1$ > // matches id in plugin.xml, view tag >@@ -670,9 +676,15 @@ > > public void createPartControl(Composite parent) > { >- _folder = new MonitorViewWorkbook(parent, this); >+ pagebook = new PageBook(parent, SWT.NONE); >+ _folder = new MonitorViewWorkbook(pagebook, this); > _folder.getFolder().addSelectionListener(this); > >+ // Page 2: Nothing selected >+ noTabShownLabel = new Label(pagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); >+ noTabShownLabel.setText("To open a monitor, right-click on the target. Then select 'Monitor' from the context menu."); // >+ showEmptyPage(); >+ > ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService(); > selectionService.addSelectionListener(this); > >@@ -849,6 +861,7 @@ > { > if (root != null) > { >+ showTabsPage(); > _folder.addItemToMonitor(root, true); > if (true) > updateActionStates(); >@@ -862,6 +875,8 @@ > _folder.remove(root); > if (true) > updateActionStates(); >+ if(_folder.getSelectedTab()==null) >+ showEmptyPage(); > } > } > >@@ -1129,5 +1144,12 @@ > menuManager.add(_subsetAction); > } > >+ private void showEmptyPage() { >+ pagebook.showPage(noTabShownLabel); >+ } >+ >+ private void showTabsPage(){ >+ pagebook.showPage(_folder); >+ } > > } >\ No newline at end of file >#P org.eclipse.rse.shells.ui >Index: src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java,v >retrieving revision 1.15 >diff -u -r1.15 SystemCommandsViewPart.java >--- src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java 4 Mar 2008 16:14:18 -0000 1.15 >+++ src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java 11 Aug 2008 11:29:45 -0000 >@@ -19,6 +19,7 @@ > * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work > * Kevin Doyle (IBM) - [198534] Shell Menu Enablement Issue's > * Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist >+ * Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views > ********************************************************************************/ > > package org.eclipse.rse.internal.shells.ui.view; >@@ -72,10 +73,12 @@ > import org.eclipse.rse.ui.model.ISystemShellProvider; > import org.eclipse.rse.ui.view.IRSEViewPart; > import org.eclipse.rse.ui.view.ISystemViewElementAdapter; >+import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.events.SelectionListener; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Widget; > import org.eclipse.ui.IActionBars; >@@ -84,6 +87,7 @@ > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.handlers.IHandlerService; > import org.eclipse.ui.part.CellEditorActionHandler; >+import org.eclipse.ui.part.PageBook; > import org.eclipse.ui.part.ViewPart; > import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; > >@@ -305,6 +309,10 @@ > private SystemMessage sysErrorMessage; > private IStatusLineManager _statusLine = null; > >+ private PageBook pagebook; >+ >+ private Label noTabShownLabel; >+ > // constants > public static final String ID = "org.eclipse.rse.shells.ui.view.commandsView"; //$NON-NLS-1$ > // matches id in plugin.xml, view tag >@@ -335,9 +343,15 @@ > > public void createPartControl(Composite parent) > { >- _folder = new CommandsViewWorkbook(parent, this); >+ pagebook = new PageBook(parent, SWT.NONE); >+ _folder = new CommandsViewWorkbook(pagebook, this); > _folder.getFolder().addSelectionListener(this); > >+ // Page 2: Nothing selected >+ noTabShownLabel = new Label(pagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); >+ noTabShownLabel.setText("To open a shell, right-click the Shells subsystem under the target. Then select 'Launch Shell' from the context menu."); // >+ showEmptyPage(); >+ > ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService(); > selectionService.addSelectionListener(this); > >@@ -781,10 +795,17 @@ > else if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH) > { > Object parent = event.getParent(); >+ >+ if(_folder.getSelectedTab()==null) >+ showEmptyPage(); >+ else >+ showTabsPage(); >+ > if (parent instanceof IRemoteCommandShell) > { > updateOutput((IRemoteCommandShell) parent, false); > } >+ > } > else if (event.getType() == ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE) > { >@@ -938,4 +959,11 @@ > setMessage(message.getLevelOneText()); > } > >+ private void showEmptyPage() { >+ pagebook.showPage(noTabShownLabel); >+ } >+ >+ private void showTabsPage(){ >+ pagebook.showPage(_folder); >+ } > } >\ No newline at end of file
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
Flags:
mober.at+eclipse
:
review+
Actions:
View
|
Diff
Attachments on
bug 238257
:
109328
| 109653