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 153417 Details for
Bug 94153
[Dialogs] [KeyBindings] Command+W should close dialogs on OS X
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 v03
Command+W 03.txt (text/plain), 7.14 KB, created by
Prakash Rangaraj
on 2009-12-01 01:14:10 EST
(
hide
)
Description:
Patch v03
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2009-12-01 01:14:10 EST
Size:
7.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.carbon >Index: fragment-carbon.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.carbon/fragment-carbon.properties,v >retrieving revision 1.2 >diff -u -r1.2 fragment-carbon.properties >--- fragment-carbon.properties 3 May 2005 17:54:04 -0000 1.2 >+++ fragment-carbon.properties 1 Dec 2009 06:14:47 -0000 >@@ -11,3 +11,6 @@ > > providerName=Eclipse.org > fragmentName=Eclipse UI MacOS X Enhancements >+ >+command.closeDialog.name=Close Dialog >+command.closeDialog.desc=Closes the active Dialog >\ No newline at end of file >Index: fragment.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.carbon/fragment.xml,v >retrieving revision 1.17 >diff -u -r1.17 fragment.xml >--- fragment.xml 25 Apr 2008 18:50:01 -0000 1.17 >+++ fragment.xml 1 Dec 2009 06:14:47 -0000 >@@ -8,5 +8,31 @@ > class="org.eclipse.ui.internal.carbon.CarbonUIEnhancer"> > </startup> > </extension> >+ >+ <extension >+ point="org.eclipse.ui.commands"> >+ <command >+ categoryId="org.eclipse.ui.category.dialogs" >+ description="%command.closeDialog.desc" >+ id="org.eclipse.ui.carbon.closeDialog" >+ name="%command.closeDialog.name"> >+ </command> >+ </extension> >+ <extension >+ point="org.eclipse.ui.handlers"> >+ <handler >+ class="org.eclipse.ui.internal.carbon.CloseDialogHandler" >+ commandId="org.eclipse.ui.carbon.closeDialog"> >+ </handler> >+ </extension> >+ <extension >+ point="org.eclipse.ui.bindings"> >+ <key >+ commandId="org.eclipse.ui.carbon.closeDialog" >+ contextId="org.eclipse.ui.contexts.dialog" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" >+ sequence="M1+W"> >+ </key> >+ </extension> > > </fragment> >Index: src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java >=================================================================== >RCS file: src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java >diff -N src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 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.internal.carbon; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.IHandler; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+ >+/** >+ * >+ * @author Prakash G.R. (grprakash@gmail.com) >+ * @since 3.6 >+ * >+ */ >+public class CloseDialogHandler extends AbstractHandler implements IHandler { >+ >+ public Object execute(ExecutionEvent event) { >+ >+ Shell activeShell = Display.getDefault().getActiveShell(); >+ // perform only if close is enabled >+ if((activeShell.getStyle() & SWT.CLOSE) != 0) { >+ activeShell.close(); >+ } >+ >+ return null; >+ } >+ >+} >#P org.eclipse.ui.cocoa >Index: fragment-cocoa.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.cocoa/fragment-cocoa.properties,v >retrieving revision 1.1 >diff -u -r1.1 fragment-cocoa.properties >--- fragment-cocoa.properties 7 Nov 2008 14:46:13 -0000 1.1 >+++ fragment-cocoa.properties 1 Dec 2009 06:14:51 -0000 >@@ -12,3 +12,6 @@ > > providerName=Eclipse.org > fragmentName=Eclipse UI MacOS X Enhancements >+ >+command.closeDialog.name=Close Dialog >+command.closeDialog.desc=Closes the active Dialog >\ No newline at end of file >Index: fragment.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.cocoa/fragment.xml,v >retrieving revision 1.1 >diff -u -r1.1 fragment.xml >--- fragment.xml 7 Nov 2008 14:46:13 -0000 1.1 >+++ fragment.xml 1 Dec 2009 06:14:51 -0000 >@@ -8,5 +8,30 @@ > class="org.eclipse.ui.internal.cocoa.CocoaUIEnhancer"> > </startup> > </extension> >+ <extension >+ point="org.eclipse.ui.commands"> >+ <command >+ categoryId="org.eclipse.ui.category.dialogs" >+ description="%command.closeDialog.desc" >+ id="org.eclipse.ui.cocoa.closeDialog" >+ name="%command.closeDialog.name"> >+ </command> >+ </extension> >+ <extension >+ point="org.eclipse.ui.handlers"> >+ <handler >+ class="org.eclipse.ui.internal.cocoa.CloseDialogHandler" >+ commandId="org.eclipse.ui.cocoa.closeDialog"> >+ </handler> >+ </extension> >+ <extension >+ point="org.eclipse.ui.bindings"> >+ <key >+ commandId="org.eclipse.ui.cocoa.closeDialog" >+ contextId="org.eclipse.ui.contexts.dialog" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" >+ sequence="M1+W"> >+ </key> >+ </extension> > > </fragment> >Index: src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java >=================================================================== >RCS file: src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java >diff -N src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 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.internal.cocoa; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.IHandler; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+ >+/** >+ * >+ * @author Prakash G.R. (grprakash@gmail.com) >+ * @since 3.6 >+ * >+ */ >+public class CloseDialogHandler extends AbstractHandler implements IHandler { >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ >+ Shell activeShell = Display.getDefault().getActiveShell(); >+ // perform only if close is enabled >+ if((activeShell.getStyle() & SWT.CLOSE) != 0) { >+ activeShell.close(); >+ } >+ >+ activeShell.close(); >+ return 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 94153
:
149908
|
151671
| 153417 |
153493