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 26479 Details for
Bug 96600
[DynamicUI] [Commands] [Contexts] [KeyBindings] Commands architecture isn't dynamic
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]
Patch to "org.eclipse.ui.tests"
Bug96600-org.eclipse.ui.tests.patch (text/plain), 7.83 KB, created by
Douglas Pollock
on 2005-08-25 15:41:57 EDT
(
hide
)
Description:
Patch to "org.eclipse.ui.tests"
Filename:
MIME Type:
Creator:
Douglas Pollock
Created:
2005-08-25 15:41:57 EDT
Size:
7.83 KB
patch
obsolete
>Index: Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java,v >retrieving revision 1.18 >diff -u -r1.18 DynamicPluginsTestSuite.java >--- Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java 7 Apr 2005 16:39:29 -0000 1.18 >+++ Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java 25 Aug 2005 19:39:10 -0000 >@@ -31,6 +31,7 @@ > public DynamicPluginsTestSuite() { > addTest(new TestSuite(ActionSetTests.class)); > addTest(new TestSuite(ActivitySupportTests.class)); >+ addTest(new TestSuite(BindingsExtensionDynamicTest.class)); > addTest(new TestSuite(BrowserTests.class)); > addTest(new TestSuite(PreferencePageTests.class)); > addTest(new TestSuite(KeywordTests.class)); >Index: Eclipse UI Tests/org/eclipse/ui/tests/leaks/LeakTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/leaks/LeakTests.java,v >retrieving revision 1.8 >diff -u -r1.8 LeakTests.java >--- Eclipse UI Tests/org/eclipse/ui/tests/leaks/LeakTests.java 15 Jun 2005 18:41:27 -0000 1.8 >+++ Eclipse UI Tests/org/eclipse/ui/tests/leaks/LeakTests.java 25 Aug 2005 19:39:10 -0000 >@@ -61,6 +61,9 @@ > } > } > >+ if (!flag) { >+ System.out.println(); >+ } > assertTrue("Reference not enqueued", flag); > } > >Index: Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BindingsExtensionDynamicTest.java >=================================================================== >RCS file: Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BindingsExtensionDynamicTest.java >diff -N Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BindingsExtensionDynamicTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/BindingsExtensionDynamicTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,145 @@ >+/******************************************************************************* >+ * Copyright (c) 2005 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.dynamicplugins; >+ >+import org.eclipse.core.commands.common.NotDefinedException; >+import org.eclipse.jface.bindings.Binding; >+import org.eclipse.jface.bindings.Scheme; >+import org.eclipse.jface.bindings.TriggerSequence; >+import org.eclipse.jface.bindings.keys.KeySequence; >+import org.eclipse.jface.bindings.keys.ParseException; >+import org.eclipse.jface.contexts.IContextIds; >+import org.eclipse.ui.internal.IWorkbenchConstants; >+import org.eclipse.ui.keys.IBindingService; >+ >+public class BindingsExtensionDynamicTest extends DynamicTestCase { >+ >+ public BindingsExtensionDynamicTest(String testName) { >+ super(testName); >+ } >+ >+ protected String getExtensionId() { >+ return "bindingsExtensionDynamicTest.testDynamicBindingAddition"; >+ } >+ >+ protected String getExtensionPoint() { >+ return IWorkbenchConstants.PL_BINDINGS; >+ } >+ >+ protected String getInstallLocation() { >+ return "data/org.eclipse.bindingsExtensionDynamicTest"; >+ } >+ >+ public void testBinding() throws ParseException { >+ final IBindingService bindingService = (IBindingService) getWorkbench() >+ .getAdapter(IBindingService.class); >+ final TriggerSequence triggerSequence = KeySequence.getInstance("M1+W"); >+ Binding[] bindings; >+ Scheme scheme; >+ boolean found; >+ >+ found = false; >+ bindings = bindingService.getBindings(); >+ if (bindings != null) { >+ for (int i = 0; i < bindings.length; i++) { >+ final Binding binding = bindings[i]; >+ if ("monkey".equals(binding.getSchemeId()) >+ && IContextIds.CONTEXT_ID_WINDOW.equals(binding >+ .getContextId()) >+ && "org.eclipse.ui.views.showView".equals(binding >+ .getParameterizedCommand().getId()) >+ && binding.getParameterizedCommand().getParameterMap() >+ .containsKey( >+ "org.eclipse.ui.views.showView.viewId") >+ && binding.getPlatform() == null >+ && binding.getLocale() == null >+ && binding.getType() == Binding.SYSTEM >+ && triggerSequence.equals(binding.getTriggerSequence())) { >+ found = true; >+ >+ } >+ } >+ } >+ assertTrue(!found); >+ scheme = bindingService.getScheme("monkey"); >+ try { >+ scheme.getName(); >+ fail(); >+ } catch (final NotDefinedException e) { >+ assertTrue(true); >+ } >+ >+ getBundle(); >+ >+ found = false; >+ bindings = bindingService.getBindings(); >+ if (bindings != null) { >+ for (int i = 0; i < bindings.length; i++) { >+ final Binding binding = bindings[i]; >+ if ("monkey".equals(binding.getSchemeId()) >+ && IContextIds.CONTEXT_ID_WINDOW.equals(binding >+ .getContextId()) >+ && "org.eclipse.ui.views.showView".equals(binding >+ .getParameterizedCommand().getId()) >+ && binding.getParameterizedCommand().getParameterMap() >+ .containsKey( >+ "org.eclipse.ui.views.showView.viewId") >+ && binding.getPlatform() == null >+ && binding.getLocale() == null >+ && binding.getType() == Binding.SYSTEM >+ && triggerSequence.equals(binding.getTriggerSequence())) { >+ found = true; >+ >+ } >+ } >+ } >+ assertTrue(found); >+ scheme = bindingService.getScheme("monkey"); >+ try { >+ assertTrue("Monkey".equals(scheme.getName())); >+ } catch (final NotDefinedException e) { >+ fail(); >+ } >+ >+ removeBundle(); >+ >+ found = false; >+ bindings = bindingService.getBindings(); >+ if (bindings != null) { >+ for (int i = 0; i < bindings.length; i++) { >+ final Binding binding = bindings[i]; >+ if ("monkey".equals(binding.getSchemeId()) >+ && IContextIds.CONTEXT_ID_WINDOW.equals(binding >+ .getContextId()) >+ && "org.eclipse.ui.views.showView".equals(binding >+ .getParameterizedCommand().getId()) >+ && binding.getParameterizedCommand().getParameterMap() >+ .containsKey( >+ "org.eclipse.ui.views.showView.viewId") >+ && binding.getPlatform() == null >+ && binding.getLocale() == null >+ && binding.getType() == Binding.SYSTEM >+ && triggerSequence.equals(binding.getTriggerSequence())) { >+ found = true; >+ >+ } >+ } >+ } >+ assertTrue(!found); >+ scheme = bindingService.getScheme("monkey"); >+ try { >+ scheme.getName(); >+ fail(); >+ } catch (final NotDefinedException e) { >+ assertTrue(true); >+ } >+ } >+} >Index: data/org.eclipse.bindingsExtensionDynamicTest/plugin.xml >=================================================================== >RCS file: data/org.eclipse.bindingsExtensionDynamicTest/plugin.xml >diff -N data/org.eclipse.bindingsExtensionDynamicTest/plugin.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ data/org.eclipse.bindingsExtensionDynamicTest/plugin.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,28 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?eclipse version="3.0"?> >+<plugin >+ id="bindingsExtensionDynamicTest" >+ name="Bindings Extension Dynamic Test Plug-in" >+ version="1.0.0"> >+ >+ <requires> >+ <import plugin="org.eclipse.ui"/> >+ </requires> >+ >+ <extension >+ id="testDynamicBindingAddition" >+ point="org.eclipse.ui.bindings"> >+ <key >+ commandId="org.eclipse.ui.views.showView" >+ sequence="M1+W" >+ schemeId="monkey"> >+ <parameter >+ id="org.eclipse.ui.views.showView.viewId" >+ value="monkey" /> >+ </key> >+ <scheme >+ id="monkey" >+ name="Monkey" /> >+ </extension> >+ >+</plugin>
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 96600
:
26476
|
26477
|
26479
|
26556
|
26557
|
26558
|
26561
|
26590
|
26591