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 115137 Details for
Bug 231304
[Contributions] Tooltip for Menu Contributions placed on toolbar: does not include keybinding sequence(inconsistency in migrating from ActionSets to MenuContributions)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test v01
TooltipTest v01.txt (text/plain), 6.04 KB, created by
Prakash Rangaraj
on 2008-10-15 08:31:17 EDT
(
hide
)
Description:
Test v01
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2008-10-15 08:31:17 EDT
Size:
6.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.tests >Index: Eclipse UI Tests/org/eclipse/ui/tests/menus/MenusTestSuite.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenusTestSuite.java,v >retrieving revision 1.12 >diff -u -r1.12 MenusTestSuite.java >--- Eclipse UI Tests/org/eclipse/ui/tests/menus/MenusTestSuite.java 16 Mar 2007 18:00:01 -0000 1.12 >+++ Eclipse UI Tests/org/eclipse/ui/tests/menus/MenusTestSuite.java 15 Oct 2008 12:14:54 -0000 >@@ -14,6 +14,7 @@ > import junit.framework.Test; > import junit.framework.TestSuite; > >+ > /** > * Tests for all code related to menus. This includes the > * <code>popupMenus</code> extension point, and others. >@@ -35,5 +36,7 @@ > addTest(new TestSuite(MenuVisibilityTest.class)); > addTest(new TestSuite(MenuBaseTests.class)); > addTest(new TestSuite(MenuPopulationTest.class)); >+ addTest(new TestSuite(DynamicMenuTest.class)); >+ addTest(new TestSuite(Bug231304Test.class)); > } > } >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.tests/plugin.xml,v >retrieving revision 1.260 >diff -u -r1.260 plugin.xml >--- plugin.xml 6 Oct 2008 13:22:02 -0000 1.260 >+++ plugin.xml 15 Oct 2008 12:14:53 -0000 >@@ -3972,5 +3972,48 @@ > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" > sequence="M1+8 B"> > </key> >+ </extension> >+ <extension >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="toolbar:org.eclipse.ui.tests.tooltipTest"> >+ <toolbar >+ id="general"> >+ <command >+ commandId="org.eclipse.ui.tests.testToolTipCommand" >+ label="Testing Tooltip" >+ style="push"> >+ </command> >+ </toolbar> >+ </menuContribution> >+ </extension> >+ <extension >+ point="org.eclipse.ui.commands"> >+ <command >+ categoryId="org.eclipse.ui.category.file" >+ id="org.eclipse.ui.tests.testToolTipCommand" >+ name="My Test Tooltip Command"> >+ </command> >+ </extension> >+ <extension >+ point="org.eclipse.ui.bindings"> >+ <key >+ commandId="org.eclipse.ui.tests.testToolTipCommand" >+ contextId="org.eclipse.ui.contexts.window" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" >+ sequence="M2+M3+1"> >+ </key> > </extension> >+ >+ <extension >+ id="menu.dynamic.contribution" >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="popup:org.eclipse.ui.tests.dynamicMenuContribution"> >+ <dynamic >+ class="org.eclipse.ui.tests.menus.DynamicContributionItemPopup" >+ id="org.eclipse.ui.tests.dynamicMenuContribution"> >+ </dynamic> >+ </menuContribution> >+ </extension> > </plugin> >Index: Eclipse UI Tests/org/eclipse/ui/tests/menus/Bug231304Test.java >=================================================================== >RCS file: Eclipse UI Tests/org/eclipse/ui/tests/menus/Bug231304Test.java >diff -N Eclipse UI Tests/org/eclipse/ui/tests/menus/Bug231304Test.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse UI Tests/org/eclipse/ui/tests/menus/Bug231304Test.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,71 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ ******************************************************************************/ >+ >+package org.eclipse.ui.tests.menus; >+ >+import org.eclipse.jface.action.IContributionItem; >+import org.eclipse.jface.action.MenuManager; >+import org.eclipse.jface.action.ToolBarManager; >+import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.ToolBar; >+import org.eclipse.swt.widgets.ToolItem; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.menus.IMenuService; >+import org.eclipse.ui.tests.harness.util.UITestCase; >+ >+/** >+ * >+ * @since 3.5 >+ * @author Prakash G.R. >+ * >+ */ >+public class Bug231304Test extends UITestCase { >+ >+ public Bug231304Test(String testName) { >+ super(testName); >+ } >+ >+ public void testToolTip() { >+ IWorkbenchWindow window = openTestWindow(); >+ IMenuService menus = (IMenuService) window >+ .getService(IMenuService.class); >+ MenuManager manager = new MenuManager(); >+ try { >+ // populate contribution >+ menus.populateContributionManager(manager, >+ "toolbar:org.eclipse.ui.tests.tooltipTest"); >+ IContributionItem[] items = manager.getItems(); >+ assertEquals(1, items.length); >+ >+ // get the tool bar contribution item >+ IToolBarContributionItem toolbarContribution = (IToolBarContributionItem) items[0]; >+ IContributionItem[] contributionItems = toolbarContribution.getToolBarManager().getItems(); >+ assertEquals(1, contributionItems.length); >+ >+ // create the toolbar manager with the contribution item and force update it >+ ToolBar toolBar = new ToolBar(window.getShell(), SWT.HORIZONTAL); >+ >+ ToolBarManager toolBarManager = new ToolBarManager(toolBar); >+ toolBarManager.add(contributionItems[0]); >+ toolBarManager.update(true); >+ >+ // now get the tool item and verify the tool tip >+ ToolItem[] toolItems = toolBar.getItems(); >+ assertEquals(1, toolItems.length); >+ assertEquals("Testing Tooltip (Alt+Shift+1)", toolItems[0].getToolTipText()); >+ >+ } finally { >+ menus.releaseContributions(manager); >+ } >+ } >+ >+}
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:
pwebster
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 231304
:
112126
|
113819
|
114173
|
114290
|
114330
|
114419
|
114510
| 115137