diff options
author | Andrew Johnson | 2020-10-27 11:45:38 +0000 |
---|---|---|
committer | Andrew Johnson | 2020-10-27 11:45:38 +0000 |
commit | 71e75d20b3b8f18989a4c6db26a8084deb28c421 (patch) | |
tree | 1d5cd0709358980b5b7303b58102d5f4a9d1f512 | |
parent | c2a263685f8838d0ffada597d835d1f3fc46d9a9 (diff) | |
download | org.eclipse.mat-71e75d20b3b8f18989a4c6db26a8084deb28c421.tar.gz org.eclipse.mat-71e75d20b3b8f18989a4c6db26a8084deb28c421.tar.xz org.eclipse.mat-71e75d20b3b8f18989a4c6db26a8084deb28c421.zip |
567758: Add Close to the left and right option to tabs
Change some keys
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=567758
Change-Id: I393d45cdb5a323c88ab92ba114b368d1a9dc5779
8 files changed, 92 insertions, 47 deletions
diff --git a/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.dita b/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.dita index b27e209b..9b034fd1 100644 --- a/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.dita +++ b/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.dita @@ -36,6 +36,10 @@ When acquiring a heap dump for this purpose using the Memory Analyzer,
do not use the <cmdname>live=true</cmdname> option as that would discard unreachable objects
before the heap dump is generated.</p>
+ <p>Another reason for unreachable objects is if Memory Analyzer
+ has been configured to discard objects on parsing to keep the
+ number of remaining objects small enough for Memory Analyzer to
+ handle. See <xref href="../../tasks/configure_mat.dita#task_configure_mat/discard"></xref> for details.</p>
</section>
<section>
<title>Arguments</title>
diff --git a/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.html b/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.html index 793638d9..058246ed 100644 --- a/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.html +++ b/plugins/org.eclipse.mat.ui.help/reference/inspections/unreachable_objects.html @@ -52,6 +52,11 @@ do not use the <span class="keyword cmdname">live=true</span> option as that would discard unreachable objects before the heap dump is generated.</p> + <p class="p">Another reason for unreachable objects is if Memory Analyzer + has been configured to discard objects on parsing to keep the + number of remaining objects small enough for Memory Analyzer to + handle. See <a class="xref" href="../../tasks/configure_mat.html#task_configure_mat__discard">Enable discard (experimental)</a> for details.</p> + </div> <div class="section"><h2 class="title sectiontitle">Arguments</h2> diff --git a/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.dita b/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.dita index 2b5763ac..3ab4ae75 100644 --- a/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.dita +++ b/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.dita @@ -38,12 +38,12 @@ <stentry>Description</stentry>
</sthead>
<strow>
- <stentry>Shortcuts</stentry>
+ <stentry>Shortcuts. Use <uicontrol>Command</uicontrol> instead of <uicontrol>Ctrl</uicontrol> on macOS</stentry>
<stentry>
<p><uicontrol>Ctrl-Q</uicontrol> - Opens the Query Browser.</p>
<p><uicontrol>Ctrl-H</uicontrol> - Opens the history of executed queries.</p>
- <p><uicontrol>Ctrl-F8</uicontrol> - Next tab.</p>
- <p><uicontrol>Ctrl-Shift-F8</uicontrol> - Previous tab.</p>
+ <p><uicontrol>Ctrl-Page Down</uicontrol> - Next tab.</p>
+ <p><uicontrol>Ctrl-Page Up</uicontrol> - Previous tab.</p>
<p><uicontrol>Shift-F10</uicontrol> - Context menu for results of queries.</p>
<p><uicontrol>Ctrl-F10</uicontrol> - Context menu for editor tabs - to close and rearrange.</p>
<p><uicontrol>Ctrl-Shift-P</uicontrol> - Reset perspective.</p>
diff --git a/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.html b/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.html index d86e947d..44cc7537 100644 --- a/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.html +++ b/plugins/org.eclipse.mat.ui.help/reference/tipsandtricks.html @@ -32,22 +32,22 @@ </p> <table cellpadding="4" cellspacing="0" summary="" id="ref_tips__tips_table" border="1" class="simpletable"><tr class="sthead"> - <th valign="bottom" align="left" id="d10431e33" class="stentry" width="20%">Tip</th> + <th valign="bottom" align="left" id="d10544e33" class="stentry" width="20%">Tip</th> - <th valign="bottom" align="left" id="d10431e36" class="stentry" width="80%">Description</th> + <th valign="bottom" align="left" id="d10544e36" class="stentry" width="80%">Description</th> </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Shortcuts</td> + <td valign="top" headers="d10544e33" class="stentry">Shortcuts. Use <span class="ph uicontrol">Command</span> instead of <span class="ph uicontrol">Ctrl</span> on macOS</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> <p class="p"><span class="ph uicontrol">Ctrl-Q</span> - Opens the Query Browser.</p> <p class="p"><span class="ph uicontrol">Ctrl-H</span> - Opens the history of executed queries.</p> - <p class="p"><span class="ph uicontrol">Ctrl-F8</span> - Next tab.</p> + <p class="p"><span class="ph uicontrol">Ctrl-Page Down</span> - Next tab.</p> - <p class="p"><span class="ph uicontrol">Ctrl-Shift-F8</span> - Previous tab.</p> + <p class="p"><span class="ph uicontrol">Ctrl-Page Up</span> - Previous tab.</p> <p class="p"><span class="ph uicontrol">Shift-F10</span> - Context menu for results of queries.</p> @@ -64,9 +64,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Quick Search</td> + <td valign="top" headers="d10544e33" class="stentry">Quick Search</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Just start to type while you are in the heap editor, all the matches will be highlighted. This quick search starts is activated when 3 or more letters are provided. @@ -75,9 +75,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Filter</td> + <td valign="top" headers="d10544e33" class="stentry">Filter</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> To show only rows of a table or tree matching a filter, click the top row, or press enter when the top row is selected. Then type the required filter for the column. Multiple filters can be used. @@ -122,9 +122,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Resize and reorder columns</td> + <td valign="top" headers="d10544e33" class="stentry">Resize and reorder columns</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> To resize or rearrange columns using the keyboard select a filter entry for the column as above. <ul class="ul"> @@ -142,9 +142,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Keyboard navigation of trees</td> + <td valign="top" headers="d10544e33" class="stentry">Keyboard navigation of trees</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> <ul class="ul"> <li class="li">Use <Numpad plus> or <enter> to expand a row.</li> @@ -160,9 +160,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Notes, Hyperlinks in Notes View</td> + <td valign="top" headers="d10544e33" class="stentry">Notes, Hyperlinks in Notes View</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Notes View recognizes and highlights object addresses. Activating the hyperlink brings up a context menu which contains actions for this particular object. Activate the hyperlink using the <span class="ph uicontrol">control</span> key @@ -172,9 +172,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Undo/redo in Notes View, OQL Pane</td> + <td valign="top" headers="d10544e33" class="stentry">Undo/redo in Notes View, OQL Pane</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> There is undo/redo using <span class="ph uicontrol">Ctrl-Z</span> / <span class="ph uicontrol">Ctrl-Y</span> in the Notes View and the OQL Pane. The navigator pane can also be used to retrieve previous OQL statements. @@ -182,9 +182,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Copy To Clipboard</td> + <td valign="top" headers="d10544e33" class="stentry">Copy To Clipboard</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Use <span class="ph uicontrol">Ctrl-C</span> to copy the selection to the clipboard. The data will keep its structure: <br/><div class="imageleft"><img class="image imageleft" src="../mimes/1af34c1.png"/></div><br/> @@ -192,9 +192,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry"> Manage the history of opened heap dumps</td> + <td valign="top" headers="d10544e33" class="stentry"> Manage the history of opened heap dumps</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Heap Dump History view offers a set of context menu actions to manage the history of opened heap dumps: <br/><div class="imageleft"><img class="image imageleft" src="../mimes/691a2594.png"/></div><br/> @@ -210,9 +210,9 @@ </tr> <tr id="ref_tips__editor_tabs" class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Manage editor tabs</td> + <td valign="top" headers="d10544e33" class="stentry">Manage editor tabs</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Right click on the Heap Editor tab will open a context menu to manage the tabs. It might be very helpful when many tabs are open. <br/><div class="imageleft"><img class="image imageleft" src="../mimes/7df38219.png"/></div><br/> @@ -268,9 +268,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry"> Link Inspector View with Heap Editor</td> + <td valign="top" headers="d10544e33" class="stentry"> Link Inspector View with Heap Editor</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Object Inspector View shows the details for the single selected object. The view updates itself with every change in the selection. Sometimes it is interesting to compare two or more @@ -284,9 +284,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Value tab in Inspector View</td> + <td valign="top" headers="d10544e33" class="stentry">Value tab in Inspector View</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> The Object Inspector View shows the details for the single selected object. The value tab shows the value as given by the <a class="xref" href="../doc/org_eclipse_mat_api_nameResolver.html"> @@ -296,9 +296,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Image and Color objects</td> + <td valign="top" headers="d10544e33" class="stentry">Image and Color objects</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> The Object Inspector View recreates Eclipse colors and images from the information in the heap dump and displays the information in the lower left corner of the inspector. @@ -311,9 +311,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Class Hierarchy in Inspector</td> + <td valign="top" headers="d10544e33" class="stentry">Class Hierarchy in Inspector</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> The inspector now displays the full class hierarchy of any selected object. One can drill-down via context menus. <br/><div class="imageleft"><img class="image imageleft" src="../mimes/nn_inspector_class_hierarchy.png"/></div><br/> @@ -321,9 +321,9 @@ </tr> <tr class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Context menu for totals row</td> + <td valign="top" headers="d10544e33" class="stentry">Context menu for totals row</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> The totals row now represents all the additional entries in a tree or table. If the totals row is selected then the context menu will operate on all the unshown entries in the tree or table. If all the rows are selected, for example using <span class="ph uicontrol">Ctrl-A</span>, @@ -336,9 +336,9 @@ </tr> <tr class="strow"> - <td valign="top" id="oqlcompletion" headers="d10431e33" class="stentry">OQL autocompletion</td> + <td valign="top" id="oqlcompletion" headers="d10544e33" class="stentry">OQL autocompletion</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> The Object Query Language (OQL) pane has syntax highlighting for OQL keywords. It also offers suggestions for class names for the <span class="keyword">SELECT</span> <span class="keyword">FROM</span> clause, both simple class names and regular expressions. @@ -369,9 +369,9 @@ </tr> <tr id="ref_tips__piechartlinks" class="strow"> - <td valign="top" headers="d10431e33" class="stentry">Links in Pie Chart Image</td> + <td valign="top" headers="d10544e33" class="stentry">Links in Pie Chart Image</td> - <td valign="top" headers="d10431e36" class="stentry"> + <td valign="top" headers="d10544e36" class="stentry"> Memory Analyzer 1.11 adds hot-spots to the pie chart. The legend entries now link to the referenced object. <br/><div class="imageleft"><img class="image imageleft" src="../mimes/piechartlinks.png" height="292" width="809" alt="Pie Chart showing links from legend"/></div><br/> diff --git a/plugins/org.eclipse.mat.ui.rcp/plugin.xml b/plugins/org.eclipse.mat.ui.rcp/plugin.xml index a07f3274..90450225 100644 --- a/plugins/org.eclipse.mat.ui.rcp/plugin.xml +++ b/plugins/org.eclipse.mat.ui.rcp/plugin.xml @@ -110,6 +110,7 @@ point="org.eclipse.ui.bindings">
<scheme
id="org.eclipse.mat.scheme"
+ parent="org.eclipse.ui.defaultAcceleratorConfiguration"
name="%scheme.name.Memory_Analyzer_Default" />
<key
commandId="org.eclipse.ui.edit.copy"
@@ -207,6 +208,18 @@ schemeId="org.eclipse.mat.scheme"
sequence="M1+M2+L">
</key>
+ <key
+ commandId="org.eclipse.ui.window.quickAccess"
+ contextId="org.eclipse.ui.contexts.Window"
+ schemeId="org.eclipse.mat.scheme"
+ sequence="M1+3">
+ </key>
+ <key
+ commandId="org.eclipse.ui.window.showViewMenu"
+ contextId="org.eclipse.ui.contexts.Window"
+ schemeId="org.eclipse.mat.scheme"
+ sequence="M1+F10">
+ </key>
</extension>
<extension
diff --git a/plugins/org.eclipse.mat.ui/plugin.properties b/plugins/org.eclipse.mat.ui/plugin.properties index 6cebe8cc..86cf5ff9 100644 --- a/plugins/org.eclipse.mat.ui/plugin.properties +++ b/plugins/org.eclipse.mat.ui/plugin.properties @@ -50,7 +50,7 @@ commandParameter.name.openSampleHeapDump.oqlParms = OQL command command.name.TabMenu = Tab Context Menu
command.description.TabMenu = Change the editor tabs
context.name.Editor = Memory Analyzer Editor
-commandParameter.name.commandName = commandName
+commandParameter.name.commandName = Command line
extension-point.editorPanes.name = Heap Editor Panes
extension-point.editorContributions.name = Multi Pane Editor Contributions
preferences.name = Memory Analyzer
@@ -64,4 +64,5 @@ color.oql_comment.label = OQL comment color color.oql_comment.description = Color of comments in the OQL pane
color.oql_keyword.label = OQL keyword color
color.oql_keyword.description = Color of keywords in the OQL pane
-font.notes_label = Notes view font
\ No newline at end of file +font.notes_label = Notes view font
+scheme.name.Memory_Analyzer_Default = Memory Analyzer Default
diff --git a/plugins/org.eclipse.mat.ui/plugin.xml b/plugins/org.eclipse.mat.ui/plugin.xml index 8d1fc332..ea8a35ef 100644 --- a/plugins/org.eclipse.mat.ui/plugin.xml +++ b/plugins/org.eclipse.mat.ui/plugin.xml @@ -195,6 +195,11 @@ helpContextId="org.eclipse.mat.ui.query_browser"
id="org.eclipse.mat.ui.query.browser.QueryBrowser"
name="%command.name.Query_Browser">
+ <commandParameter
+ id="org.eclipse.mat.ui.query.browser.QueryBrowser.commandName"
+ name="%commandParameter.name.commandName"
+ optional="true">
+ </commandParameter>
</command>
<command
categoryId="org.eclipse.ui.category.navigate"
@@ -306,6 +311,9 @@ </extension>
<extension point="org.eclipse.ui.bindings">
+ <scheme
+ id="org.eclipse.mat.scheme"
+ name="%scheme.name.Memory_Analyzer_Default" />
<key
commandId="org.eclipse.mat.ui.query.browser.QueryBrowser"
contextId="org.eclipse.ui.contexts.window"
@@ -341,13 +349,13 @@ commandId="org.eclipse.ui.navigate.nextTab"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.mat.scheme"
- sequence="M1+F8">
+ sequence="M1+PAGE_DOWN">
</key>
<key
commandId="org.eclipse.ui.navigate.previousTab"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.mat.scheme"
- sequence="M1+M2+F8">
+ sequence="M1+PAGE_UP">
</key>
</extension>
diff --git a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/browser/QueryBrowserHandler.java b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/browser/QueryBrowserHandler.java index 33022dac..3f1ff613 100644 --- a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/browser/QueryBrowserHandler.java +++ b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/browser/QueryBrowserHandler.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2008, 2010 SAP AG.
+ * Copyright (c) 2008, 2020 SAP AG and IBM Corporation.
* 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
@@ -7,12 +7,15 @@ *
* Contributors:
* SAP AG - initial API and implementation
+ * Andrew Johnson (IBM Corporation) - allow parameters to initialize with a particular command
*******************************************************************************/
package org.eclipse.mat.ui.internal.browser;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.mat.ui.editor.MultiPaneEditor;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
@@ -36,7 +39,18 @@ public class QueryBrowserHandler extends AbstractHandler if (!(activeEditor instanceof MultiPaneEditor))
return null;
- new QueryBrowserPopup((MultiPaneEditor) activeEditor).open();
+ QueryBrowserPopup qbp = new QueryBrowserPopup((MultiPaneEditor) activeEditor);
+ String commandName = executionEvent.getParameter("org.eclipse.mat.ui.query.browser.QueryBrowser.commandName"); //$NON-NLS-1$
+ if (commandName != null)
+ {
+ Control c = qbp.getFocusControl();
+ if (c instanceof Text)
+ {
+ Text t = (Text)c;
+ t.setText(commandName);
+ }
+ }
+ qbp.open();
return null;
}
|