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 92730 Details for
Bug 222378
Welcome page links to classic update
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]
Welcome Page v02
patch-welcomePage_v02.txt (text/plain), 4.28 KB, created by
Tim Mok
on 2008-03-17 14:31:59 EDT
(
hide
)
Description:
Welcome Page v02
Filename:
MIME Type:
Creator:
Tim Mok
Created:
2008-03-17 14:31:59 EDT
Size:
4.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.platform >Index: src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.platform/src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java,v >retrieving revision 1.1 >diff -u -r1.1 LaunchUpdateIntroAction.java >--- src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java 21 Jun 2005 22:42:02 -0000 1.1 >+++ src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java 17 Mar 2008 18:30:44 -0000 >@@ -1,40 +1,63 @@ > /******************************************************************************* >- * Copyright (c) 200, 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 >- *******************************************************************************/ >+ * Copyright (c) 200, 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.platform.internal; > > import java.util.Properties; > >+import org.eclipse.core.commands.Command; >+import org.eclipse.core.commands.ExecutionEvent; >+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.internal.registry.BundleHelper; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.internal.adaptor.PluginParser.PluginInfo; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.commands.ICommandService; >+import org.eclipse.ui.handlers.IHandlerService; >+import org.eclipse.ui.internal.util.BundleUtility; > import org.eclipse.ui.intro.IIntroSite; > import org.eclipse.ui.intro.config.IIntroAction; > import org.eclipse.update.ui.UpdateManagerUI; >+import org.osgi.framework.Bundle; > > public class LaunchUpdateIntroAction implements IIntroAction { > >- public LaunchUpdateIntroAction() { >- } >+ private static final String COMMAND_P2 = "org.eclipse.equinox.p2.ui.sdk.update"; >+ private static final String COMMAND_UPDATE_MANAGER = "org.eclipse.ui.update.findAndInstallUpdates"; > >- public void run(IIntroSite site, Properties params) { >+ public LaunchUpdateIntroAction() { >+ } > >- Runnable r = new Runnable() { >- public void run() { >- Shell currentShell = PlatformUI.getWorkbench() >- .getActiveWorkbenchWindow().getShell(); >- UpdateManagerUI.openInstaller(currentShell); >- } >- }; >- >- Shell currentShell = PlatformUI.getWorkbench() >- .getActiveWorkbenchWindow().getShell(); >- currentShell.getDisplay().asyncExec(r); >- } >+ public void run(IIntroSite site, Properties params) { >+ if (!executeUpdateCommand(COMMAND_P2)){ >+ executeUpdateCommand(COMMAND_UPDATE_MANAGER); >+ } >+ } >+ >+ private boolean executeUpdateCommand(String command) { >+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); >+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); >+ Command cmd; >+ cmd = commandService.getCommand(command); >+ ExecutionEvent executionEvent = handlerService.createExecutionEvent(cmd, null); >+ try { >+ cmd.executeWithChecks(executionEvent); >+ } catch (ExecutionException e) { >+ } catch (NotDefinedException e) { >+ return false; >+ } catch (NotEnabledException e) { >+ } catch (NotHandledException e) { >+ return false; >+ } >+ return true; >+ } > }
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 222378
:
92593
|
92730
|
92736