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 124727 Details for
Bug 262924
api.tools.ui should have a dependency on org.eclipse.equinox.p2.ui.sdk
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]
Proposed fix
patch_262924.txt (text/plain), 7.31 KB, created by
Olivier Thomann
on 2009-02-04 15:23:47 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-02-04 15:23:47 EST
Size:
7.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.api.tools.ui >Index: src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java,v >retrieving revision 1.66 >diff -u -r1.66 ApiErrorsWarningsConfigurationBlock.java >--- src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java 2 Feb 2009 21:57:58 -0000 1.66 >+++ src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java 4 Feb 2009 20:22:41 -0000 >@@ -15,6 +15,11 @@ > import java.util.Iterator; > import java.util.List; > >+import org.eclipse.core.commands.Command; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.NotEnabledException; >+import org.eclipse.core.commands.NotHandledException; >+import org.eclipse.core.commands.common.NotDefinedException; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.ProjectScope; > import org.eclipse.core.runtime.preferences.DefaultScope; >@@ -58,6 +63,7 @@ > import org.eclipse.swt.widgets.TabItem; > import org.eclipse.swt.widgets.Widget; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.commands.ICommandService; > import org.eclipse.ui.forms.events.ExpansionAdapter; > import org.eclipse.ui.forms.events.ExpansionEvent; > import org.eclipse.ui.forms.widgets.ExpandableComposite; >@@ -1278,23 +1284,45 @@ > } > } > if (installMore) { >- String linkedName = PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label; >- SWTFactory.createVerticalSpacer(group, 1); >- Link link = SWTFactory.createLink(group, linkedName, JFaceResources.getDialogFont(), 3); >- link.setToolTipText(PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_tooltip); >- link.addMouseListener(new MouseAdapter() { >- public void mouseDown(MouseEvent e) { >- IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); >- if(handlerService != null) { >- try { >- handlerService.executeCommand(P2_INSTALL_COMMAND_HANDLER, null); >- } catch (Exception ex) { >- ex.printStackTrace(); >+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); >+ final Command command = commandService.getCommand(P2_INSTALL_COMMAND_HANDLER); >+ if (command.isHandled()) { >+ String linkedName = PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label; >+ SWTFactory.createVerticalSpacer(group, 1); >+ Link link = SWTFactory.createLink(group, linkedName, JFaceResources.getDialogFont(), 3); >+ link.setToolTipText(PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_tooltip); >+ link.addMouseListener(new MouseAdapter() { >+ public void mouseDown(MouseEvent e) { >+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); >+ if(handlerService != null) { >+ try { >+ command.executeWithChecks(handlerService.createExecutionEvent(command, null)); >+ } catch (ExecutionException ex) { >+ MessageDialog.openError( >+ ApiUIPlugin.getShell(), >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); >+ } catch (NotDefinedException ex) { >+ MessageDialog.openError( >+ ApiUIPlugin.getShell(), >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); >+ } catch (NotEnabledException ex) { >+ MessageDialog.openError( >+ ApiUIPlugin.getShell(), >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); >+ } catch (NotHandledException ex) { >+ MessageDialog.openError( >+ ApiUIPlugin.getShell(), >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, >+ PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); >+ } > } > } >- } >- }); >- this.fSystemLibraryControls.add(link); >+ }); >+ this.fSystemLibraryControls.add(link); >+ } > } > } > >Index: src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties,v >retrieving revision 1.74 >diff -u -r1.74 preferencemessages.properties >--- src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties 2 Feb 2009 17:54:47 -0000 1.74 >+++ src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties 4 Feb 2009 20:22:41 -0000 >@@ -160,4 +160,6 @@ > ApiProblemSeveritiesConfigurationBlock_checkable_ees=Supported Environments: > ApiProblemSeveritiesConfigurationBlock_checkable_ees_tooltip=Click to install one or more environment descriptions > ApiErrorsWarningsConfigurationBlock_no_ees_installed=There are no execution descriptions installed. >-ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label=Additional environment descriptions are available: <a>install them now</a> >\ No newline at end of file >+ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label=Additional environment descriptions are available: <a>install them now</a> >+ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title=An error occurred >+ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description=The "Install New Software..." wizard could not be opened.\nCheck the .log file. >Index: src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java,v >retrieving revision 1.45 >diff -u -r1.45 PreferenceMessages.java >--- src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java 2 Feb 2009 17:54:47 -0000 1.45 >+++ src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java 4 Feb 2009 20:22:41 -0000 >@@ -168,6 +168,8 @@ > public static String ApiProblemSeveritiesConfigurationBlock_checkable_ees; > public static String ApiProblemSeveritiesConfigurationBlock_checkable_ees_tooltip; > public static String ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label; >+ public static String ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title; >+ public static String ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description; > > static { > // initialize resource bundle
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 262924
: 124727