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 62012 Details for
Bug 173213
[Commands] Show View cannot be executed from the Command Composer
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]
Command composer supports workbench v02
dialogWithWorkbench-pde-v02.txt (text/plain), 3.52 KB, created by
Paul Webster
on 2007-03-26 15:06:46 EDT
(
hide
)
Description:
Command composer supports workbench v02
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2007-03-26 15:06:46 EDT
Size:
3.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/commands/CommandDetails.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandDetails.java,v >retrieving revision 1.11 >diff -u -r1.11 CommandDetails.java >--- src/org/eclipse/pde/internal/ui/commands/CommandDetails.java 4 Feb 2007 03:11:57 -0000 1.11 >+++ src/org/eclipse/pde/internal/ui/commands/CommandDetails.java 26 Mar 2007 19:05:44 -0000 >@@ -50,15 +50,22 @@ > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.forms.events.HyperlinkAdapter; > import org.eclipse.ui.forms.events.HyperlinkEvent; > import org.eclipse.ui.forms.widgets.ExpandableComposite; > import org.eclipse.ui.forms.widgets.FormToolkit; > import org.eclipse.ui.forms.widgets.ImageHyperlink; > import org.eclipse.ui.forms.widgets.Section; >+import org.eclipse.ui.handlers.IHandlerService; > > public class CommandDetails { > >+ private static IHandlerService getHandlerService() { >+ return (IHandlerService) PlatformUI.getWorkbench().getService( >+ IHandlerService.class); >+ } >+ > private final HashMap fParameterToValue = new HashMap(); > private final ArrayList fObjectParamList = new ArrayList(); > private final ArrayList fValueParamList = new ArrayList(); >@@ -200,7 +207,7 @@ > public void linkActivated(HyperlinkEvent e) { > ParameterizedCommand pCommand = buildParameterizedCommand(); > try { >- Object obj = pCommand.executeWithChecks(null, null); >+ Object obj = getHandlerService().executeCommand(pCommand, null); > String resultString = null; > if (obj instanceof String) { > resultString = (String)obj; >Index: src/org/eclipse/pde/internal/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java,v >retrieving revision 1.15 >diff -u -r1.15 SimpleCSCommandDetails.java >--- src/org/eclipse/pde/internal/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java 23 Jan 2007 23:36:53 -0000 1.15 >+++ src/org/eclipse/pde/internal/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java 26 Mar 2007 19:05:44 -0000 >@@ -49,6 +49,7 @@ > import org.eclipse.ui.IWorkbench; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.commands.ICommandService; >+import org.eclipse.ui.contexts.IContextService; > import org.eclipse.ui.forms.IFormColors; > import org.eclipse.ui.forms.widgets.ExpandableComposite; > import org.eclipse.ui.forms.widgets.FormToolkit; >@@ -211,6 +212,9 @@ > fCommandBrowse.getShell(), > CommandComposerPart.F_CHEATSHEET_FILTER, > getParameterizedCommand(fRun)); >+ dialog.create(); >+ getContextService().registerShell(dialog.getShell(), >+ IContextService.TYPE_DIALOG_SUPPORTS_WORKBENCH); > // Check result of dialog > if (dialog.open() == Window.OK) { > // Command composer exited successfully >@@ -432,7 +436,12 @@ > private static ICommandService getCommandService() { > IWorkbench workbench = PlatformUI.getWorkbench(); > return (ICommandService)workbench.getAdapter(ICommandService.class); >- } >+ } >+ >+ private static IContextService getContextService() { >+ IWorkbench workbench = PlatformUI.getWorkbench(); >+ return (IContextService)workbench.getService(IContextService.class); >+ } > > /** > *
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 173213
:
61932
|
62000
| 62012 |
64257
|
64547