This commit was manufactured by cvs2svn to create tag 'v20020402'.
Sprout from master 2002-04-02 13:53:43 UTC vlad <vlad> 'missing .options in build.properties'
Cherrypick from master 2002-03-21 17:51:44 UTC Dejan Glozic <dejan> '*** empty log message ***':
update/org.eclipse.update.ui.forms/.classpath
update/org.eclipse.update.ui.forms/.project
update/org.eclipse.update.ui.forms/plugin.xml
update/org.eclipse.update.ui.forms/src/org/eclipse/update/ui/forms/internal/engine/Locator.java
Delete:
platform/org.eclipse.sdk/.vcm_meta
platform/org.eclipse.sdk/about.html
platform/org.eclipse.sdk/about_prod.gif
platform/org.eclipse.sdk/build.properties
platform/org.eclipse.sdk/platform.ini
platform/org.eclipse.sdk/platform.properties
platform/org.eclipse.sdk/plugin.properties
platform/org.eclipse.sdk/plugin.xml
platform/org.eclipse.sdk/prod.gif
platform/org.eclipse.sdk/product.ini
platform/org.eclipse.sdk/product.properties
platform/org.eclipse.sdk/welcome.xml
update/org.eclipse.update.examples/bin/org/eclipse/update/examples/buildzip/java.page.jpage
update/org.eclipse.update/.classpath
update/org.eclipse.update/.cvsignore
update/org.eclipse.update/.vcm_meta
update/org.eclipse.update/about.html
update/org.eclipse.update/build.properties
update/org.eclipse.update/icons/full/ctool16/new.gif
update/org.eclipse.update/icons/full/ctool16/update.gif
update/org.eclipse.update/icons/full/wizban/new.gif
update/org.eclipse.update/icons/full/wizban/revert.gif
update/org.eclipse.update/icons/full/wizban/update.gif
update/org.eclipse.update/plugin.properties
update/org.eclipse.update/plugin.xml
update/org.eclipse.update/plugin.xml.off
update/org.eclipse.update/src/org/eclipse/update/internal/core/ISessionDefiner.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/IUMLock.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMLock.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionDefinerReferenceUpdate.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManager.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerEntry.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerMessage.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerOperation.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerParcel.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerSession.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/URLHandler.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManager.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerException.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerPlugin.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerStrings.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerURLComparator.java
update/org.eclipse.update/src/org/eclipse/update/internal/core/updatemanagerstrings.properties
update/org.eclipse.update/src/org/eclipse/update/internal/ui/AuthorizationDatabase.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/Installation.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationDialog.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationResult.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationService.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerifier.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/KeyStores.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/Main.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplication.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterface.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterfaceProperties.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationWindow.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialog.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialogAction.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMPreferencePageSettings.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizard.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageComplete.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstallable.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstalling.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistory.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistoryComplete.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLocations.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLComplete.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstall.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstallable.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstalling.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPersistentProperties.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentNew.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentRevert.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentURLInstall.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentUpdate.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItem.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItemComparator.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardURLNamePairComparator.java
update/org.eclipse.update/src/org/eclipse/update/internal/ui/UserValidationDialog.java
diff --git a/platform/org.eclipse.sdk/.vcm_meta b/platform/org.eclipse.sdk/.vcm_meta
deleted file mode 100644
index 3f788a5..0000000
--- a/platform/org.eclipse.sdk/.vcm_meta
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-description>
- <comment></comment>
-</project-description>
diff --git a/platform/org.eclipse.sdk/about.html b/platform/org.eclipse.sdk/about.html
deleted file mode 100644
index 768324e..0000000
--- a/platform/org.eclipse.sdk/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in "Content". Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> "CPL". For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL "Other License", any modifications, enhancements and/or
-other code and/or documentation "Modifications" uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html>
\ No newline at end of file
diff --git a/platform/org.eclipse.sdk/about_prod.gif b/platform/org.eclipse.sdk/about_prod.gif
deleted file mode 100644
index 262c524..0000000
--- a/platform/org.eclipse.sdk/about_prod.gif
+++ /dev/null
Binary files differ
diff --git a/platform/org.eclipse.sdk/build.properties b/platform/org.eclipse.sdk/build.properties
deleted file mode 100644
index 220b667..0000000
--- a/platform/org.eclipse.sdk/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# Eclipse build contribution
-bin.includes=*.gif,platform.ini,platform.properties,plugin.xml,plugin.properties,product.properties,welcome.xml,product.ini,about.html
diff --git a/platform/org.eclipse.sdk/platform.ini b/platform/org.eclipse.sdk/platform.ini
deleted file mode 100644
index 0d3adeb..0000000
--- a/platform/org.eclipse.sdk/platform.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-name = Eclipse Platform
-detailedName = %detailedName
-version = 2.0 (pre-release)
-buildID = @build@
-platformURL = http://www.eclipse.org
-copyright = %copyright
-
diff --git a/platform/org.eclipse.sdk/platform.properties b/platform/org.eclipse.sdk/platform.properties
deleted file mode 100644
index 5c5ebe3..0000000
--- a/platform/org.eclipse.sdk/platform.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-copyright = (c) Copyright IBM Corp. 2000, 2002. All rights reserved.\n\
-\n\
- This offering is based on technology from the Eclipse Project.\n\
- http://www.eclipse.org\n\
-\n\
- Third party code may be provided with, included in, or accompany this product.\n\
- See the license and plugin info for details.\n\
-
-detailedName = Eclipse Platform
\ No newline at end of file
diff --git a/platform/org.eclipse.sdk/plugin.properties b/platform/org.eclipse.sdk/plugin.properties
deleted file mode 100644
index e698ba3..0000000
--- a/platform/org.eclipse.sdk/plugin.properties
+++ /dev/null
@@ -1 +0,0 @@
-pluginName = Eclipse SDK Configuration Plug-In
diff --git a/platform/org.eclipse.sdk/plugin.xml b/platform/org.eclipse.sdk/plugin.xml
deleted file mode 100644
index 69ed2d5..0000000
--- a/platform/org.eclipse.sdk/plugin.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.sdk"
- name="%pluginName"
- version="2.0"
- provider-name="Object Technology International, Inc.">
-</plugin>
diff --git a/platform/org.eclipse.sdk/prod.gif b/platform/org.eclipse.sdk/prod.gif
deleted file mode 100644
index 6ca37e0..0000000
--- a/platform/org.eclipse.sdk/prod.gif
+++ /dev/null
Binary files differ
diff --git a/platform/org.eclipse.sdk/product.ini b/platform/org.eclipse.sdk/product.ini
deleted file mode 100644
index 48c2ef5..0000000
--- a/platform/org.eclipse.sdk/product.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-name = Eclipse Project SDK
-detailedName = %detailedName
-image = prod.gif
-version = 2.0 (pre-release)
-application = org.eclipse.ui.workbench
-appName = Eclipse
-productURL = http://www.eclipse.org
-aboutImage = about_prod.gif
-welcomePage = welcome.xml
-baseInfosets = /org.eclipse.platform.doc.user/toc.xml,\
- /org.eclipse.jdt.doc.user/toc.xml,\
- /org.eclipse.platform.doc.isv/toc.xml,\
- /org.eclipse.jdt.doc.isv/toc.xml,\
- /org.eclipse.pde.doc.user/toc.xml
-defaultPerspectiveId = org.eclipse.ui.resourcePerspective
-copyright = %copyright
-buildID = @build@
\ No newline at end of file
diff --git a/platform/org.eclipse.sdk/product.properties b/platform/org.eclipse.sdk/product.properties
deleted file mode 100644
index 2c63923..0000000
--- a/platform/org.eclipse.sdk/product.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-copyright = (c) Copyright IBM Corp. 2000, 2002. All rights reserved.\n\
-\n\
- Visit the website at http://www.eclipse.org\n\
-
-detailedName = Eclipse Project SDK
-
diff --git a/platform/org.eclipse.sdk/welcome.xml b/platform/org.eclipse.sdk/welcome.xml
deleted file mode 100644
index 124f33c..0000000
--- a/platform/org.eclipse.sdk/welcome.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<welcomePage
- title="Welcome to the Workbench">
- <intro>This page will help familiarize you with the Workbench.
-To get started, read the sections below and click on the related links. </intro>
-
- <item><b>Create Java components </b>
-To begin Java development, create a <action pluginId="org.eclipse.jdt.ui" class="org.eclipse.jdt.internal.ui.wizards.OpenProjectWizardAction">Java project</action>. Select the newly created project
-and choose File > New > Other.... In the left column of the wizard, select Java and double
-click on Java Package in the right column. Fill in the name of your package and click Finish.
-
-To create a Java class, select the package in the navigator view and click on the
-"Open the New Wizard" toolbar button (on the far left of the toolbar). This toolbar button
-provides us with a quick alternative to File > New > Other... . Choose Java Class in the right column of
-the category Java, and click Next. In the class wizard fill in the name of your class and
-click Finish to create the class and start editing it.</item>
-
- <item><b>Perspectives, views and editors </b>
-A window contains one or more perspectives. A perspective consists of views (e.g. Navigator)
-and editors for working with your resources.
-
-The shortcut bar at the far left of the window allows you to open new perspectives and move
-between perspectives that are already open. You can also use Alt+Up and Alt+Down to
-move between the open perspectives. The perspective you are currently working with is shown
-in the title of the window and in the shortcut bar as a pushed-in icon.
-
-When opening perspectives you can hold down Ctrl (on Linux use Alt+Shift) or Shift to
-optionally open each perspective in its own window, or to replace the current perspective
-with a new perspective. The behavior of Ctrl and Shift is configurable from <action pluginId="org.eclipse.ui" class="org.eclipse.ui.internal.OpenPreferencesAction">Workbench > Preferences</action>.
-
-To open the Java perspective choose Perspective > Open > Java. </item>
-
-
-<item><b>Configuring your perspectives</b>
-You can move views and editors around the workbench by dragging their titlebars. You can
-also add more views to your current perspective by using Perspective > Show View.
-To reset the perspective to its original state, choose <action pluginId="org.eclipse.ui" class="org.eclipse.ui.internal.ResetPerspectiveAction">Perspective > Reset</action>.
-
-Once you have arranged your perspective, you can save it using Perspective > Save As....
-You can customize the views, perspectives and New menu operations that show up for
-your perspective. To do this choose <action pluginId="org.eclipse.ui" class="org.eclipse.ui.internal.EditActionSetsAction">Perspective > Customize...</action>. A view can
-additionally be converted into a Fast View by dragging it to the shortcut bar (at the
-far left of the window). </item>
-
-<item><b>Join a CVS team</b>
-To join a CVS development team, open the <action pluginId="org.eclipse.vcm.ui" class="org.eclipse.vcm.internal.ui.actions.OpenRepositoriesViewAction">Repositories view</action>. Next, specify the location
-of your CVS repository. To do this choose <action pluginId="org.eclipse.vcm.ui.cvs" class="org.eclipse.vcm.internal.ui.ccvs.NewRepositoryConnectionAction">New > CVS Repository Location...</action> from the
-Repositories view popup menu. When the location wizard opens, fill in the details of your
-CVS repository and click Finish.
-
-In the Repositories view expand the location entry and expand Streams. Choose the HEAD
-stream and expand it to view any ongoing work. Select the projects you want to work with
-and choose "Add to Workspace" from the project's popup menu.</item>
-
-
- <item><b>Learn more </b>
-To learn more you can browse the <topic id="/org.eclipse.platform.doc.user/toc.xml">Workbench User Guide</topic> or the <topic id="/org.eclipse.jdt.doc.user/toc.xml">Java Development User Guide</topic>.</item>
-
-
-</welcomePage>
\ No newline at end of file
diff --git a/update/org.eclipse.update.examples/bin/org/eclipse/update/examples/buildzip/java.page.jpage b/update/org.eclipse.update.examples/bin/org/eclipse/update/examples/buildzip/java.page.jpage
deleted file mode 100644
index 8b3ca30..0000000
--- a/update/org.eclipse.update.examples/bin/org/eclipse/update/examples/buildzip/java.page.jpage
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update.ui.forms/.classpath b/update/org.eclipse.update.ui.forms/.classpath
index b76e4de..1e0a854 100644
--- a/update/org.eclipse.update.ui.forms/.classpath
+++ b/update/org.eclipse.update.ui.forms/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="src" path="/org.eclipse.core.runtime"/>
+ <classpathentry kind="src" path="/org.eclipse.core.resources"/>
<classpathentry kind="src" path="/org.eclipse.ui"/>
<classpathentry kind="src" path="/org.apache.xerces"/>
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
diff --git a/update/org.eclipse.update.ui.forms/.project b/update/org.eclipse.update.ui.forms/.project
index 3eee13e..f716111 100644
--- a/update/org.eclipse.update.ui.forms/.project
+++ b/update/org.eclipse.update.ui.forms/.project
@@ -5,6 +5,7 @@
<projects>
<project>org.apache.xerces</project>
<project>org.eclipse.core.boot</project>
+ <project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
<project>org.eclipse.ui</project>
</projects>
diff --git a/update/org.eclipse.update.ui.forms/plugin.xml b/update/org.eclipse.update.ui.forms/plugin.xml
index b35c62e..5c8b4cb 100644
--- a/update/org.eclipse.update.ui.forms/plugin.xml
+++ b/update/org.eclipse.update.ui.forms/plugin.xml
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- File written by PDE 1.0 -->
<plugin
id="org.eclipse.update.ui.forms"
name="%name"
version="2.0.0"
provider-name="International Business Machines Corp."
class="">
+<requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.apache.xerces"/>
+</requires>
- <runtime>
- <library name="forms.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.apache.xerces"/>
- </requires>
-
-
+<runtime>
+ <library name="forms.jar">
+ <export name="*"/>
+ </library>
+</runtime>
</plugin>
diff --git a/update/org.eclipse.update.ui.forms/src/org/eclipse/update/ui/forms/internal/engine/Locator.java b/update/org.eclipse.update.ui.forms/src/org/eclipse/update/ui/forms/internal/engine/Locator.java
index fb46567..fbd75d3 100644
--- a/update/org.eclipse.update.ui.forms/src/org/eclipse/update/ui/forms/internal/engine/Locator.java
+++ b/update/org.eclipse.update.ui.forms/src/org/eclipse/update/ui/forms/internal/engine/Locator.java
@@ -8,7 +8,7 @@
* @version 1.0
* @author
*/
-public class Locator {
+public class Locator {
public int indent;
public int x, y;
public int width, height;
diff --git a/update/org.eclipse.update/.classpath b/update/org.eclipse.update/.classpath
deleted file mode 100644
index f12531d..0000000
--- a/update/org.eclipse.update/.classpath
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="var"
- path="ECLIPSE_HOME/plugins/org.eclipse.core.boot/boot.jar" sourcepath="ECLIPSE_HOME/plugins/org.eclipse.core.boot/bootsrc.zip"/>
- <classpathentry kind="var"
- path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime/runtime.jar" sourcepath="ECLIPSE_HOME/plugins/org.eclipse.core.runtime/runtimesrc.zip"/>
- <classpathentry kind="var"
- path="ECLIPSE_HOME/plugins/org.eclipse.swt/swt.jar" sourcepath="ECLIPSE_HOME/plugins/org.eclipse.swt/swtsrc.zip"/>
- <classpathentry kind="var"
- path="ECLIPSE_HOME/plugins/org.eclipse.ui/workbench.jar" sourcepath="ECLIPSE_HOME/plugins/org.eclipse.ui/workbenchsrc.zip"/>
- <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.webdav/webdav.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/update/org.eclipse.update/.cvsignore b/update/org.eclipse.update/.cvsignore
deleted file mode 100644
index c5e82d7..0000000
--- a/update/org.eclipse.update/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
\ No newline at end of file
diff --git a/update/org.eclipse.update/.vcm_meta b/update/org.eclipse.update/.vcm_meta
deleted file mode 100644
index 7655f8d..0000000
--- a/update/org.eclipse.update/.vcm_meta
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-description>
- <comment></comment>
- <nature id="org.eclipse.jdt.core.javanature"/>
- <builder name="org.eclipse.jdt.core.javabuilder">
- </builder>
-</project-description>
diff --git a/update/org.eclipse.update/about.html b/update/org.eclipse.update/about.html
deleted file mode 100644
index 9a15e5c..0000000
--- a/update/org.eclipse.update/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body>
-<body lang=EN-US link=blue vlink=purple>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
- <tr>
- <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">About This Plug-in</font></b></td>
- </tr>
- <tr>
- <td>
-<p>1st November, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in. The plug-in is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a>. For purposes of the Common Public License, "Program" will mean the plug-in.</p>
-</td></tr></table>
-</body>
-</html>
\ No newline at end of file
diff --git a/update/org.eclipse.update/build.properties b/update/org.eclipse.update/build.properties
deleted file mode 100644
index ac7da03..0000000
--- a/update/org.eclipse.update/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-source.update.jar=src/
-bin.includes=plugin.xml,icons/,plugin.properties,*.jar,about.html
diff --git a/update/org.eclipse.update/icons/full/ctool16/new.gif b/update/org.eclipse.update/icons/full/ctool16/new.gif
deleted file mode 100644
index d16d5b0..0000000
--- a/update/org.eclipse.update/icons/full/ctool16/new.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/icons/full/ctool16/update.gif b/update/org.eclipse.update/icons/full/ctool16/update.gif
deleted file mode 100644
index f011d8a..0000000
--- a/update/org.eclipse.update/icons/full/ctool16/update.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/icons/full/wizban/new.gif b/update/org.eclipse.update/icons/full/wizban/new.gif
deleted file mode 100644
index 2a0c793..0000000
--- a/update/org.eclipse.update/icons/full/wizban/new.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/icons/full/wizban/revert.gif b/update/org.eclipse.update/icons/full/wizban/revert.gif
deleted file mode 100644
index d7402a2..0000000
--- a/update/org.eclipse.update/icons/full/wizban/revert.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/icons/full/wizban/update.gif b/update/org.eclipse.update/icons/full/wizban/update.gif
deleted file mode 100644
index 4ff15da..0000000
--- a/update/org.eclipse.update/icons/full/wizban/update.gif
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/plugin.properties b/update/org.eclipse.update/plugin.properties
deleted file mode 100644
index 9c052ee..0000000
--- a/update/org.eclipse.update/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-S_Eclipse_Update_Manager_Plugin = Install/Update Manager
-S_Software_Updates = &Software Updates
-S_Software_Updates_Preferences = Software Updates
diff --git a/update/org.eclipse.update/plugin.xml b/update/org.eclipse.update/plugin.xml
deleted file mode 100644
index 87f8787..0000000
--- a/update/org.eclipse.update/plugin.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.update"
- name="%S_Eclipse_Update_Manager_Plugin"
- version="1.0"
- provider-name="International Business Machines Corp."
- class="org.eclipse.update.internal.core.UpdateManagerPlugin">
-<requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.webdav"/>
-</requires>
-
-<runtime>
- <library name="update.jar"/>
-</runtime>
-
-<!-- ================================================================================= -->
-<!-- -->
-<!-- Update Manager Help Menu Action Set -->
-<!-- -->
-<!-- ================================================================================= -->
-<extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%S_Software_Updates"
- visible="false"
- id="org.eclipse.update.internal.ui.UpdateManagerActionSet">
- <action
- label="%S_Software_Updates"
- class="org.eclipse.update.internal.ui.UMDialogAction"
- menubarPath="help/helpEnd"
- id="org.eclipse.update.internal.ui.UpdateManagerAction">
- </action>
- </actionSet>
-</extension>
-<!-- ============================================================================================ -->
-<!-- -->
-<!-- Update Manager Application -->
-<!-- -->
-<!-- ============================================================================================ -->
-<extension
- id="updateManager"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.update.internal.ui.UMApplicationUserInterface">
- </run>
- </application>
-</extension>
-</plugin>
diff --git a/update/org.eclipse.update/plugin.xml.off b/update/org.eclipse.update/plugin.xml.off
deleted file mode 100644
index 8a83831..0000000
--- a/update/org.eclipse.update/plugin.xml.off
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Eclipse Update Manager Plugin -->
-
-<plugin
- id = "org.eclipse.update"
- name = "%S_Eclipse_Update_Manager_Plugin"
- version = "1.0"
- provider-name = "International Business Machines Corp."
- class = "org.eclipse.update.internal.core.UpdateManagerPlugin">
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.webdav"/>
- </requires>
-
- <runtime>
- <library name="update.jar" />
- </runtime>
-
- <!-- ================================================================================= -->
- <!-- -->
- <!-- Update Manager Preference Page Settings -->
- <!-- -->
- <!-- ================================================================================= -->
- <extension point="org.eclipse.ui.preferencePages">
- <page id = "UMPreferencePageSettings"
- name = "%S_Software_Updates_Preferences"
- class = "org.eclipse.update.internal.ui.UMPreferencePageSettings">
- </page>
- </extension>
-
- <!-- ================================================================================= -->
- <!-- -->
- <!-- Update Manager Help Menu Action Set -->
- <!-- -->
- <!-- ================================================================================= -->
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- id = "org.eclipse.update.internal.ui.UpdateManagerActionSet"
- label = "%S_Software_Updates"
- visible = "true">
- <action id = "org.eclipse.update.internal.ui.UpdateManagerAction"
- menubarPath = "help/helpEnd"
- label = "%S_Software_Updates"
- class = "org.eclipse.update.internal.ui.UMDialogAction"/>
- </actionSet>
- </extension>
-
- <!-- ============================================================================================ -->
- <!-- -->
- <!-- Update Manager Application -->
- <!-- -->
- <!-- ============================================================================================ -->
- <extension id="updateManager" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.update.internal.ui.UMApplicationUserInterface">
- </run>
- </application>
- </extension>
-</plugin>
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/ISessionDefiner.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/ISessionDefiner.java
deleted file mode 100644
index 626ca05..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/ISessionDefiner.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- */
-import org.eclipse.core.internal.boot.update.*;
-
-public interface ISessionDefiner {
-/**
- * Creates one or more operations for the current session.
- */
-void defineOperations( UMSessionManagerSession session, IInstallable[] descriptors, boolean bVerifyJars );
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/IUMLock.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/IUMLock.java
deleted file mode 100644
index c25c907..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/IUMLock.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- */
-public interface IUMLock {
-/**
- * Checks to see if the UMLock file is there. If yes, returns true
- */
-public boolean exists();
-/**
- */
-void remove();
-/**
- */
-void set();
-/**
- */
-void set(String msg);
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMLock.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMLock.java
deleted file mode 100644
index 5c08d9a..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMLock.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- */
-import org.eclipse.core.internal.boot.update.*;
-import java.io.*;
-import java.net.*;
-public class UMLock implements IUMLock {
- File file = null;
-/**
- * UMLock constructor comment.
- */
-public UMLock() {
- super();
- URL lockfileURL = null;
- try {
- lockfileURL = new URL(UMEclipseTree.getInstallTreeURL(), IManifestAttributes.UM_LOCK);
- } catch (MalformedURLException ex) {
- }
- file = getFile(lockfileURL);
-}
-/**
- * Checks to see if the UMLock file is there. If yes, returns true
- */
-public boolean exists() {
-
- if (file != null) {
- if (file.exists() == true) {
- return true;
- }
- }
- return false;
-}
-/**
- */
-public static File getFile(URL url) {
- File file = null;
- if (url != null) {
-
- // Convert the URL to a string
- //----------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(url);
-
- file = new File(strFilespec);
- }
- return file;
-}
-/**
- */
-public void remove() {
- if (exists())
- file.delete();
-
-}
-/**
- */
-public void set() {
- set("");
-}
-/**
- */
-public void set(String msg) {
- URL lockfileURL = null;
- try {
- lockfileURL = new URL(UMEclipseTree.getInstallTreeURL(), IManifestAttributes.UM_LOCK);
- } catch (MalformedURLException ex) {
- }
-
- // Create a lock file
- //-------------------
- Log lockfile = new Log();
-
- try {
- lockfile.load(lockfileURL); // creates file if it doesn't exist
- }
- catch (LogStoreException ex) {
- return;
- }
-
- // Add an entry
- //-------------
- LogEntry lockEntry = new LogEntry( lockfile, msg );
- lockfile.addChildEntry( lockEntry );
-
-
- try {
- lockfile.save(lockfileURL);
- }
- catch (LogStoreException ex) {
- return;
- }
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionDefinerReferenceUpdate.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionDefinerReferenceUpdate.java
deleted file mode 100644
index 240091b..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionDefinerReferenceUpdate.java
+++ /dev/null
@@ -1,216 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- */
-import org.eclipse.core.internal.boot.update.*;
-import org.eclipse.core.internal.boot.LaunchInfo;
-
-public class UMSessionDefinerReferenceUpdate implements ISessionDefiner {
-/**
- * UMUpdaterCached constructor comment.
- */
-public UMSessionDefinerReferenceUpdate() {
- super();
-}
-/**
- * Creates one or more operations for the current parcel.
- */
-public void defineComponentOperation(UMSessionManagerParcel parcel, IInstallable descriptor, boolean bVerifyJars) {
-
- IComponentDescriptor componentDescriptor = null;
-
- if (descriptor instanceof IComponentDescriptor) {
- componentDescriptor = (IComponentDescriptor) descriptor;
- }
- else if (descriptor instanceof IComponentEntryDescriptor) {
- componentDescriptor = ((IComponentEntryDescriptor) descriptor).getComponentDescriptor();
- }
- if (componentDescriptor == null)
- return;
-
- UMSessionManagerOperation operation = null;
-
- // Create download operation
- //--------------------------
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_COPY);
- operation.setId(componentDescriptor.getUniqueIdentifier());
- operation.setSource(componentDescriptor.getDownloadURL().toExternalForm());
- String downloadTarget = UMEclipseTree.getStagingArea().toExternalForm() + componentDescriptor.getDirName() + ".jar";
- operation.setTarget(downloadTarget);
- operation.setData(descriptor);
-
- // Create jar verification operation
- //----------------------------------
- if (bVerifyJars == true) {
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_VERIFY_JAR);
- operation.setId(componentDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- operation.setTarget(null);
- operation.setData(descriptor);
- }
-
- // Create apply operation for component files (files not in plugins/ dir structure)
- //---------------------------------------------------------------------------------
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_UNZIP_INSTALL);
- operation.setId(componentDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- String applyTarget = UMEclipseTree.getBaseInstallURL().toExternalForm();
- // String applyTarget = "file:///c:/temp/x/" ;
- operation.setTarget(applyTarget);
- operation.setData(descriptor);
-
- // Create apply operation for plug-ins
- //------------------------------------
- IPluginEntryDescriptor[] plugins = componentDescriptor.getPluginEntries();
- IFragmentEntryDescriptor[] fragments = componentDescriptor.getFragmentEntries();
- if ((plugins.length > 0) || (fragments.length >0)) {
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_UNZIP_PLUGINS);
- operation.setId(componentDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- // by specifiying the install dir with a trailing slash, the unzip method
- // will just unzip the contents of the jar into the dir
- applyTarget = UMEclipseTree.getBaseInstallURL().toExternalForm();
- // applyTarget = "file:///c:/temp/x/" ;
- operation.setTarget(applyTarget);
- operation.setData(descriptor);
- }
-
-}
-/**
- * Creates one or more operations for the current session.
- */
-public void defineOperations(UMSessionManagerSession session, IInstallable[] descriptors, boolean bVerifyJars) {
-
- for (int i = 0; i < descriptors.length; ++i) {
-
- // Products
- //---------
- if (descriptors[i] instanceof IProductDescriptor) {
-
- UMSessionManagerParcel parcel = null;
-
- // Create parcel
- //--------------
- parcel = session.createParcel();
- parcel.setType(IManifestAttributes.PRODUCT);
- parcel.setAction(UpdateManagerConstants.OPERATION_ACTION_INSTALL);
- parcel.setId(((IProductDescriptor) descriptors[i]).getUniqueIdentifier());
- parcel.setData((IProductDescriptor) descriptors[i]);
-
- defineProductOperation(parcel, descriptors[i], bVerifyJars);
- }
-
- // Components
- //-----------
- else if (descriptors[i] instanceof IComponentDescriptor) {
-
- UMSessionManagerParcel parcel = null;
-
- // Create parcel
- //--------------
- parcel = session.createParcel();
- parcel.setType(IManifestAttributes.COMPONENT);
- parcel.setAction(UpdateManagerConstants.OPERATION_ACTION_INSTALL);
- parcel.setId(((IComponentDescriptor) descriptors[i]).getUniqueIdentifier());
- parcel.setData((IComponentDescriptor) descriptors[i]);
-
- defineComponentOperation(parcel, descriptors[i], bVerifyJars);
- }
-
- // Component Entries
- //------------------
- else if (descriptors[i] instanceof IComponentEntryDescriptor) {
-
- UMSessionManagerParcel parcel = null;
-
- // Create parcel
- //--------------
- parcel = session.createParcel();
- parcel.setType(IManifestAttributes.COMPONENT);
- parcel.setAction(UpdateManagerConstants.OPERATION_ACTION_INSTALL);
- parcel.setId(((IComponentEntryDescriptor) descriptors[i]).getUniqueIdentifier());
- parcel.setData((IComponentEntryDescriptor) descriptors[i]);
-
- defineComponentOperation(parcel, descriptors[i], bVerifyJars);
- }
- }
-}
-/**
- * Creates one or more operations for the current parcel.
- */
-public void defineProductOperation(UMSessionManagerParcel parcel, IInstallable descriptor, boolean bVerifyJars) {
-
- IProductDescriptor productDescriptor = (IProductDescriptor) descriptor;
- UMSessionManagerOperation operation = null;
-
- // Create download operation
- //--------------------------
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_COPY);
- operation.setId(productDescriptor.getUniqueIdentifier());
- operation.setSource(productDescriptor.getDownloadURL().toExternalForm());
- String downloadTarget = UMEclipseTree.getStagingArea().toString() + productDescriptor.getDirName() + ".jar";
- operation.setTarget(downloadTarget);
- operation.setData(productDescriptor);
-
- // Create jar verification operation
- //----------------------------------
- if (bVerifyJars == true) {
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_VERIFY_JAR);
- operation.setId(productDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- operation.setTarget(null);
- operation.setData(productDescriptor);
- }
-
- // Create apply operation for product files
- //-----------------------------------------
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_UNZIP_INSTALL);
- operation.setId(productDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- String applyTarget = UMEclipseTree.getBaseInstallURL().toExternalForm();
- operation.setTarget(applyTarget);
- operation.setData(productDescriptor);
-
- // Create component sub-parcels
- //-----------------------------
- IComponentEntryDescriptor[] entries = productDescriptor.getComponentEntries();
- for (int j = 0; j < entries.length; ++j) {
- if (entries[j].isSelected()) {
-
- UMSessionManagerParcel subparcel = null;
- // Create parcel for each component
- //---------------------------------
- subparcel = parcel.createParcel();
- subparcel.setType(IManifestAttributes.COMPONENT);
- subparcel.setAction(UpdateManagerConstants.OPERATION_ACTION_INSTALL);
- subparcel.setId(entries[j].getUniqueIdentifier());
- subparcel.setData(entries[j]);
-
- defineComponentOperation(subparcel, entries[j], bVerifyJars);
- }
- }
-
- // Create apply operation for product files
- //-----------------------------------------
- String app = LaunchInfo.getCurrent().getApplicationConfigurationIdentifier();
- if ((app != null) && (app.equals(productDescriptor.getUniqueIdentifier()))) { // dominant app?
- operation = parcel.createOperation();
- operation.setAction(UpdateManagerConstants.OPERATION_UNZIP_BINDIR);
- operation.setId(productDescriptor.getUniqueIdentifier());
- operation.setSource(downloadTarget);
- operation.setTarget(applyTarget);
- operation.setData(productDescriptor);
- }
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManager.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManager.java
deleted file mode 100644
index ab379b5..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManager.java
+++ /dev/null
@@ -1,351 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.internal.boot.update.*;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * Session Manager executes defined sessions, and manages the update and update history logs.
- * Logs look like this:
- *
- * <session timestamp="xxxx" status="complete" attempts="1">
- * <operation action="urltocache" status="complete" attempts="1">
- * <parcel type="component" id="xxx" action="add" status="complete" attempts="1">
- * <item id="xxx" source="file:///C:/temp/sample_in.java" target="file:///C:/temp/sample_out.java" status="complete" attempts="1">
- * <message text="successful" timestamp="Thu Mar 01 09:56:49 EST 2001" />
- * </item>
- * </parcel>
- * </operation>
- * </session>
- *
- *
- * Each element is represented by an UpdateManagerXyz class and have specific
- * member functions for accessing domain specific attributes and child elements.
- * The "status" attribute can be one of "pending", "failed", or "complete".
- */
-
-public class UMSessionManager {
-
- protected Log _logUpdate = null;
- protected Log _logHistory = null;
-
- protected URL _urlUpdate = null;
- protected URL _urlHistory = null;
-
- protected ArrayList _alUpdateSessions = new ArrayList();
-/**
- * Constructs an UpdateManager with the update log and history log URLs.
- * The boolean specifies whether an exception should be thrown if one of
- * the logs is not found.
- */
-public UMSessionManager(URL urlUpdateLog, URL urlHistoryLog, boolean notifyIfLogNotFound) throws LogStoreException {
-
- _urlUpdate = urlUpdateLog;
- _urlHistory = urlHistoryLog;
-
- // Attempt to open the two logs
- //-----------------------------
- _logUpdate = new Log();
- _logHistory = new Log();
-
- // If the files do not exist
- // notify if required. Otherwise assume new files
- //------------------------------------------------
- try {
- _logUpdate.load(_urlUpdate);
- }
- catch (LogStoreException ex) {
-// _logUpdate.printEntryTree(0);
- if (notifyIfLogNotFound == true) {
- throw ex;
- }
- }
-
- // Create the update session structure from the log
- //-------------------------------------------------
- buildTreeFromLog( _logUpdate );
-
-/*
- try {
- _logHistory.load(_urlUpdate);
- }
- catch (LogStoreException ex) {
-
- if (notifyIfLogNotFound == true) {
- throw ex;
- }
- }
-
- _logHistory.printEntryTree(0);
-*/
-}
-/**
- * Creates a tree of sessions from the given log.
- * @param logUpdate org.eclipse.update.internal.core.Log
- * @param alUpdate java.util.ArrayList
- */
-private void buildTreeFromLog(Log logUpdate ) {
-
- ILogEntry[] entryChildren = logUpdate.getChildEntries();
-
- UMSessionManagerSession session = null;
-
- for( int i=0; i<entryChildren.length; ++i )
- {
- session = new UMSessionManagerSession( entryChildren[i] );
-
- _alUpdateSessions.add( session );
-
- session.buildTreeFromLog( entryChildren[i] );
- }
-
- return;
-}
-/**
- * Creates a new update session where pending operations may be defined for
- * completion.
- * @return org.eclipse.update.internal.core.UMSessionManagerSession
- */
-public UMSessionManagerSession createUpdateSession() {
-
- UMSessionManagerSession umSession = null;
-
- if( _logUpdate != null )
- {
- ILogEntry entrySession = new LogEntry( _logUpdate, UpdateManagerConstants.STRING_SESSION );
-
- _logUpdate.addChildEntry( entrySession );
-
- umSession = new UMSessionManagerSession( entrySession );
-
- umSession.buildTreeFromLog( entrySession );
-
- _alUpdateSessions.add( umSession );
- }
-
- return umSession;
-}
-/**
- * Runs all sessions
- */
-public boolean executePendingSessions(IProgressMonitor progressMonitor) {
-
- // Run each of the failed sessions
- //--------------------------------
- boolean bSuccess = true;
-
- UMSessionManagerSession session = null;
-
- Iterator iter = _alUpdateSessions.iterator();
-
- while (iter.hasNext() == true) {
-
- session = (UMSessionManagerSession) iter.next();
-
- if (session.getStatus().equals(UpdateManagerConstants.STATUS_PENDING) == true) {
- if (session.execute(progressMonitor) == false) {
- bSuccess = false;
- }
- }
- }
-
- return bSuccess;
-}
-/**
- * Runs one session
- */
-public boolean executeSession(UMSessionManagerSession session, IProgressMonitor progressMonitor) {
-
- if (session == null)
- return false;
-
- // Run the session
- //----------------
- return session.execute(progressMonitor);
-}
-/**
- * Runs one session
- */
-public boolean executeSessionUndo(UMSessionManagerSession session, IProgressMonitor progressMonitor) {
-
- if (session == null)
- return false;
-
- // Run the session
- //----------------
- return session.executeUndo(progressMonitor);
-}
-/**
- * Returns an array of sessions that are complete.
- * @return org.eclipse.update.internal.core.UMSessionManagerSession[]
- */
-private UMSessionManagerSession[] getUpdateSessionsCompleted() {
-
- // Obtain the successfully completed sessions
- //-------------------------------------------
- UMSessionManagerSession session = null;
-
- ArrayList alSessionsCompleted = new ArrayList();
-
- Iterator iter = _alUpdateSessions.iterator();
-
- while (iter.hasNext() == true) {
-
- session = (UMSessionManagerSession) iter.next();
-
- if (session.isComplete() == true) {
- alSessionsCompleted.add(session);
- }
- }
-
- Object[] objArray = alSessionsCompleted.toArray();
- UMSessionManagerSession[] sessions = new UMSessionManagerSession[objArray.length];
- System.arraycopy(objArray, 0, sessions, 0, objArray.length);
-
- return sessions;
-}
-/**
- * Removes an existing update session
- *
- */
-private boolean removeUpdateSession(UMSessionManagerSession session) {
-
- if (session != null && _logUpdate != null) {
-
- // Ensure session exists
- //----------------------
- if (_alUpdateSessions.contains(session) == false) {
- return false;
- }
-
- // Remove the log entry
- //---------------------
- if (session.getLogEntry() != null) {
-
- if (_logUpdate.removeChildEntry(session.getLogEntry()) == false) {
- return false;
- }
-
- // Remove the session
- //-------------------
- _alUpdateSessions.remove(session);
- }
- }
-
- return true;
-}
-/**
- * Saves the current state of the update log.
- */
-public void saveUpdateLog() throws LogStoreException {
- _logUpdate.save( _urlUpdate );
-}
-/**
- * Moves all completed sessions in the update log to the history log.
- * This method does not parse the history file. Sessions are written to
- * the end of the history log and removed from the update log tree, and update
- * session tree. The update log is saved.
- */
-public void updateAndSaveLogs() throws LogStoreException {
-
- // Check for history log URL
- // If none, save the update log
- //-----------------------------
- if (_urlHistory == null) {
- saveUpdateLog();
- return;
- }
-
- // Obtain a list of completed update sessions
- //-------------------------------------------
- UMSessionManagerSession[] sessionsCompleted = getUpdateSessionsCompleted();
-
- // If there are none, save the update log
- //---------------------------------------
- if (sessionsCompleted.length <= 0) {
- saveUpdateLog();
- return;
- }
-
- // Attempt to open the output log
- //-------------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(_urlHistory);
-
-
- File file = new File(strFilespec);
-
- boolean bExists = file.exists();
-
- if (bExists == false) {
- try {
- bExists = file.createNewFile();
- }
- catch (IOException ex) {
- return;
- }
- }
-
- // Create a file writer and seek to the end of the file
- //-----------------------------------------------------
- RandomAccessFile fileWriter = null;
-
- if (bExists == true) {
- try {
- fileWriter = new RandomAccessFile(file, "rw");
- long lLength = fileWriter.length();
- fileWriter.seek(lLength);
- }
- catch (IOException ex) {
- fileWriter = null;
- }
- }
-
- // Write out each session log to the history log
- // Remove the session log from the update log
- // Save both logs
- //----------------------------------------------
- StringBuffer strb = new StringBuffer();
-
- if (fileWriter != null) {
-
- ILogEntry logEntry = null;
-
- for (int i = 0; i < sessionsCompleted.length; ++i) {
-
- logEntry = sessionsCompleted[i].getLogEntry();
-
- if (logEntry != null) {
- logEntry.printPersistentEntryString(strb, 0);
- }
- }
- }
-
- // Write the buffer to the end of the history file
- //------------------------------------------------
- if (strb.length() > 0) {
- try {
- fileWriter.write(strb.toString().getBytes());
- fileWriter.close();
- }
- catch (IOException ex) {
-
- }
- }
-
- // Remove the update sessions from the update log
- //-----------------------------------------------
- for (int i = 0; i < sessionsCompleted.length; ++i) {
- removeUpdateSession(sessionsCompleted[i]);
- }
-
- // Save the update log to keep logs in sync
- //-----------------------------------------
- saveUpdateLog();
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerEntry.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerEntry.java
deleted file mode 100644
index 9d616c8..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerEntry.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.internal.boot.update.*;
-/**
- * Abstract class for update manager objects that have an ILogEntry
- */
-public abstract class UMSessionManagerEntry {
- protected ILogEntry _logEntry = null;
- protected ILogEntryProperty _propertyStatus = null;
- protected ILogEntryProperty _propertyAttempts = null;
- protected Object _objData = null;
-/**
- * UpdateManagerEntry constructor comment.
- */
-public UMSessionManagerEntry( ILogEntry logEntry ) {
- _logEntry = logEntry;
-
- // Status
- //-------
- _propertyStatus = _logEntry.getProperty(UpdateManagerConstants.STRING_STATUS);
-
- if (_propertyStatus == null) {
- _propertyStatus = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_STATUS, UpdateManagerConstants.STATUS_PENDING );
- logEntry.addProperty( _propertyStatus );
- }
-
- // Attempts
- //---------
- _propertyAttempts = _logEntry.getProperty(UpdateManagerConstants.STRING_ATTEMPTS);
-
- if (_propertyAttempts == null) {
- _propertyAttempts = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_ATTEMPTS, UpdateManagerConstants.STRING_0 );
- logEntry.addProperty( _propertyAttempts );
- }
-
-}
-/**
- * @param logEntry org.eclipse.update.internal.core.ILogEntry
- */
-public void buildTreeFromLog(ILogEntry logEntry) {
-
- // Attempts
- //---------
- ILogEntryProperty property = _logEntry.getProperty(UpdateManagerConstants.STRING_ATTEMPTS);
-
- if (property != null) {
- _propertyAttempts = property;
- }
-
- // Status
- //-------
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_STATUS);
-
- if (property != null) {
- _propertyStatus = property;
- }
-}
-/**
- *
- * @return java.lang.String
- * @param strPrefix java.lang.String
- * @param ex java.lang.Exception
- */
-public String createMessageString(String strPrefix, Exception ex) {
-
- StringBuffer strb = new StringBuffer(strPrefix);
-
- if (ex != null) {
- if (ex.getLocalizedMessage() != null) {
- strb.append(": " + ex.getLocalizedMessage());
- }
-
- else if (ex.toString() != null && ex.toString().length() > 0) {
- strb.append(": " + ex.toString());
- }
- }
-
- return strb.toString();
-}
-/**
- * Execute any pending or failed updates.
- */
-public abstract boolean execute( IProgressMonitor progressMonitor );
-/**
- * Execute any pending or failed updates.
- */
-public abstract boolean executeUndo( IProgressMonitor progressMonitor );
-/**
- * @return java.lang.Object
- */
-public java.lang.Object getData() {
- return _objData;
-}
-/**
- * Returns the log entry associated with this session object.
- * @return org.eclipse.update.internal.core.ILogEntry
- */
-public ILogEntry getLogEntry() {
- return _logEntry;
-}
-/**
- *
- * @return java.lang.String
- */
-public String getStatus() {
-
- return _propertyStatus.getValue();
-}
-/**
- * @param strb java.lang.StringBuffer
- * @param iIndentation int
- */
-public abstract void getStatusString(StringBuffer strb, int iIndentation);
-/**
- * Increments the value of the number of attempts
- */
-public void incrementAttemptCount() {
-
- int iAttempts = 0;
-
- try {
- iAttempts = new Integer(_propertyAttempts.getValue()).intValue();
- }
- catch (Exception ex) {
- }
-
- _propertyAttempts.setValue( Integer.toString( ++iAttempts ) );
-}
-/**
- * @param strb java.lang.StringBuffer
- * @param iIndentation int
- */
-public void indent(StringBuffer strb, int iIndentation) {
-
- // Line feed
- //----------
- strb.append( "\n" );
-
- // Indentation spaces
- //-------------------
- for( int i=0; i<iIndentation; ++i ){
- strb.append( " " );
- }
-}
-/**
- */
-public void resetAttemptCount() {
- _propertyAttempts.setValue( UpdateManagerConstants.STRING_0 );
-}
-/**
- * Stores IManifestDescriptor
- * @param newData java.lang.Object
- */
-public void setData(java.lang.Object objData) {
- _objData = objData;
-}
-/**
- * Every entry has a status property.
- * @return java.lang.String
- * @param status java.lang.String
- */
-public void setStatus(String strStatus) {
-
- _propertyStatus.setValue( strStatus != null ? strStatus : UpdateManagerConstants.STRING_EMPTY );
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerMessage.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerMessage.java
deleted file mode 100644
index 3a9c9b9..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerMessage.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.internal.boot.update.*;
-import java.util.Date;
-
-/**
- * This class represents a failure message and consists of a timestamp and text.
- *
- */
-
-public class UMSessionManagerMessage {
- protected ILogEntry _logEntry = null;
- protected ILogEntryProperty _propertyTimestamp = null;
- protected ILogEntryProperty _propertyText = null;
-/**
- *
- * @param logEntry org.eclipse.update.internal.core.ILogEntry
- */
-public UMSessionManagerMessage(ILogEntry logEntry) {
-
- _logEntry = logEntry;
-
- // Text
- //-----
- _propertyText = _logEntry.getProperty(UpdateManagerConstants.STRING_TEXT);
-
- if (_propertyText == null) {
- _propertyText = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_TEXT, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyText );
- }
-
- // Timestamp
- //----------
- _propertyTimestamp = _logEntry.getProperty(UpdateManagerConstants.STRING_TIMESTAMP);
-
- if (_propertyTimestamp == null) {
- _propertyTimestamp = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_TIMESTAMP, new Date().toString() );
- logEntry.addProperty( _propertyTimestamp );
- }
-}
-/**
- * @param logEntry org.eclipse.update.internal.core.LogEntry
- */
-public void buildTreeFromLog(ILogEntry logEntry) {
-
- // Text
- //-----
- ILogEntryProperty property = _logEntry.getProperty(UpdateManagerConstants.STRING_TEXT);
-
- if (property != null) {
- _propertyText = property;
- }
-
- // Source
- //-------
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_TIMESTAMP);
-
- if (property != null) {
- _propertyTimestamp = property;
- }
-}
-/**
- * @return java.lang.String
- */
-public String getText() {
-
- return _propertyText.getValue();
-}
-/**
- *
- */
-public void setText( String strID ) {
- _propertyText.setValue( strID != null ? strID : UpdateManagerConstants.STRING_EMPTY );
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerOperation.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerOperation.java
deleted file mode 100644
index f6aadd5..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerOperation.java
+++ /dev/null
@@ -1,1189 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.webdav.http.client.Response;
-import java.util.jar.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.internal.boot.LaunchInfo;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.core.internal.boot.update.*;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * This class represents an operation such as "copy" or "unzip".
- * Attributes are id, status (pending/complete), action,
- * source, target. Children are messages.
- */
-
-public class UMSessionManagerOperation extends UMSessionManagerEntry {
-
- protected ArrayList _alMessages = new ArrayList();
- protected ILogEntryProperty _propertyAction = null;
- protected ILogEntryProperty _propertyID = null;
- protected ILogEntryProperty _propertySource = null;
- protected ILogEntryProperty _propertyTarget = null;
-/**
- * UpdateManagerOperation constructor comment.
- */
-public UMSessionManagerOperation( ILogEntry logEntry ) {
- super( logEntry );
-
- // Action
- //-------
- _propertyAction = _logEntry.getProperty(UpdateManagerConstants.STRING_ACTION);
-
- if (_propertyAction == null) {
- _propertyAction = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_ACTION, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyAction );
- }
-
- // Id
- //---
- _propertyID = _logEntry.getProperty(UpdateManagerConstants.STRING_ID);
-
- if (_propertyID == null) {
- _propertyID = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_ID, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyID );
- }
-
- // Source
- //-------
- _propertySource = _logEntry.getProperty(UpdateManagerConstants.STRING_SOURCE);
-
- if (_propertySource == null) {
- _propertySource = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_SOURCE, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertySource );
- }
-
- // Target
- //-------
- _propertyTarget = _logEntry.getProperty(UpdateManagerConstants.STRING_TARGET);
-
- if (_propertyTarget == null) {
- _propertyTarget = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_TARGET, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyTarget);
- }
-}
-/**
- * @param logEntry org.eclipse.update.internal.core.LogEntry
- */
-public void buildTreeFromLog(ILogEntry logEntry) {
-
- super.buildTreeFromLog( logEntry );
-
- // Action
- //-------
- ILogEntryProperty property = _logEntry.getProperty(UpdateManagerConstants.STRING_ACTION);
-
- if (property != null) {
- _propertyAction = property;
- }
-
-
- // Id
- //---
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_ID);
-
- if (property != null) {
- _propertyID = property;
- }
-
- // Source
- //-------
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_SOURCE);
-
- if (property != null) {
- _propertySource = property;
- }
-
- // Target
- //-------
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_TARGET);
-
- if (property != null) {
- _propertyTarget = property;
- }
-
-
- ILogEntry[] entries = logEntry.getChildEntries();
-
- // Messages
- //---------
- int iIndex = 0;
- UMSessionManagerMessage message = null;
-
- for( int i = 0; i < entries.length; ++i) {
- if (entries[i] != null && entries[i].getName().equals(UpdateManagerConstants.STRING_MESSAGE) == true) {
- message = new UMSessionManagerMessage( entries[i] );
- _alMessages.add( message );
-
- message.buildTreeFromLog( entries[i] );
- }
- }
-}
-/**
- * Copies all data from input stream to output stream.
- * @param inputStream java.io.InputStream
- * @param outputStream java.io.OutputStream
- */
-public String copyStream(InputStream streamInput, OutputStream streamOutput, long lContentLength, String strTaskName, IProgressMonitor progressMonitor, boolean bSubtask) {
-
- String strErrorMessage = null;
-
- // Allocate buffer
- //----------------
- byte[] byteArray = null;
-
- if (streamInput != null && streamOutput != null) {
- byteArray = new byte[64000];
- }
-
- if (byteArray != null) {
-
- // Copy
- //-----
- if (progressMonitor != null) {
- if (bSubtask == false) {
- if (lContentLength > 0 && lContentLength < Integer.MAX_VALUE)
- progressMonitor.beginTask(UpdateManagerStrings.getString("S_Copy") + ": " +strTaskName, (int) lContentLength);
- else
- progressMonitor.beginTask(UpdateManagerStrings.getString("S_Copy") + ": " + strTaskName, IProgressMonitor.UNKNOWN);
- }
- else {
- progressMonitor.subTask(UpdateManagerStrings.getString("S_Copy") + ": " + strTaskName);
- }
- }
-
- int iBytesReceived = 0;
-
- do {
- // Read
- //-----
- try {
- iBytesReceived = streamInput.read(byteArray);
- }
- catch (Exception ex) {
- iBytesReceived = 0;
- strErrorMessage = UpdateManagerStrings.getString("S_Error_reading_from_input_stream") + ": " + ex.getMessage();
- }
-
- // Write
- //------
- if (iBytesReceived > 0) {
- try {
- streamOutput.write(byteArray, 0, iBytesReceived);
-
- if (progressMonitor != null && bSubtask == false)
- progressMonitor.worked(iBytesReceived);
- }
- catch (IOException ex) {
- iBytesReceived = 0;
- strErrorMessage = UpdateManagerStrings.getString("S_Error_writing_to_output_stream") + ": " + ex.getMessage();
- }
- }
- }
- while (iBytesReceived > 0);
-
- if (progressMonitor != null && bSubtask == false) {
- progressMonitor.done();
- }
- }
-
- return strErrorMessage;
-}
-/**
- *
- * @return org.eclipse.update.internal.core.UMSessionManagerMessage
- * @param actionType java.lang.String
- */
-public UMSessionManagerMessage createMessage() {
-
- // Create a new log entry
- //-----------------------
- ILogEntry logEntryChild = new LogEntry( _logEntry, UpdateManagerConstants.STRING_MESSAGE );
- _logEntry.addChildEntry( logEntryChild );
-
- // Create the operation object
- //----------------------------
- UMSessionManagerMessage message = new UMSessionManagerMessage( logEntryChild );
-
- message.buildTreeFromLog( logEntryChild );
-
- _alMessages.add( message );
-
- return message;
-}
-/**
- *
- *
- */
-public boolean doCopy(IProgressMonitor progressMonitor) {
-
- String strErrorMessage = null;
-
- // Input URL
- //----------
- URL urlInput = null;
-
- try {
- urlInput = new URL(getSource());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Source_URL_is_malformed"), ex);
- }
-
- URL urlOutput = null;
-
- // Output URL
- //-----------
- try {
- urlOutput = new URL(getTarget());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Target_URL_is_malformed"), ex);
- }
-
- // Input
- //-------
- InputStream streamInput = null;
-
- long lContentLength = 0;
-
- if (urlInput != null && urlOutput != null) {
-
- // Input stream
- //-------------
- try {
- URLHandler.Response response = (URLHandler.Response)URLHandler.open(urlInput);
- lContentLength = response.getContentLength();
- if( response.getResponseCode() == HttpURLConnection.HTTP_OK )
- streamInput = response.getInputStream();
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_obtain_source_input_stream"), ex);
- }
-
- }
-
- // Output
- //-------
- OutputStream streamOutput = null;
-
- if (streamInput != null) {
-
- // Output connection
- //------------------
- URLConnection urlConnectionOutput = null;
-
- try {
- urlConnectionOutput = urlOutput.openConnection();
- urlConnectionOutput.setDoOutput(true);
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString( UpdateManagerStrings.getString("S_Unable_to_connect"), ex );
- }
-
- // Output stream
- //--------------
- if (urlConnectionOutput != null) {
- try {
- streamOutput = urlConnectionOutput.getOutputStream();
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString( UpdateManagerStrings.getString("S_Unable_to_obtain_target_output_stream"), ex );
- }
- }
-
- // Attempt to create a file output stream
- // This is used when protocol is file: or valoader:
- // thus our local writes are all file I/O currently
- //-------------------------------------------------
- if (streamOutput == null) {
- try
- {
- streamOutput = getFileOutputStream(urlOutput);
- }
- catch( IOException ex){
- strErrorMessage = createMessageString( UpdateManagerStrings.getString("S_Unable_to_create_file"), ex );
- }
- }
- }
-
- if( streamInput != null && streamOutput != null )
- {
- strErrorMessage = copyStream( streamInput, streamOutput, lContentLength, urlInput.toExternalForm(), progressMonitor, false );
- }
-
- // Close input stream
- //-------------------
- if (streamInput != null) {
- try {
- streamInput.close();
- }
- catch (IOException ex) {
- }
- }
-
- // Close output stream
- //--------------------
- if (streamOutput != null) {
- try {
- streamOutput.flush();
- streamOutput.close();
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString( UpdateManagerStrings.getString("S_Error_closing_output_stream"), ex );
- }
- }
-
- // Increment the number of attempts
- //---------------------------------
- incrementAttemptCount();
-
- // Error return
- //-------------
- if (strErrorMessage != null) {
- UMSessionManagerMessage message = createMessage();
- message.setText(strErrorMessage);
- setStatus(UpdateManagerConstants.STATUS_FAILED);
- return false;
- }
-
- // Successful return
- //------------------
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED);
-
- return true;
-}
-/**
- *
- *
- */
-public boolean doUnzip(IProgressMonitor progressMonitor) {
-
- String strErrorMessage = null;
- int rc = UpdateManagerConstants.UNDEFINED_CONTENTS;
-
- // Input URL
- //----------
- URL urlInput = null;
- try {
- urlInput = new URL(getSource());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Source_URL_is_malformed"), ex);
- }
-
- // Output URL
- //-----------
- URL urlOutput = null;
- try {
- urlOutput = new URL(getTarget());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Target_URL_is_malformed"), ex);
- }
-
- // For unzipping plugins or component/configuration jar,
- // set up the list of directories to look for, also call
- // LaunchInfo.installPending
- //-----------------------------------------------------
- Vector dirNames = new Vector();
- Vector dirNamesInstalled = new Vector();// keep track of plugins/fragments unzipped
- Vector dirNamesUnexpected = new Vector(); // keep track of unexpected plugins/fragments dir
- ArrayList productVIDs = new ArrayList();
- ArrayList componentVIDs = new ArrayList();
- ArrayList pluginVIDs = new ArrayList();
- ArrayList fragmentVIDs = new ArrayList();
-
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS ) {
- IComponentDescriptor comp = null;
- if (getData() instanceof IComponentEntryDescriptor) {
- comp = ((IComponentEntryDescriptor) getData()).getComponentDescriptor();
- } else {
- comp = (IComponentDescriptor) getData();
- }
- if (comp != null) {
- IPluginEntryDescriptor[] plugins = comp.getPluginEntries();
- for (int i=0; i<plugins.length; i++) {
- dirNames.addElement( UMEclipseTree.PLUGINS_DIR + "/" + plugins[i].getDirName());
- pluginVIDs.add(new LaunchInfo.VersionedIdentifier(plugins[i].getUniqueIdentifier(), plugins[i].getVersionStr()));
- }
- IFragmentEntryDescriptor[] fragments = comp.getFragmentEntries();
- for (int i=0; i<fragments.length; i++) {
- dirNames.addElement( UMEclipseTree.FRAGMENTS_DIR + "/" + fragments[i].getDirName());
- fragmentVIDs.add(new LaunchInfo.VersionedIdentifier(plugins[i].getUniqueIdentifier(), plugins[i].getVersionStr()));
- }
- } else {
- strErrorMessage = UpdateManagerStrings.getString("S_Error_in_registry");
- }
- } else if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL) {
- rc = UpdateManagerConstants.INSTALL_XML_MISSING;
- if (getData() instanceof IProductDescriptor) {
- IProductDescriptor desc = (IProductDescriptor) getData();
- dirNames.addElement(UMEclipseTree.INSTALL_DIR + "/" + UMEclipseTree.PRODUCTS_DIR + "/" + desc.getDirName());
- productVIDs.add(new LaunchInfo.VersionedIdentifier(desc.getUniqueIdentifier(), desc.getVersionStr()));
- } else {
- IComponentDescriptor desc = null;
- if (getData() instanceof IComponentEntryDescriptor) {
- desc = ((IComponentEntryDescriptor) getData()).getComponentDescriptor();
- } else {
- desc = (IComponentDescriptor) getData();
- }
- dirNames.addElement(UMEclipseTree.INSTALL_DIR + "/" + UMEclipseTree.COMPONENTS_DIR + "/" + desc.getDirName());
- componentVIDs.add(new LaunchInfo.VersionedIdentifier(desc.getUniqueIdentifier(), desc.getVersionStr()));
- }
- }
- if (!LaunchInfo.getCurrent().installPending(productVIDs, componentVIDs, pluginVIDs, fragmentVIDs)) {
- strErrorMessage = UpdateManagerStrings.getString("S_Error_occurred_during_installation_setup");
- }
-
-
- // Create a file specification from the input URL
- //-----------------------------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(urlInput);
-
- JarFile jarFile = null;
-
- try {
- jarFile = new JarFile(strFilespec);
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_open_Jar_file"), ex);
- }
-
- if ((jarFile != null) && (strErrorMessage == null)) {
-
- JarEntry entry = null;
- InputStream streamInputEntry = null;
-
- int iCount = jarFile.size();
-
- // Set up progress monitor
- // Compute the filename without the path information
- //--------------------------------------------------
- String strFilename = strFilespec;
- int iIndex = strFilespec.lastIndexOf(File.separatorChar);
-
- if (iIndex >= 0 && iIndex < strFilespec.length() - 1) {
- strFilename = strFilespec.substring(iIndex + 1);
- }
-
- if (progressMonitor != null) {
- progressMonitor.beginTask(UpdateManagerStrings.getString("S_Install") + ": " + strFilename, iCount);
- }
-
-
- // Do each jar file entry
- //-----------------------
- Enumeration enum = jarFile.entries();
- while (enum.hasMoreElements() == true) {
- entry = (JarEntry) enum.nextElement();
- String entryName = entry.getName();
-
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS ) {
- // Unzip plugins and fragments. Skip entries not under plugins/ or fragments/ trees
- //-----------------------------------------------------------------------------------
- if ((!entryName.startsWith(UMEclipseTree.PLUGINS_DIR) &&
- !entryName.startsWith(UMEclipseTree.FRAGMENTS_DIR))
- || entryName.endsWith("/")) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- String prefix = entryName;
- int second_slash = entryName.indexOf("/", (entryName.indexOf("/")+1));
- if (second_slash > 0)
- prefix = entryName.substring(0,second_slash);
- int match = dirNames.indexOf(prefix);
- if (match < 0) { // not a valid plugin
- if (!dirNamesUnexpected.contains(prefix))
- dirNamesUnexpected.addElement(prefix);
- continue;
- }
- // got an entry with matching directory
- // keep track of which ones they are
- if (!dirNamesInstalled.contains(prefix))
- dirNamesInstalled.addElement(prefix);
- } else if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL) {
- // Skip over entries that don't start with the right dir naming convention (id_version)
- //-------------------------------------------------------------------------------------
- if (!entryName.startsWith((String)dirNames.firstElement()) || entryName.endsWith("/")) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- // got an entry - as long as we have install.xml we're happy
- if (entryName.equals((String)dirNames.firstElement()+"/"+IManifestAttributes.INSTALL_MANIFEST))
- rc = UpdateManagerConstants.OK;
- } else if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_BINDIR) {
- // Unzip the bin directory, if it exists
- //--------------------------------------
- if (!entryName.startsWith(UMEclipseTree.BIN_DIR) || entryName.endsWith("/")) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- // got bin dir
- rc = UpdateManagerConstants.OK;
- }
- try {
- streamInputEntry = jarFile.getInputStream(entry);
- }
- catch (IOException ex) {
- streamInputEntry = null;
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_open_jar_entry_input_stream"), ex);
- break;
- }
- catch (SecurityException ex) {
- streamInputEntry = null;
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Encountered_jar_entry_security_exception"), ex);
- break;
- }
-
-
- // Create an output URL
- //---------------------
- URL urlOutputFile = null;
-
- if (streamInputEntry != null) {
- try {
- // Ensure file separator between target directory, and source file path
- //---------------------------------------------------------------------
- StringBuffer strbTarget = new StringBuffer(getTarget());
- if (getTarget().endsWith("/") == false) {
- strbTarget.append('/');
- }
- strbTarget.append(entryName);
- urlOutputFile = new URL(strbTarget.toString());
- File fTarget = new File(UMEclipseTree.getFileInPlatformString(urlOutputFile));
- if (fTarget.exists() &&
- (getAction() != UpdateManagerConstants.OPERATION_UNZIP_BINDIR)) {
- // we will not override existing files, except in bin/
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_create_jar_entry_URL"), ex);
- break;
- }
- }
-
-
- // Create a file output stream
- //----------------------------
- OutputStream streamOutputFile = null;
-
- if (urlOutputFile != null) {
- try {
- streamOutputFile = getFileOutputStream(urlOutputFile);
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_create_output_file_for_Jar_entry") + ": " + urlOutputFile.toExternalForm(), ex);
- break;
- }
- }
-
- // Copy from input to output stream
- //---------------------------------
- if (streamInputEntry != null && streamOutputFile != null) {
-
- // Do not alter progress monitor
- //------------------------------
- strErrorMessage = copyStream(streamInputEntry, streamOutputFile, 0, entryName, null, true );
- if (strErrorMessage != null) {
- break;
- }
- }
- try {
- if (streamInputEntry != null) streamInputEntry.close();
- if (streamOutputFile != null) streamOutputFile.close();
- } catch (java.io.IOException ex) {
- // unchecked
- }
- if (progressMonitor != null) progressMonitor.worked(1);
- } // while
-// strErrorMessage = "Error Injected!";
- try {
- jarFile.close();
- } catch (java.io.IOException ex) {
- // unchecked
- }
- } // if jarFile is not null
-
- // tally up what's unzipped and what's not
- //---------------------------------
- if (strErrorMessage == null) {
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS ) {
- if (dirNamesUnexpected.size() > 0) {
- rc = UpdateManagerConstants.UNDEFINED_CONTENTS;
- strErrorMessage = UpdateManagerStrings.getString("S_Undefined_contents_found_in_Jar");
- }
- else if (!dirNamesInstalled.containsAll(dirNames)) {
- rc = UpdateManagerConstants.MISSING_CONTENTS;
- strErrorMessage = UpdateManagerStrings.getString("S_Unable_to_find_defined_contents_in_Jar");
- }
- } else if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL) {
- if (rc != UpdateManagerConstants.OK)
- strErrorMessage = UpdateManagerStrings.getString("S_Unable_to_find_install_manifest_file_in_Jar");
- }
- }
-
- // Call LaunchInfo.installConfirmed if all clean
- // Otherwise, call after we've cleaned up (undo*)
- //-----------------------------------------------
- if (strErrorMessage == null) {
- if (!LaunchInfo.getCurrent().installConfirmed(productVIDs, componentVIDs, pluginVIDs, fragmentVIDs)) {
- strErrorMessage = UpdateManagerStrings.getString("S_Error_occurred_during_installation_completion");
- }
- }
-
- if (progressMonitor != null) progressMonitor.done();
-
- // Increment the number of attempts
- //---------------------------------
- incrementAttemptCount();
-
- // Error return
- //-------------
- if (strErrorMessage != null) {
- UMSessionManagerMessage message = createMessage();
- message.setText(strErrorMessage);
- setStatus(UpdateManagerConstants.STATUS_FAILED);
- return false;
- }
-
- // Successful return
- //------------------
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED);
-
- return true;
-}
-/**
- *
- *
- */
-public boolean doVerify(IProgressMonitor progressMonitor) {
-
- String strErrorMessage = null;
-
- // Input URL
- //----------
- URL urlInput = null;
-
- try {
- urlInput = new URL(getSource());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Source_URL_is_malformed"), ex);
- }
-
- IInstallable installable = (IInstallable) getData();
-
- String strName = installable.getLabel();
- String strId = null;
- String strProviderName = null;
-
- if (installable instanceof IProductDescriptor) {
- strId = ((IProductDescriptor) installable).getUniqueIdentifier();
- strProviderName = ((IProductDescriptor) installable).getProviderName();
- }
- else if (installable instanceof IComponentDescriptor) {
- strId = ((IComponentDescriptor) installable).getUniqueIdentifier();
- strProviderName = ((IComponentDescriptor) installable).getProviderName();
- }
- else if (installable instanceof IComponentEntryDescriptor) {
- strId = ((IComponentEntryDescriptor) installable).getUniqueIdentifier();
- }
- else if (installable instanceof IPluginEntryDescriptor) {
- strId = ((IPluginEntryDescriptor) installable).getUniqueIdentifier();
- }
- else if (installable instanceof IFragmentEntryDescriptor) {
- strId = ((IFragmentEntryDescriptor) installable).getUniqueIdentifier();
- }
-
- JarVerificationService verifier = UpdateManager.getCurrentInstance().getJarVerifier();
-
- JarVerificationResult result = verifier.okToInstall(new File(urlInput.getFile()), strId, strName, strProviderName, progressMonitor);
-
- if (result.getResultCode() == JarVerificationResult.CANCEL_INSTALL) {
- Exception ex = result.getResultException();
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Installation_cancelled_by_user"), ex);
- }
-
- // Increment the number of attempts
- //---------------------------------
- incrementAttemptCount();
-
- // Error return
- //-------------
- if (strErrorMessage != null) {
- UMSessionManagerMessage message = createMessage();
- message.setText(strErrorMessage);
- setStatus(UpdateManagerConstants.STATUS_FAILED);
- return false;
- }
-
- // Successful return
- //------------------
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED);
-
- return true;
-}
-/**
- * Execute copy from source URL to target URL.
- */
-public boolean execute(IProgressMonitor progressMonitor) {
-
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL ||
- getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS ||
- getAction() == UpdateManagerConstants.OPERATION_UNZIP_BINDIR) {
- return doUnzip(progressMonitor);
- }
-
- else if (getAction() == UpdateManagerConstants.OPERATION_COPY) {
- return doCopy(progressMonitor);
- }
- else if (getAction() == UpdateManagerConstants.OPERATION_VERIFY_JAR) {
- return doVerify(progressMonitor);
- }
- return false;
-}
-/**
- * Execute any pending or failed updates.
- */
-public boolean executeUndo(IProgressMonitor progressMonitor) {
-
- // Undo all successful and failed operations
- //------------------------------------------
- if (getStatus().equals(UpdateManagerConstants.STATUS_PENDING) == false) {
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL ||
- getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS) {
- return undoUnzip(progressMonitor);
- }
- else if (getAction() == UpdateManagerConstants.OPERATION_COPY) {
- return undoCopy(progressMonitor);
- }
- else if (getAction() == UpdateManagerConstants.OPERATION_VERIFY_JAR){
- return undoVerify(progressMonitor);
- }
- }
-
- return true;
-}
-/**
- *
- * @return java.lang.String
- */
-public String getAction() {
-
- return _propertyAction.getValue();
-}
-/**
- * Creates a file output stream from the URL.
- * @param url java.net.URL
- */
-private FileOutputStream getFileOutputStream(URL url) throws IOException {
-
- // Convert the URL to a string
- //----------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(url);
-
-
- // Create directory structure
- //---------------------------
- int iIndex = strFilespec.lastIndexOf(File.separator);
- if (iIndex >= 0) {
- String strPath = strFilespec.substring(0, iIndex+1);
-
- File fileDirectory = new File(strPath);
- if (fileDirectory.exists() == false) {
- fileDirectory.mkdirs();
- }
- }
-
- // Open / create the file
- //-----------------------
- File file = new File(strFilespec);
- boolean bExists = file.exists();
-
- if (bExists == false) {
- bExists = file.createNewFile();
- }
-
- // Create the output stream
- //-------------------------
- return new FileOutputStream(file);
-}
-/**
- * @return java.lang.String
- */
-public String getId() {
-
- return _propertyID.getValue();
-}
-/**
- *
- * @return java.lang.String
- */
-public String getSource() {
-
- return _propertySource.getValue();
-}
-/**
- * @param strb java.lang.StringBuffer
- * @param iIndentation int
- */
-public void getStatusString(java.lang.StringBuffer strb, int iIndentation) {
-
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true) {
- return;
- }
- else if (getStatus().equals(UpdateManagerConstants.STATUS_PENDING) == true) {
- return;
- }
-
- else {
- if (getAction().equals(UpdateManagerConstants.OPERATION_COPY) == true) {
- indent(strb, iIndentation);
- strb.append(UpdateManagerStrings.getString("S_Copy") + ": " + getSource());
- }
- else if (getAction().equals(UpdateManagerConstants.OPERATION_UNZIP_INSTALL) ||
- getAction().equals(UpdateManagerConstants.OPERATION_UNZIP_PLUGINS) == true) {
- indent(strb, iIndentation);
- strb.append(UpdateManagerStrings.getString("S_Install") + ": " + getSource());
- }
-
- // Obtain messages
- //----------------
- for (int i = 0; i < _alMessages.size(); ++i) {
- indent(strb, iIndentation + 2);
- strb.append(((UMSessionManagerMessage) _alMessages.get(i)).getText());
- }
- }
-}
-/**
- *
- * @return java.lang.String
- */
-public String getTarget() {
-
- return _propertyTarget.getValue();
-}
-/**
- *
- * @param actionType java.lang.String
- */
-public void setAction(String strAction) {
- _propertyAction.setValue( strAction != null ? strAction : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- */
-public void setId( String strID ) {
- _propertyID.setValue( strID != null ? strID : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- */
-public void setSource( String strSource ) {
- _propertySource.setValue( strSource != null ? strSource : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- */
-public void setTarget( String strTarget ) {
- _propertyTarget.setValue( strTarget != null ? strTarget : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- *
- */
-public boolean undoCopy(IProgressMonitor progressMonitor) {
-
- String strErrorMessage = null;
-
- // Output URL
- //-----------
- URL urlOutput = null;
-
- try {
- urlOutput = new URL(getTarget());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Target_URL_is_malformed"), ex);
- }
-
- if (urlOutput != null) {
-
- // Convert the URL to a string
- //----------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(urlOutput);
-
- // Delete the file
- //----------------
- File file = new File(strFilespec);
- if (file.exists() == true) {
- if (file.delete() == false) {
- strErrorMessage = UpdateManagerStrings.getString("S_Unable_to_delete_file") + ": " + strFilespec;
- }
- }
- }
-
- // Reset the number of attempts
- //-----------------------------
- resetAttemptCount();
-
- // Error return
- //-------------
- if (strErrorMessage != null) {
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true)
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED_UNDO_FAILED);
- else
- setStatus(UpdateManagerConstants.STATUS_FAILED_UNDO_FAILED);
-
- return false;
- }
-
- // Successful return
- //------------------
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true)
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED_UNDO_SUCCEEDED);
- else
- setStatus(UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED);
-
- return true;
-}
-/**
- *
- *
- */
-public boolean undoUnzip(IProgressMonitor progressMonitor) {
-
- String strErrorMessage = null;
-
- // Input URL
- //----------
- URL urlInput = null;
- try {
- urlInput = new URL(getSource());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Source_URL_is_malformed"), ex);
- }
-
- // Output URL
- //-----------
- URL urlOutput = null;
- try {
- urlOutput = new URL(getTarget());
- }
- catch (MalformedURLException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Target_URL_is_malformed"), ex);
- }
-
- // For plugins or component/configuration jar,
- // set up the list of directories to look for
- // This section contains subtle differences from doUnzip()
- //--------------------------------------------------------
- Vector dirNames = new Vector();
- ArrayList productVIDs = new ArrayList();
- ArrayList componentVIDs = new ArrayList();
- ArrayList pluginVIDs = new ArrayList();
- ArrayList fragmentVIDs = new ArrayList();
- if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_PLUGINS ) {
- IComponentDescriptor comp = null;
- if (getData() instanceof IComponentEntryDescriptor) {
- comp = ((IComponentEntryDescriptor) getData()).getComponentDescriptor();
- } else {
- comp = (IComponentDescriptor) getData();
- }
- if (comp != null) {
- IPluginEntryDescriptor[] plugins = comp.getPluginEntries();
- for (int i=0; i<plugins.length; i++) {
- dirNames.addElement( UMEclipseTree.PLUGINS_DIR + "/" + plugins[i].getDirName());
- pluginVIDs.add(new LaunchInfo.VersionedIdentifier(plugins[i].getUniqueIdentifier(), plugins[i].getVersionStr()));
- }
- IFragmentEntryDescriptor[] fragments = comp.getFragmentEntries();
- for (int i=0; i<fragments.length; i++) {
- dirNames.addElement( UMEclipseTree.FRAGMENTS_DIR + "/" + fragments[i].getDirName());
- fragmentVIDs.add(new LaunchInfo.VersionedIdentifier(plugins[i].getUniqueIdentifier(), plugins[i].getVersionStr()));
- }
- } else {
- strErrorMessage = UpdateManagerStrings.getString("S_Error_in_registry");
- }
- } else if (getAction() == UpdateManagerConstants.OPERATION_UNZIP_INSTALL) {
- // rc = UpdateManagerConstants.INSTALL_XML_MISSING;
- if (getData() instanceof IProductDescriptor) {
- IProductDescriptor desc = (IProductDescriptor) getData();
- dirNames.addElement(UMEclipseTree.INSTALL_DIR + "/" + UMEclipseTree.PRODUCTS_DIR + "/" + desc.getDirName() + "/");
- productVIDs.add(new LaunchInfo.VersionedIdentifier(desc.getUniqueIdentifier(), desc.getVersionStr()));
- } else {
- IComponentDescriptor desc = (IComponentDescriptor) getData();
- dirNames.addElement(UMEclipseTree.INSTALL_DIR + "/" + UMEclipseTree.COMPONENTS_DIR + "/" + desc.getDirName() + "/");
- componentVIDs.add(new LaunchInfo.VersionedIdentifier(desc.getUniqueIdentifier(), desc.getVersionStr()));
- }
- }
-
-
- // Create a file specification from the input URL
- //-----------------------------------------------
- String strFilespec = UMEclipseTree.getFileInPlatformString(urlInput);
-
- JarFile jarFile = null;
-
- try {
- jarFile = new JarFile(strFilespec);
- }
- catch (IOException ex) {
- strErrorMessage = createMessageString(UpdateManagerStrings.getString("S_Unable_to_open_Jar_file"), ex);
- }
-
- if (jarFile != null) {
-
- JarEntry entry = null;
-
- int iCount = jarFile.size();
-
- // Set up progress monitor
- // Compute the filename without the path information
- //--------------------------------------------------
- String strFilename = strFilespec;
- int iIndex = strFilespec.lastIndexOf(File.separatorChar);
-
- if (iIndex >= 0 && iIndex < strFilespec.length() - 1) {
- strFilename = strFilespec.substring(iIndex + 1);
- }
-
- if (progressMonitor != null) progressMonitor.beginTask(UpdateManagerStrings.getString("S_Undo") + ": " + strFilename, iCount);
-
- // Do each jar file entry
- //-----------------------
- Enumeration enum = jarFile.entries();
-
- while (enum.hasMoreElements() == true) {
- entry = (JarEntry) enum.nextElement();
- String entryName = entry.getName();
-
- if (getAction().equals(UpdateManagerConstants.OPERATION_UNZIP_PLUGINS)) {
- // Remove the plugins and fragments. Skip entries not under plugins/ or fragments/ trees
- //----------------------------------------------------------------------------------------
- if ((!entryName.startsWith(UMEclipseTree.PLUGINS_DIR)) &&
- (!entryName.startsWith(UMEclipseTree.FRAGMENTS_DIR))) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- if ((entryName.equals(UMEclipseTree.PLUGINS_DIR + "/")) ||
- (entryName.equals(UMEclipseTree.FRAGMENTS_DIR + "/"))) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- // Don't bother cleaning up the entries not matching the expected list
- // They weren't unzipped in the first place
- //--------------------------------------------------------------------
- String prefix = entryName;
- int second_slash = entryName.indexOf("/", (entryName.indexOf("/")+1));
- if (second_slash > 0)
- prefix = entryName.substring(0,second_slash);
- int match = dirNames.indexOf(prefix);
- if (match < 0) { // not a valid plugin
- continue;
- }
- } else if (getAction().equals(UpdateManagerConstants.OPERATION_UNZIP_INSTALL)) {
- // Remove the component/product items. Skip over entries that don't match the dirname
- //------------------------------------------------------------------------------------
- if (!entryName.startsWith((String)dirNames.firstElement())) {
- if (progressMonitor != null) progressMonitor.worked(1);
- continue;
- }
- } else if (getAction().equals(UpdateManagerConstants.OPERATION_UNZIP_BINDIR)) {
- // No-op. The bin directory contents cannot be undone
- //-----------------------------------------------------
- break;
- }
-
- if (urlOutput != null) {
- // Build pathname to actual install location
- //------------------------------------------
- strFilespec = urlOutput.getFile() + "/" + entryName;
- strFilespec = strFilespec.replace('/',File.separatorChar);
- int k = strFilespec.indexOf(UMEclipseTree.DEVICE_SEPARATOR);
- if (k != -1 && strFilespec.startsWith(File.separator)) {
- strFilespec = strFilespec.substring(1);
- }
-
- // Delete the file or directory
- //-----------------------------
- File file = new File(strFilespec);
- if (file.exists() == true) {
- if (file.isDirectory())
- UpdateManager.cleanupDirectory(file);
- if (file.delete() == false) {
- strErrorMessage = UpdateManagerStrings.getString("S_Unable_to_delete_file") + ": " + strFilespec;
- }
- }
- }
- if (progressMonitor != null) progressMonitor.worked(1);
- } // while
-
- try {
- jarFile.close();
- } catch (java.io.IOException ex) {
- // unchecked
- }
- } // if jarFile is not null
-
- // Call LaunchInfo.installConfirmed if all clean
- //-----------------------------------------------
- if (strErrorMessage == null) {
- if (!LaunchInfo.getCurrent().installConfirmed(productVIDs, componentVIDs, pluginVIDs, fragmentVIDs)) {
- strErrorMessage = UpdateManagerStrings.getString("S_Error_occurred_during_installation_completion");
- }
- }
-
- if (progressMonitor != null) progressMonitor.done();
-
- // Reset the number of attempts
- //-----------------------------
- resetAttemptCount();
-
- // Error return
- //-------------
- if (strErrorMessage != null) {
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true)
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED_UNDO_FAILED);
- else
- setStatus(UpdateManagerConstants.STATUS_FAILED_UNDO_FAILED);
-
- return false;
- }
-
- // Successful return
- //------------------
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true)
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED_UNDO_SUCCEEDED);
- else
- setStatus(UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED);
-
- return true;
-}
-/**
- *
- *
- */
-public boolean undoVerify(IProgressMonitor progressMonitor) {
-
- resetAttemptCount();
-
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true)
- setStatus(UpdateManagerConstants.STATUS_SUCCEEDED_UNDO_SUCCEEDED);
- else
- setStatus(UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED);
-
- return true;
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerParcel.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerParcel.java
deleted file mode 100644
index b0c7d97..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerParcel.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.internal.boot.update.*;
-import java.util.*;
-
-/**
- * This class represents either a component or a product. A parcel can
- * have sub parcels, and copy objects. Attributes are action (add, fix), id, status (pending, complete),
- * type (component / product).
- */
-
-public class UMSessionManagerParcel extends UMSessionManagerEntry {
-
- protected ArrayList _alParcels = new ArrayList();
- protected ArrayList _alOperations = new ArrayList();
-
- protected ILogEntryProperty _propertyAction = null;
- protected ILogEntryProperty _propertyID = null;
- protected ILogEntryProperty _propertyType = null;
-/**
- * UpdateManagerParcel constructor comment.
- */
-public UMSessionManagerParcel( ILogEntry logEntry ) {
- super( logEntry );
-
- // Action
- //-------
- _propertyAction = _logEntry.getProperty(UpdateManagerConstants.STRING_ACTION);
-
- if (_propertyAction == null) {
- _propertyAction = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_ACTION, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyAction );
- }
-
- // Id
- //---
- _propertyID = _logEntry.getProperty(UpdateManagerConstants.STRING_ID);
-
- if (_propertyID == null) {
- _propertyID = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_ID, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyID );
- }
-
- // Type
- //-----
- _propertyType = _logEntry.getProperty(UpdateManagerConstants.STRING_TYPE);
-
- if (_propertyType == null) {
- _propertyType = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_TYPE, UpdateManagerConstants.STRING_EMPTY );
- logEntry.addProperty( _propertyType );
- }
-}
-/**
- * @param logEntry org.eclipse.update.internal.core.LogEntry
- */
-public void buildTreeFromLog(ILogEntry logEntry) {
-
- super.buildTreeFromLog( logEntry );
-
- // Action
- //-------
- ILogEntryProperty property = _logEntry.getProperty(UpdateManagerConstants.STRING_ACTION);
-
- if (property != null) {
- _propertyAction = property;
- }
-
- // Id
- //---
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_ID);
-
- if (property != null) {
- _propertyID = property;
- }
-
- // Type
- //-----
- property = _logEntry.getProperty(UpdateManagerConstants.STRING_TYPE);
-
- if (property != null) {
- _propertyType = property;
- }
-
- ILogEntry[] entries = logEntry.getChildEntries();
-
- // Parcels
- //--------
- int iIndex = 0;
- UMSessionManagerParcel parcel = null;
-
- for( int i = 0; i < entries.length; ++i) {
- if (entries[i] != null && entries[i].getName().equals(UpdateManagerConstants.STRING_PARCEL) == true) {
- parcel = new UMSessionManagerParcel( entries[i] );
- _alParcels.add( parcel );
-
- parcel.buildTreeFromLog( entries[i] );
- }
- }
-
- // Operations
- //-----------
- iIndex = 0;
- UMSessionManagerOperation operation = null;
-
- for( int i = 0; i < entries.length; ++i) {
- if (entries[i] != null && entries[i].getName().equals(UpdateManagerConstants.STRING_OPERATION) == true) {
- operation = new UMSessionManagerOperation( entries[i] );
- _alOperations.add( operation );
-
- operation.buildTreeFromLog( entries[i] );
- }
- }
-}
-/**
- * @return org.eclipse.update.internal.core.UMSessionManagerOperation
- * @param actionType java.lang.String
- */
-public UMSessionManagerOperation createOperation() {
-
- // Create a new log entry
- //-----------------------
- ILogEntry logEntryChild = new LogEntry( _logEntry, UpdateManagerConstants.STRING_OPERATION );
- _logEntry.addChildEntry( logEntryChild );
-
- // Create the operation object
- //----------------------------
- UMSessionManagerOperation operation = new UMSessionManagerOperation( logEntryChild );
- _alOperations.add( operation );
-
- return operation;
-}
-/**
- * Creates a sub-parcel
- * @return org.eclipse.update.internal.core.UpdateManagerParcel
- * @param actionType java.lang.String
- */
-public UMSessionManagerParcel createParcel() {
-
- // Create a new log entry
- //-----------------------
- ILogEntry logEntryChild = new LogEntry( _logEntry, UpdateManagerConstants.STRING_PARCEL );
- _logEntry.addChildEntry( logEntryChild );
-
- // Create the parcel object
- //-------------------------
- UMSessionManagerParcel parcel = new UMSessionManagerParcel( logEntryChild );
- _alParcels.add( parcel );
-
- return parcel;
-}
-/**
- * Execute any pending or failed updates.
- */
-public boolean execute(IProgressMonitor progressMonitor) {
-
- // Stop if any failure occurs
- //---------------------------
- boolean bSuccess = true;
-
- // Parcels may be sequential, do in forward order
- //-----------------------------------------------
- for (int i = 0; i < _alParcels.size(); ++i) {
-
- if (((UMSessionManagerParcel) _alParcels.get(i)).execute(progressMonitor) == false) {
- bSuccess = false;
- break;
- }
- }
-
- // Operations may be sequential, do in forward order
- //--------------------------------------------------
- if (bSuccess == true) {
- for (int i = 0; i < _alOperations.size(); ++i) {
-
- if (((UMSessionManagerOperation) _alOperations.get(i)).execute(progressMonitor) == false) {
- bSuccess = false;
- break;
- }
- }
- }
-
- // Status
- //-------
- setStatus(bSuccess == true ? UpdateManagerConstants.STATUS_SUCCEEDED : UpdateManagerConstants.STATUS_FAILED);
-
- incrementAttemptCount();
-
- return bSuccess;
-}
-/**
- * Execute any pending or failed updates.
- */
-public boolean executeUndo(org.eclipse.core.runtime.IProgressMonitor progressMonitor) {
-
- // Undo only failed attempts
- //--------------------------
- if (getStatus().equals(UpdateManagerConstants.STATUS_FAILED) == false) {
- return true;
- }
-
- // Attempt all even if failure occurs
- //-----------------------------------
- boolean bSuccess = true;
-
- // Parcels may be sequential, undo in reverse order
- //-------------------------------------------------
- for (int i = _alParcels.size() - 1; i >= 0; --i) {
-
- if (((UMSessionManagerParcel) _alParcels.get(i)).executeUndo(progressMonitor) == false) {
- bSuccess = false;
- }
- }
-
- // Operations may be sequential, undo in reverse order
- //----------------------------------------------------
- for (int i = _alOperations.size() - 1; i >= 0; --i) {
-
- if (((UMSessionManagerOperation) _alOperations.get(i)).executeUndo(progressMonitor) == false) {
- bSuccess = false;
- }
- }
-
- // Status
- //-------
- setStatus(bSuccess == true ? UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED : UpdateManagerConstants.STATUS_FAILED_UNDO_FAILED);
-
- resetAttemptCount();
-
- return bSuccess;
-}
-/**
- * @return java.lang.String
- */
-public String getAction() {
-
- return _propertyAction.getValue();
-}
-/**
- * @return java.lang.String
- */
-public String getId() {
-
- return _propertyID.getValue();
-}
-/**
- * Returns all operations
- * @return org.eclipse.update.internal.core.UMSessionManagerOperation[]
- */
-public UMSessionManagerOperation[] getOperations() {
-
- UMSessionManagerOperation[] operations = new UMSessionManagerOperation[_alOperations.size()];
- return (UMSessionManagerOperation[])_alOperations.toArray( operations );
-}
-/**
- * Returns all sub-parcels
- * @return org.eclipse.update.internal.core.UpdateManagerParcel[]
- */
-public UMSessionManagerParcel[] getParcels() {
-
- UMSessionManagerParcel[] parcels = new UMSessionManagerParcel[_alParcels.size()];
- return (UMSessionManagerParcel[])_alParcels.toArray( parcels );
-}
-/**
- * @param strb java.lang.StringBuffer
- * @param iIndentation int
- */
-public void getStatusString(java.lang.StringBuffer strb, int iIndentation) {
-
- if (getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true) {
- return;
- }
-
- else {
- // Parcel label
- //-------------
- IInstallable descriptor = (IInstallable) getData();
-
- indent(strb, iIndentation);
- strb.append( descriptor.getLabel());
-
-
- // Parcels may be sequential, do in forward order
- //-----------------------------------------------
- for (int i = 0; i < _alParcels.size(); ++i) {
-
- ((UMSessionManagerParcel) _alParcels.get(i)).getStatusString(strb, iIndentation + 2);
- }
-
- // Operations may be sequential, do in forward order
- //--------------------------------------------------
- for (int i = 0; i < _alOperations.size(); ++i) {
-
- ((UMSessionManagerOperation) _alOperations.get(i)).getStatusString(strb, iIndentation + 2);
- }
- }
-}
-/**
- * @return java.lang.String
- */
-public String getType() {
-
- return _propertyType.getValue();
-}
-/**
- *
- */
-public void setAction( String strAction ) {
- _propertyAction.setValue( strAction != null ? strAction : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- */
-public void setId( String strID ) {
- _propertyID.setValue( strID != null ? strID : UpdateManagerConstants.STRING_EMPTY );
-}
-/**
- *
- */
-public void setType( String strType ) {
- _propertyType.setValue( strType != null ? strType : UpdateManagerConstants.STRING_EMPTY );
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerSession.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerSession.java
deleted file mode 100644
index 369855a..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UMSessionManagerSession.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.internal.boot.update.*;
-import java.util.Date;
-import java.util.*;
-
-/**
- * This class represents a session in which update manager operations are
- * executed. This class contains parcel objects and has status and timestamp
- * as its attributes. The timestamp attribute is automatically set when the session
- * is created for the first time.
- */
-
-public class UMSessionManagerSession extends UMSessionManagerEntry {
- protected ArrayList _alParcels = new ArrayList();
- protected ILogEntryProperty _propertyTimestamp = null;
-/**
- * UpdateManagerSession constructor comment.
- */
-public UMSessionManagerSession(ILogEntry logEntry) {
- super( logEntry );
-
- // Timestamp
- //----------
- _propertyTimestamp = _logEntry.getProperty(UpdateManagerConstants.STRING_TIMESTAMP);
-
- if (_propertyTimestamp == null) {
- _propertyTimestamp = new LogEntryProperty(logEntry, UpdateManagerConstants.STRING_TIMESTAMP, new Date().toString() );
- logEntry.addProperty( _propertyTimestamp );
- }
-}
-/**
- * @param logEntry org.eclipse.update.internal.core.LogEntry
- */
-public void buildTreeFromLog(ILogEntry logEntry) {
-
- super.buildTreeFromLog( logEntry );
-
- // Timestamp
- //----------
- ILogEntryProperty property = _logEntry.getProperty(UpdateManagerConstants.STRING_TIMESTAMP);
-
- if (property != null) {
- _propertyTimestamp = property;
- }
-
-
- ILogEntry[] entries = logEntry.getChildEntries();
-
- // Parcels
- //--------
- int iIndex = 0;
- UMSessionManagerParcel parcel = null;
-
- for( int i = 0; i < entries.length; ++i) {
- if (entries[i] != null && entries[i].getName().equals(UpdateManagerConstants.STRING_PARCEL) == true) {
- parcel = new UMSessionManagerParcel( entries[i] );
- _alParcels.add( parcel );
-
- parcel.buildTreeFromLog( entries[i] );
- }
- }
-}
-/**
- *
- * @return org.eclipse.update.internal.core.UMTaskManagerParcel
- * @param actionType java.lang.String
- */
-public UMSessionManagerParcel createParcel() {
-
- // Create a new log entry
- //-----------------------
- ILogEntry logEntryChild = new LogEntry( _logEntry, UpdateManagerConstants.STRING_PARCEL );
- _logEntry.addChildEntry( logEntryChild );
-
- // Create the copy object
- //-----------------------
- UMSessionManagerParcel parcel = new UMSessionManagerParcel( logEntryChild );
- _alParcels.add( parcel );
-
- return parcel;
-}
-/**
- * Execute any pending or failed updates.
- */
-public boolean execute(IProgressMonitor progressMonitor) {
-
- // Attempt all even if failure occurs
- //-----------------------------------
- boolean bSuccess = true;
-
- // Parcels may be sequential, do in forward order
- //-----------------------------------------------
- for (int i = 0; i < _alParcels.size(); ++i) {
-
- if (((UMSessionManagerParcel) _alParcels.get(i)).execute(progressMonitor) == false) {
- bSuccess = false;
- }
- }
-
- // Status
- //-------
- setStatus(bSuccess == true ? UpdateManagerConstants.STATUS_SUCCEEDED : UpdateManagerConstants.STATUS_FAILED);
-
- incrementAttemptCount();
-
- return bSuccess;
-}
-/**
- * Execute any pending or failed updates.
- */
-public boolean executeUndo(org.eclipse.core.runtime.IProgressMonitor progressMonitor) {
-
- // Undo only failed attempts
- //--------------------------
- if (getStatus().equals(UpdateManagerConstants.STATUS_FAILED) == false) {
- return true;
- }
-
- // Attempt all even if failure occurs
- //-----------------------------------
- boolean bSuccess = true;
-
- // Parcels may be sequential, undo in reverse order
- //-------------------------------------------------
- for (int i = _alParcels.size() - 1; i >= 0; --i) {
-
- if (((UMSessionManagerParcel) _alParcels.get(i)).executeUndo(progressMonitor) == false) {
- bSuccess = false;
- }
- }
-
- // Status
- //-------
- setStatus(bSuccess == true ? UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED : UpdateManagerConstants.STATUS_FAILED_UNDO_FAILED);
-
- resetAttemptCount();
-
- return bSuccess;
-}
-/**
- * Returns all parcels
- * @return org.eclipse.update.internal.core.UMSessionManagerParcel[]
- */
-public UMSessionManagerParcel[] getParcels() {
-
- UMSessionManagerParcel[] parcels = new UMSessionManagerParcel[_alParcels.size()];
- return (UMSessionManagerParcel[])_alParcels.toArray( parcels );
-}
-/**
- * @return java.lang.String
- */
-public String getStatusString() {
-
- StringBuffer strb = new StringBuffer();
-
- getStatusString( strb, 0 );
-
- return strb.toString();
-}
-/**
- * @param strb java.lang.StringBuffer
- * @param iIndentation int
- */
-public void getStatusString(java.lang.StringBuffer strb, int iIndentation) {
-
- String strStatus = getStatus();
-
- if (strStatus.equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true) {
- strb.append(UpdateManagerStrings.getString("S_Installations_have_completed_successfully"));
- strb.append("\n");
- strb.append(UpdateManagerStrings.getString("S_You_must_restart_the_workbench_to_activate_any_changes"));
- }
-
- else {
- strb.append(UpdateManagerStrings.getString("S_An_installation_error_or_cancellation_has_occurred"));
-
- // Parcels may be sequential, do in forward order
- //-----------------------------------------------
- for (int i = 0; i < _alParcels.size(); ++i) {
-
- ((UMSessionManagerParcel) _alParcels.get(i)).getStatusString(strb, 2);
- }
- }
-}
-/**
- * @return java.lang.String
- */
-public String getTimestamp() {
-
- return _propertyTimestamp.getValue();
-}
-/**
- * Returns whether this session is complete
- * @return boolean
- */
-public boolean isComplete() {
-
- return _propertyStatus.getValue().equals(UpdateManagerConstants.STATUS_SUCCEEDED) ||
- _propertyStatus.getValue().equals(UpdateManagerConstants.STATUS_FAILED_UNDO_SUCCEEDED);
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/URLHandler.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/URLHandler.java
deleted file mode 100644
index 50eed69..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/URLHandler.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.internal.boot.update.*;
-import org.eclipse.webdav.http.client.*;
-import org.eclipse.webdav.client.WebDAVFactory;
-import org.eclipse.webdav.Context;
-import java.io.*;
-import java.net.*;
-
-public class URLHandler extends BaseURLHandler {
-
- private static HttpClient http = null;
- private static WebDAVFactory factory = null;
-
- private static final String HTTP = "http";
-
- static class Response extends BaseURLHandler.Response {
- private org.eclipse.webdav.http.client.Response r = null;
- private Response(org.eclipse.webdav.http.client.Response r) {
- this.r = r;
- }
- public InputStream getInputStream() throws IOException {
- return r.getInputStream();
- }
- public long getContentLength() {
- return r.getContentLength();
- }
- public int getResponseCode() {
- return r.getStatusCode();
- }
- public String getResponseMessage() {
- return r.getStatusMessage();
- }
- }
-
-private URLHandler() {}
-public static BaseURLHandler.Response open(URL url) throws IOException {
-
- if (url==null) return null;
-
- if (!url.getProtocol().equals(HTTP)) {
- URLConnection c = url.openConnection();
- Context ctx = factory.newContext();
- int i = 1;
- String name = null;
- while ((name = c.getHeaderFieldKey(i)) != null) {
- ctx.put(name.toLowerCase(), c.getHeaderField(i));
- i++;
- }
- InputStream is = c.getInputStream();
- return new Response(new org.eclipse.webdav.http.client.Response(UNKNOWN_STATUS,UNKNOWN_MSG,ctx,is));
- }
- else {
- if (http==null) throw new IllegalStateException(UpdateManagerStrings.getString("S_HTTP_client_not_set"));
- Request request = new Request("GET", url, null);
- return new Response(http.invoke(request));
- }
-}
-protected BaseURLHandler.Response openURL(URL url) throws IOException {
- return URLHandler.open(url);
-}
-public static void setHttpClient(HttpClient c) {
-
- if (http==null) {
- http = c;
- factory = new WebDAVFactory();
-
- // setup this handler as the handler for boot portion of update manager
- BaseURLHandler.setURLHandler(new URLHandler());
- }
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManager.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManager.java
deleted file mode 100644
index e456884..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManager.java
+++ /dev/null
@@ -1,640 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.TreeSet;
-
-import org.eclipse.core.internal.boot.LaunchInfo;
-import org.eclipse.core.internal.boot.LaunchInfo.VersionedIdentifier;
-import org.eclipse.core.internal.boot.update.IComponentDescriptor;
-import org.eclipse.core.internal.boot.update.IComponentEntryDescriptor;
-import org.eclipse.core.internal.boot.update.IFragmentEntryDescriptor;
-import org.eclipse.core.internal.boot.update.IInstallable;
-import org.eclipse.core.internal.boot.update.IPluginEntryDescriptor;
-import org.eclipse.core.internal.boot.update.IProductDescriptor;
-import org.eclipse.core.internal.boot.update.IUMRegistry;
-import org.eclipse.core.internal.boot.update.IURLNamePair;
-import org.eclipse.core.internal.boot.update.LogStoreException;
-import org.eclipse.core.internal.boot.update.UMEclipseTree;
-import org.eclipse.core.internal.boot.update.UMRegistryManager;
-import org.eclipse.core.internal.boot.update.UpdateManagerConstants;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.update.internal.ui.JarVerificationService;
-
-/**
- * Update Manager updates a workstation in one of three modes:
- * <ol>
- * <li>local</li>
- * <li>remote</li>
- * <li>remote cached</li>
- * </ol>
- * Usage:
- * <ol>
- * <li>Create an instance of this class</li>
- * <li>Set persistent properties as required</li>
- * <ul>
- * <li>mode</li>
- * <li>update log URL</li>
- * <li>history log URL</li>
- * </ul>
- * <li>Call the initialize function</li>
- * <li>Call the update function</li>
- * </ol>
- * Persistent properties are loaded before any are changed, and saved after any
- * are changed.
- */
-
-public class UpdateManager {
-
- // Package name for this class
- // Used by UpdateManagerStrings to obtain its resource bundle properties file
- //---------------------------------------------------------------------------
- public static final String _strPackageName = "org.eclipse.update.internal.core";
- public static UpdateManager _updateManagerInstance = null;
-
- // Persistent properties
- //----------------------
- protected int _iMode = UpdateManagerConstants.MODE_LOCAL;
- protected String _strUpdateLogURL = null;
- protected String _strHistoryLogURL = null;
-
- // Instance state data
- //--------------------
- protected UMRegistryManager _registryManager = null;
- protected UMSessionManager _sessionManager = null;
- protected Shell _shell = null;
-
- protected JarVerificationService _jarVerifier = null;
-/**
- * Constructs an instance of this class, then initializes by loading its persistent properties
- */
-public UpdateManager() {
-}
-/**
- * Constructs an instance of this class, then initializes by loading its persistent properties
- */
-public UpdateManager( Shell shell ) {
- _updateManagerInstance = this;
- _shell = shell;
-}
-/**
- * Deletes all files in the staging area.
- */
-public void cleanup() {
- String strStagingDirectory = UMEclipseTree.getFileInPlatformString(UMEclipseTree.getStagingArea());
-
- File fileStagingDirectory = new File(strStagingDirectory);
-
- if (fileStagingDirectory.exists() == true) {
- File[] files = fileStagingDirectory.listFiles();
- for (int i = 0; i < files.length; ++i) {
- if (files[i].isDirectory() == true) {
- cleanupDirectory(files[i]);
- }
- boolean bSuccessful = files[i].delete();
-
- }
- }
-}
-/**
- */
-public static void cleanupDirectory(File fileDirectory) {
-
- File[] files = fileDirectory.listFiles();
-
- for (int i = 0; i < files.length; ++i) {
- if (files[i].isDirectory() == true) {
- cleanupDirectory(files[i]);
- }
-
- boolean bSuccessful = files[i].delete();
-// if (!bSuccessful)
-// System.out.println("ooops!" + files[i]);
- }
-}
-/**
- */
-public UMSessionManagerSession createSession(IInstallable[] descriptors, boolean bVerifyJars) throws UpdateManagerException {
-
- // FOR NOW DO NOT DO JAR VERIFICATION
- //-----------------------------------
- bVerifyJars = false;
-
- // Create a new update session
- //----------------------------
- UMSessionManagerSession session = _sessionManager.createUpdateSession();
-
- // Create a definer that can define the operations required
- //---------------------------------------------------------
- ISessionDefiner sessionDefiner = new UMSessionDefinerReferenceUpdate();
-
- // Define a set of operations
- //---------------------------
- sessionDefiner.defineOperations(session, descriptors, bVerifyJars);
-
- // Save the update log
- //--------------------
- try {
- _sessionManager.saveUpdateLog();
- }
- catch (LogStoreException ex) {
- throw new UpdateManagerException(ex.getMessage());
- }
-
- return session;
-}
-/**
- * Updates the local machine by:
- * <ol>
- * <li>defining the operations</li>
- * <li>downloading any new objects</li>
- * <li>applying any downloaded updates</li>
- * <li>displaying a progress monitor</li>
- * </ol>
- */
-public UMSessionManagerSession executeSession( UMSessionManagerSession session, IProgressMonitor progressMonitor ) throws UpdateManagerException {
-
- // Throw any exception when complete
- //----------------------------------
- UpdateManagerException umException = null;
-
- // Execute the session
- //--------------------
- _sessionManager.executeSession( session, progressMonitor );
-
- // Move successful sessions from update log to history log
- //--------------------------------------------------------
- try {
- _sessionManager.updateAndSaveLogs();
- }
- catch (LogStoreException ex) {
- if (umException != null) {
- umException = new UpdateManagerException("S_Unable_to_save_update_logs");
- }
- }
-
- // Throw any exceptions found
- //---------------------------
- if (umException != null) {
- throw umException;
- }
-
- return session;
-}
-/**
- * Updates the local machine by:
- * <ol>
- * <li>defining the operations</li>
- * <li>downloading any new objects</li>
- * <li>applying any downloaded updates</li>
- * <li>displaying a progress monitor</li>
- * </ol>
- */
-public UMSessionManagerSession executeSessionUndo( UMSessionManagerSession session, IProgressMonitor progressMonitor ) throws UpdateManagerException {
-
- // Throw any exception when complete
- //----------------------------------
- UpdateManagerException umException = null;
-
- // Execute the session
- //--------------------
- _sessionManager.executeSessionUndo( session, progressMonitor );
-
- // Move successful sessions from update log to history log
- //--------------------------------------------------------
- try {
- _sessionManager.updateAndSaveLogs();
- }
- catch (LogStoreException ex) {
- if (umException != null) {
- umException = new UpdateManagerException("S Unable to save update logs");
- }
- }
-
- // Throw any exceptions found
- //---------------------------
- if (umException != null) {
- throw umException;
- }
-
- return session;
-}
-/**
- */
-public static UpdateManager getCurrentInstance() {
- return _updateManagerInstance;
-}
-/**
- * Takes a string with an Id + '_' + Version, and returns the Id.
- */
-private String getIdFromInfoString(String strInfo) {
-
- String strId = null;
-
- int iIndex = strInfo.lastIndexOf('_');
-
- if (iIndex >= 0) {
- strId = strInfo.substring(0, iIndex);
- }
-
- else {
- strId = strInfo;
- }
-
- return strId;
-}
-// return the jar verifier
-
-public JarVerificationService getJarVerifier() {
- if (_jarVerifier == null)
- _jarVerifier = new JarVerificationService( _shell );
- return _jarVerifier;
-}
-/**
- * Returns a list of components that require updating by:
- *<ol>
- *<li>Loading all product/component manifests from .install/tree </li>
- *<li>Determining which components require updating by:</li>
- *<ol>
- *<li>Collecting update URLs from each component</li>
- *<li>Collecting update URLs from products that components are a part of</li>
- *</ol>
- *<li>Determining what updates are available by:</li>
- *<ol>
- *<li>Accessing the update URL</li>
- *<li>Determining if the component is a newer version of the existing one</li>
- *</ol>
- *<li>
- *</ol>
- */
-public IURLNamePair[] getLocalDiscoveryURLs() {
-
- IURLNamePair[] urlNPs = null;
-
- // Obtain the local registry
- //--------------------------
- IUMRegistry registry = _registryManager.getLocalRegistry();
-
- // Create a list of all URLs
- //--------------------------
- TreeSet setURLs = new TreeSet( new UpdateManagerURLComparator() );
-
- // Obtain a list of all installed components
- //------------------------------------------
- IComponentDescriptor[] componentDescriptors = registry.getComponentDescriptors();
-
- // Obtain a list of discovery URLs
- //--------------------------------
- for (int i = 0; i < componentDescriptors.length; ++i) {
- urlNPs = componentDescriptors[i].getDiscoveryURLs();
-
- for (int j = 0; j < urlNPs.length; ++j) {
- setURLs.add(urlNPs[j]);
- }
- }
-
- // Obtain a list of all installed products
- //----------------------------------------
- IProductDescriptor[] productDescriptors = registry.getProductDescriptors();
-
- // Obtain a list of discovery URLs
- //--------------------------------
- for (int i = 0; i < productDescriptors.length; ++i) {
- urlNPs = productDescriptors[i].getDiscoveryURLs();
-
- for (int j = 0; j < urlNPs.length; ++j) {
- setURLs.add(urlNPs[j]);
- }
- }
-
- urlNPs = new IURLNamePair[ setURLs.size() ];
- System.arraycopy(setURLs.toArray(), 0, urlNPs, 0, setURLs.size() );
-
- return urlNPs;
-}
-/**
- * Returns a list of components that require updating by:
- *<ol>
- *<li>Loading all product/component manifests from .install/tree </li>
- *<li>Determining which components require updating by:</li>
- *<ol>
- *<li>Collecting update URLs from each component</li>
- *<li>Collecting update URLs from products that components are a part of</li>
- *</ol>
- *<li>Determining what updates are available by:</li>
- *<ol>
- *<li>Accessing the update URL</li>
- *<li>Determining if the component is a newer version of the existing one</li>
- *</ol>
- *<li>
- *</ol>
- */
-public IURLNamePair[] getLocalUpdateURLs() {
-
- IURLNamePair[] urlNPs = null;
-
- // Obtain the local registry
- //--------------------------
- IUMRegistry registry = _registryManager.getLocalRegistry();
-
- // Create a list of all URLs
- //--------------------------
- TreeSet setURLs = new TreeSet( new UpdateManagerURLComparator() );
-
- // Obtain a list of all installed components
- //------------------------------------------
- IComponentDescriptor[] componentDescriptors = registry.getComponentDescriptors();
-
- // Obtain a list of discovery URLs
- //--------------------------------
- for (int i = 0; i < componentDescriptors.length; ++i) {
- urlNPs = componentDescriptors[i].getUpdateURLs();
-
- for (int j = 0; j < urlNPs.length; ++j) {
- setURLs.add(urlNPs[j]);
- }
- }
-
- // Obtain a list of all installed products
- //----------------------------------------
- IProductDescriptor[] productDescriptors = registry.getProductDescriptors();
-
- // Obtain a list of discovery URLs
- //--------------------------------
- for (int i = 0; i < productDescriptors.length; ++i) {
- urlNPs = productDescriptors[i].getUpdateURLs();
-
- for (int j = 0; j < urlNPs.length; ++j) {
- setURLs.add(urlNPs[j]);
- }
- }
-
- urlNPs = new IURLNamePair[ setURLs.size() ];
- System.arraycopy(setURLs.toArray(), 0, urlNPs, 0, setURLs.size() );
-
- return urlNPs;
-}
-// return the local (current) registry
-
-public IUMRegistry getRegistryAt(URL url) {
-
- return _registryManager.getRegistryAt( url );
-}
-/**
- */
-public UMRegistryManager getRegistryManager() {
- return _registryManager;
-}
-/**
- * Initializes the update and history log URLs,creates a session manager,
- * and creates a registry manager.
- */
-public void initialize() throws UpdateManagerException{
-
- // Obtain install URL
- //-------------------
- URL urlBase = UMEclipseTree.getBaseInstallURL();
- String strUrlBase = urlBase.toExternalForm();
- String strUrlInstall = strUrlBase + "install/";
-
- String strUrlUpdateLog = strUrlInstall + "update.log";
- String strUrlHistoryLog = strUrlInstall + "history.log";
-
- setUpdateLogURL(strUrlUpdateLog);
- setHistoryLogURL(strUrlHistoryLog);
-
- // Create a session manager
- //-------------------------
- try {
- _sessionManager = new UMSessionManager(new URL(_strUpdateLogURL), new URL(_strHistoryLogURL), true);
- }
- catch (MalformedURLException ex) {
- throw new UpdateManagerException("Invalid log URL specification");
- }
- catch (LogStoreException ex) {
- throw new UpdateManagerException(ex.getMessage());
- }
-
- // Registry Manager
- //-----------------
- _registryManager = new UMRegistryManager(urlBase);
-}
-/**
- *
- */
-public void removeComponent(IComponentDescriptor componentDescriptor) {
- removeComponent(componentDescriptor, null);
-}
-/**
- *
- */
-public void removeComponent(IComponentDescriptor componentDescriptor, IProductDescriptor productDescriptor) {
-
- if( componentDescriptor == null )
- return;
-
- LaunchInfo launchInfo = LaunchInfo.getCurrent();
- LaunchInfo.VersionedIdentifier vid = null;
-
- // Plugins
- //--------
- IPluginEntryDescriptor[] pluginEntries = componentDescriptor.getPluginEntries();
-
- for (int i = 0; i < pluginEntries.length; ++i) {
- vid = new LaunchInfo.VersionedIdentifier(pluginEntries[i].getUniqueIdentifier(), pluginEntries[i].getVersionStr());
- launchInfo.removePlugin(vid);
- }
-
- // Fragments
- //----------
- IFragmentEntryDescriptor[] fragmentEntries = componentDescriptor.getFragmentEntries();
-
- for (int i = 0; i < fragmentEntries.length; ++i) {
- vid = new LaunchInfo.VersionedIdentifier(fragmentEntries[i].getUniqueIdentifier(), pluginEntries[i].getVersionStr());
- launchInfo.removeFragment(vid);
- }
-
- // Component
- //----------
- vid = new LaunchInfo.VersionedIdentifier(componentDescriptor.getUniqueIdentifier(), componentDescriptor.getVersionStr());
- launchInfo.removeComponent(vid);
- _registryManager.removeComponentDescriptorFromLocal(componentDescriptor, productDescriptor);
-
- return;
-}
-/**
- *
- */
-public void removeProduct(IProductDescriptor productDescriptor) {
-
- if( productDescriptor == null )
- return;
-
- // Components
- //-----------
- IComponentEntryDescriptor[] componentEntries = productDescriptor.getComponentEntries();
-
- for (int i = 0; i < componentEntries.length; ++i) {
- IComponentDescriptor componentDescriptor = componentEntries[i].getComponentDescriptor();
- if (componentDescriptor.isRemovable(productDescriptor))
- removeComponent(componentDescriptor, productDescriptor);
- }
-
- // Product
- //--------
- LaunchInfo.VersionedIdentifier vid = new LaunchInfo.VersionedIdentifier(productDescriptor.getUniqueIdentifier(), productDescriptor.getVersionStr());
- LaunchInfo.getCurrent().removeConfiguration(vid);
- _registryManager.removeProductDescriptorFromLocal(productDescriptor);
-}
-/**
- * Sets the URL for the history log. This property is persistent.
- */
-public void setHistoryLogURL(String strURL) throws UpdateManagerException {
-
- // Check for valid URL
- //--------------------
- try {
- new URL(strURL);
- }
- catch (MalformedURLException ex) {
- throw new UpdateManagerException("Invalid log URL specification");
- }
-
- // Change the property
- //--------------------
- _strHistoryLogURL = strURL;
-}
-/**
- * Sets the URL for the update log. This property is persistent.
- */
-public void setUpdateLogURL(String strURL) throws UpdateManagerException {
-
- // Check for valid URL
- //--------------------
- try {
- new URL(strURL);
- }
- catch (MalformedURLException ex) {
- throw new UpdateManagerException("Invalid log URL specification");
- }
-
- // Change the property
- //--------------------
- _strUpdateLogURL = strURL;
-}
-/**
- * Updates the boot loader's launch information with what is currently installed.
- */
-public void updateLaunchInfoAndRegistry(UMSessionManagerSession session) {
-
- // Update launch info even if this session had a failure
- // One or more parcels could have succeeded
- //------------------------------------------------------
- if (session != null) {
-
- LaunchInfo launchInfo = LaunchInfo.getCurrent();
-
- // Obtain product/component information
- //-------------------------------------
- UMSessionManagerParcel[] parcels = session.getParcels();
-
- for (int i = 0; i < parcels.length; ++i) {
- updateLaunchInfoAndRegistryParcel( parcels[i], launchInfo );
- }
- }
-}
-/**
- * Recursively updates the boot loader's information for this parcel and sub-parcels.
- */
-protected void updateLaunchInfoAndRegistryParcel(UMSessionManagerParcel parcel, LaunchInfo launchInfo) {
-
- // Update the profile only if the install was successful
- //------------------------------------------------------
- if (parcel != null && parcel.getStatus().equals(UpdateManagerConstants.STATUS_SUCCEEDED) == true) {
-
- Object objData = parcel.getData();
-
- // Product
- //--------
- if (objData instanceof IProductDescriptor) {
- updateLaunchInfoProduct((IProductDescriptor) objData, launchInfo);
- _registryManager.addProductDescriptorToLocal((IProductDescriptor) objData);
- }
-
- // Component
- //----------
- else if (objData instanceof IComponentDescriptor) {
- updateLaunchInfoComponent((IComponentDescriptor) objData, launchInfo);
- _registryManager.addComponentDescriptorToLocal((IComponentDescriptor) objData, true);
- }
-
- // Component Entry
- //----------------
- else if (objData instanceof IComponentEntryDescriptor) {
- IComponentDescriptor comp = ((IComponentEntryDescriptor)objData).getComponentDescriptor();
- updateLaunchInfoComponent(comp, launchInfo);
- _registryManager.addComponentDescriptorToLocal(comp, false);
- }
-
- // Do child parcels
- //-----------------
- UMSessionManagerParcel[] parcelChildren = parcel.getParcels();
-
- for (int i = 0; i < parcelChildren.length; ++i) {
- updateLaunchInfoAndRegistryParcel(parcelChildren[i], launchInfo);
- }
- }
-}
-/**
- * Updates the boot loader's launch information with what is currently installed.
- */
-public void updateLaunchInfoComponent(IComponentDescriptor descriptor, LaunchInfo launchInfo) {
-
- // Component
- //----------
- launchInfo.setComponent(new LaunchInfo.VersionedIdentifier(descriptor.getUniqueIdentifier(), descriptor.getVersionStr()));
-
- // Plugins
- //--------
- IPluginEntryDescriptor[] pluginDescriptors = descriptor.getPluginEntries();
-
- for (int i = 0; i < pluginDescriptors.length; ++i) {
- updateLaunchInfoPlugin(pluginDescriptors[i], launchInfo);
- }
-
- // Fragments
- //----------
- IFragmentEntryDescriptor[] fragmentDescriptors = descriptor.getFragmentEntries();
-
- for (int i = 0; i < fragmentDescriptors.length; ++i) {
- updateLaunchInfoFragment(fragmentDescriptors[i], launchInfo);
- }
-}
-/**
- * Updates the boot loader's launch information with what is currently installed.
- */
-public void updateLaunchInfoFragment(IFragmentEntryDescriptor descriptor, LaunchInfo launchInfo) {
-
- launchInfo.setFragment(new LaunchInfo.VersionedIdentifier(descriptor.getUniqueIdentifier(),descriptor.getVersionStr()));
-}
-/**
- * Updates the boot loader's launch information with what is currently installed.
- */
-public void updateLaunchInfoPlugin(IPluginEntryDescriptor descriptor, LaunchInfo launchInfo) {
-
- launchInfo.setPlugin(new LaunchInfo.VersionedIdentifier(descriptor.getUniqueIdentifier(),descriptor.getVersionStr()));
-}
-/**
- * Updates the boot loader's launch information with what is currently installed.
- */
-public void updateLaunchInfoProduct(IProductDescriptor descriptor, LaunchInfo launchInfo) {
-
- launchInfo.setConfiguration(new LaunchInfo.VersionedIdentifier(descriptor.getUniqueIdentifier(),descriptor.getVersionStr()), descriptor.getApplication());
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerException.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerException.java
deleted file mode 100644
index e25de36..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- *
- */
-public class UpdateManagerException extends Exception {
-/**
- * UpdateManagerException constructor comment.
- */
-public UpdateManagerException( String strMessage ) {
- super( strMessage );
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerPlugin.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerPlugin.java
deleted file mode 100644
index e05d25d..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerPlugin.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.net.MalformedURLException;
-import java.net.URL;
-/**
- */
-import org.eclipse.core.runtime.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.webdav.http.client.HttpClient;
-
-public class UpdateManagerPlugin extends Plugin {
- private static UpdateManagerPlugin _pluginInstance = null;
- private HttpClient client =null;
-/**
- * UpdateManagerPlugin constructor comment.
- */
-public UpdateManagerPlugin( IPluginDescriptor pluginDescriptor ) {
- super( pluginDescriptor );
-
- _pluginInstance = this;
-}
-/**
- * Returns the image descriptor of an image file relative to this plugin
- * @return org.eclipse.jface.resource.ImageDescriptor
- * @param strImage java.lang.String
- */
-public static ImageDescriptor getImageDescriptor(String strImage) {
-
- UpdateManagerPlugin plugin = getPluginInstance();
-
- if (plugin != null) {
-
- // Obtain my plugin descriptor
- //----------------------------
- IPluginDescriptor pluginDescriptor = plugin.getDescriptor();
-
- // Determine where I am installed
- //-------------------------------
- URL path = pluginDescriptor.getInstallURL();
-
- // Add the relative file location to the install location
- // Create the image descriptor
- //-------------------------------------------------------
- URL urlFullPathString = null;
-
- try {
- urlFullPathString = new URL(path, strImage);
- return ImageDescriptor.createFromURL(urlFullPathString);
- }
-
- catch (MalformedURLException e) {
- }
- }
- return null;
-}
-/**
- * @return org.eclipse.update.internal.core.UpdateManagerPlugin
- */
-public static UpdateManagerPlugin getPluginInstance() {
- return _pluginInstance;
-}
-/**
- * Shuts down this plug-in and discards all plug-in state.
- * <p>
- * This method should be re-implemented in subclasses that need to do something
- * when the plug-in is shut down. Implementors should call the inherited method
- * to ensure that any system requirements can be met.
- * </p>
- * <p>
- * Plug-in shutdown code should be robust. In particular, this method
- * should always make an effort to shut down the plug-in. Furthermore,
- * the code should not assume that the plug-in was started successfully,
- * as this method will be invoked in the event of a failure during startup.
- * </p>
- * <p>
- * Note 1: If a plug-in has been started, this method will be automatically
- * invoked by the platform when the platform is shut down.
- * </p>
- * <p>
- * Note 2: This method is intended to perform simple termination
- * of the plug-in environment. The platform may terminate invocations
- * that do not complete in a timely fashion.
- * </p>
- * <b>Cliens must never explicitly call this method.</b>
- *
- * @exception CoreException if this method fails to shut down
- * this plug-in
- */
-public void shutdown() throws CoreException {
- if(client!=null) client.close();
-}
-/**
- * Starts up this plug-in.
- * <p>
- * This method should be overridden in subclasses that need to do something
- * when this plug-in is started. Implementors should call the inherited method
- * to ensure that any system requirements can be met.
- * </p>
- * <p>
- * If this method throws an exception, it is taken as an indication that
- * plug-in initialization has failed; as a result, the plug-in will not
- * be activated; moreover, the plug-in will be marked as disabled and
- * ineligible for activation for the duration.
- * </p>
- * <p>
- * Plug-in startup code should be robust. In the event of a startup failure,
- * the plug-in's <code>shutdown</code> method will be invoked automatically,
- * in an attempt to close open files, etc.
- * </p>
- * <p>
- * Note 1: This method is automatically invoked by the platform
- * the first time any code in the plug-in is executed.
- * </p>
- * <p>
- * Note 2: This method is intended to perform simple initialization
- * of the plug-in environment. The platform may terminate initializers
- * that do not complete in a timely fashion.
- * </p>
- * <b>Cliens must never explicitly call this method.</b>
- *
- * @exception CoreException if this plug-in did not start up properly
- */
-public void startup() throws CoreException {
- // Setup HTTP client
- //------------------
- client = new HttpClient();
- client.setAuthenticator(new AuthorizationDatabase());
- URLHandler.setHttpClient(client);
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerStrings.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerStrings.java
deleted file mode 100644
index 21b7ecd..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerStrings.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * This class loads translatable strings from a resource bundle properties file.
- */
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
-
-public class UpdateManagerStrings
-{
- private static ResourceBundle _resourceBundle = null;
-/**
- * Obtains a NL translated string from a resource bundle
- * @param strKey java.lang.String
- */
-public static String getString( String strKey )
-{
- String strTranslated = strKey;
-
- // Obtain the set of translated strings
- //-------------------------------------
- if( _resourceBundle == null )
- {
- try
- {
- _resourceBundle = ResourceBundle.getBundle( UpdateManager._strPackageName + ".updatemanagerstrings" );
- }
- catch( MissingResourceException ex )
- {
- _resourceBundle = null;
- }
- }
-
- // Obtain the translated string
- //-----------------------------
- if( _resourceBundle != null )
- {
- try
- {
- strTranslated = _resourceBundle.getString( strKey );
- }
- catch( MissingResourceException ex )
- {
- strTranslated = strKey;
- }
- }
-
- return strTranslated;
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerURLComparator.java b/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerURLComparator.java
deleted file mode 100644
index ede4744..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/UpdateManagerURLComparator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.update.internal.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.internal.boot.update.*;
-import java.net.*;
-/**
- *
- */
-import java.util.Comparator;
-public class UpdateManagerURLComparator implements Comparator{
-/**
- * UpdateManagerTreeItemComparator constructor comment.
- */
-public UpdateManagerURLComparator() {
- super();
-}
-/**
- * Compares two strings independent of case.
- *
- * @return a negative integer, zero, or a positive integer as the
- * first argument is less than, equal to, or greater than the
- * second.
- * @throws ClassCastException if the arguments' types prevent them from
- * being compared by this Comparator.
- */
-public int compare(java.lang.Object o1, java.lang.Object o2) {
-
- if (o1 instanceof URLNamePair && o2 instanceof URLNamePair) {
- return ((URLNamePair) o1).getURL().toExternalForm().toLowerCase().compareTo(((URLNamePair) o2).getURL().toExternalForm().toLowerCase());
- }
-
- return 0;
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/core/updatemanagerstrings.properties b/update/org.eclipse.update/src/org/eclipse/update/internal/core/updatemanagerstrings.properties
deleted file mode 100644
index 5cec005..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/core/updatemanagerstrings.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-S_Add = Add
-S_Additional_Locations = Additional Locations
-S_An_installation_error_or_cancellation_has_occurred = An installation error or cancellation has occurred
-S_At_the_following_domain = At the following domain
-S_Available = Available
-S_Cancel_component_installation = Cancel component installation
-S_Component = Component
-S_Component_identifier = Component identifier
-S_Component_name = Component name
-S_Configuration_Change = Configuration Change
-S_Copy = Copy
-S_Current_installation = Current installation
-S_Description = Description
-S_Encountered_jar_entry_security_exception = Encountered jar entry security exception
-S_Enter_a_user_name_and_password_for = Enter a user name and password for
-S_Error_closing_output_stream = Error closing output stream
-S_Error_in_registry = Error in registry
-S_Error_occurred_during_installation_completion = Error occurred during installation completion
-S_Error_occurred_during_installation_setup = Error occurred during installation setup
-S_Error_occurred_during_verification = Error occurred during verification
-S_Error_reading_from_input_stream = Error reading from input stream
-S_Error_writing_to_output_stream = Error writing to output stream
-S_Examining = Examining
-S_File_is_not_a_valid_JAR_file = File is not a valid JAR file
-S_File_name = File name
-S_HTTP_client_not_set = HTTP client not set
-S_Identifier = Identifier
-S_Information = Information
-S_Install = Install
-S_Install_component = Install component
-S_Install_Components = Install Components
-S_Installation = Installation
-S_Installation_cancelled_by_user = Installation cancelled by user
-S_Installation_completed = Installation completed
-S_Installations_have_completed_successfully = Installations have completed successfully
-S_Installed = Installed
-S_Installed_Components = Installed Components
-S_Installing_this_component_may_corrupt_your_installation = Installing this component may corrupt your installation
-S_Location = Location
-S_New_Component_Updates = New Component Updates
-S_New_Components = New Components
-S_No_installable_items_were_found = No installable items were found
-S_not_available = not available
-S_not_compatible = not compatible
-S_not_newer = not newer
-S_not_updatable = not updatable
-S_Number_of_installation_histories_to_keep = Number of installation histories to keep
-S_Obtaining_information = Obtaining information
-S_OK = OK
-S_optional = optional
-S_Password = Password
-S_Password_Required = Password Required
-S_Predefined_Locations = Predefined Locations
-S_Provider = Provider
-S_Reading = Reading
-S_Remove = Remove
-S_Remove_selected_components = Remove selected components
-S_Revert = Revert
-S_Revert_to_a_Previous_Installation = Revert to a Previous Installation
-S_Revert_to_another_installation = Revert to another installation
-S_Search_for_more_recent_versions_to_install = Search for more recent versions to install
-S_Search_for_new_components = Search for new components
-S_Search_for_updates_for_all_components = Search for updates for all components
-S_Search_for_updates_for_selected_components = Search for updates for selected components
-S_Select_a_previous_installation_to_revert_to = Select a previous installation to revert to
-S_Select_any_optional_components_to_install = Select any optional components to install
-S_Select_available_versions_to_install = Select available versions to install
-S_Select_components_to_install = Select components to install
-S_Select_locations_to_update_from = Select locations to update from
-S_Show_only_most_recent_versions = Show only most recent versions
-S_Software_Updates = Software Updates
-S_Source_location = Source location
-S_Source_URL_is_malformed = Source URL is malformed
-S_Specify_search_locations_for_new_components = Specify search locations for new components
-S_Status = Status
-S_Target_URL_is_malformed = Target URL is malformed
-S_The_certificates_used_to_authenticate_this_component_are_not_recognized = The certificates used to authenticate this component are not recognized
-S_The_content_of_this_component_has_been_corrupted = The content of this component has been corrupted
-S_The_following_installation_will_become_active_when_the_workbench_is_restarted = The following installation will become active when the workbench is restarted
-S_The_following_items_will_be_installed = The following items will be installed
-S_The_following_items_will_be_updated = The following items will be updated
-S_The_installation_process_will_be_aborted = The installation process will be aborted
-S_The_provider_of_this_component_cannot_be_verified = The provider of this component cannot be verified
-S_This_component_has_not_been_digitally_signed = This component has not been digitally signed
-S_This_component_will_not_be_installed = This component will not be installed
-S_Update = Update
-S_Update_All = Update All
-S_Updates_completed = Updates completed
-S_Unable_to_access_the_following_locations = Unable to access the following locations
-S_Unable_to_connect = Unable to connect
-S_Unable_to_create_file = Unable to create file
-S_Unable_to_create_jar_entry_URL = Unable to create jar entry URL
-S_Unable_to_create_output_file_for_Jar_entry = Unable to create output file for Jar entry
-S_Unable_to_delete_file = Unable to delete file
-S_Unable_to_find_install_manifest_file_in_Jar = Unable to find install manifest file in Jar
-S_Unable_to_find_defined_contents_in_Jar = Unable to find defined contents in Jar
-S_Unable_to_obtain_source_input_stream = Unable to obtain source input stream
-S_Unable_to_obtain_target_output_stream = Unable to obtain target output stream
-S_Unable_to_open_error_logs = Unable to open error_logs
-S_Unable_to_open_jar_entry_input_stream = Unable to open jar entry input stream
-S_Unable_to_open_Jar_file = Unable to open Jar file
-S_Undefined_contents_found_in_Jar = Undefined contents found in Jar
-S_Undo = Undo
-S_User_name = User name
-S_Verification = Verification
-S_Verification_cancelled = Verification cancelled
-S_Verify = Verify
-S_Version = Version
-S_You_are_about_to_install_a_signed_component = You are about to install a signed component
-S_You_are_about_to_install_an_unsigned_component = You are about to install an unsigned component
-S_You_may_choose_to_install_the_component_or_cancel_its_installation = You may choose to install the component or cancel its installation
-S_You_must_restart_the_workbench_to_activate_any_changes = You must restart the workbench to activate any changes
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/AuthorizationDatabase.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/AuthorizationDatabase.java
deleted file mode 100644
index 8d2af15..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/AuthorizationDatabase.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.update.internal.core.UpdateManagerPlugin;
-import org.eclipse.webdav.http.client.IAuthenticator;
-
-/**
- * A transient database that remembers information, such as usernames and
- * passwords. The information is stored in memory only and is discarted
- * when the Plaform shuts down.
- */
-public class AuthorizationDatabase implements IAuthenticator {
-
- /**
- * The Map containing the userid and password
- */
- private Map result = new Hashtable();
-
- /**
- *
- */
- public void addAuthenticationInfo(URL serverUrl, String realm, String scheme, Map info) {
- try {
- Platform.addAuthorizationInfo(serverUrl, realm, scheme, info);
- }
- catch (CoreException e) {
- UpdateManagerPlugin.getPluginInstance().getLog().log(e.getStatus());
- }
- }
-
- /**
- *
- */
- public void addProtectionSpace(URL resourceUrl, String realm) {
- try {
- Platform.addProtectionSpace(resourceUrl, realm);
- }
- catch (CoreException e) {
- UpdateManagerPlugin.getPluginInstance().getLog().log(e.getStatus());
- }
-
- }
- /**
- *
- */
- public Map getAuthenticationInfo(URL serverUrl, String realm, String scheme) {
-
- return Platform.getAuthorizationInfo(serverUrl, realm, scheme);
- }
- /**
- *
- */
- public String getProtectionSpace(URL resourceUrl) {
- return Platform.getProtectionSpace(resourceUrl);
- }
- /**
- *
- */
- public Map requestAuthenticationInfo(final URL resourceUrl, final String realm, final String scheme) {
-
- result = new Hashtable();
- if (scheme.equalsIgnoreCase("Basic")) {
-
- Display disp = Display.getCurrent();
- if (disp != null) {
- promptForPassword(resourceUrl, realm, result);
- }
- else {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- promptForPassword(resourceUrl, realm, result);
- }
- });
- };
- }
- return result;
- }
-
- /**
- *
- */
- private void promptForPassword(URL resourceUrl, String realm, Map info) {
-
- Shell shell = new Shell();
- UserValidationDialog ui = new UserValidationDialog(shell, resourceUrl, realm, "");
- ui.setUsernameMutable(true);
- ui.setBlockOnOpen(true);
- ui.open();
-
- if (ui.getReturnCode() != ui.CANCEL) {
- info.put("username", ui.getUserid());
- info.put("password", ui.getPassword());
- }
- shell.dispose();
-
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Installation.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Installation.java
deleted file mode 100644
index 056f820..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Installation.java
+++ /dev/null
@@ -1,221 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Date;
-import org.eclipse.core.internal.boot.LaunchInfo;
-import org.eclipse.core.internal.boot.LaunchInfo.History;
-/**
- */
-public class Installation {
- private static final String STRING_ID = "-id";
- private static final String STRING_LIST = "-list";
- private static final String STRING_LOCATION = "-location";
- private static final String STRING_SET = "-set";
-
- private boolean _bList = false;
- private boolean _bSet = false;
- private String _strLocation = null;
- private String _strId = null;
- private int _iId = -1;
- private LaunchInfo _launchInfo = null;
- /**
- * Installation constructor comment.
- */
- public Installation() {
- super();
- }
- /**
- *
- */
- private String checkCommandLineOptions() {
-
- // Command
- //--------
- if (_bList == true) {
- if (_bSet == true) {
- return "Invalid option syntax";
- }
- }
-
- else if (_bSet == true) {
- if (_bList == true) {
- return "Invalid option syntax";
- }
- }
-
- else {
- return "Command missing";
- }
-
- // Location
- //---------
- if (_strLocation == null || _strLocation.length() == 0) {
- return "Location missing";
- }
-
- URL urlLocation = null;
-
- try {
- urlLocation = new URL(_strLocation);
- }
- catch (MalformedURLException ex) {
- return "Invalid location syntax";
- }
-
- // Set the location of the installation directory
- //-----------------------------------------------
- // LaunchInfo.startup(urlLocation);
- _launchInfo = LaunchInfo.getCurrent();
-
- // Set
- //----
- if (_bSet == true) {
- if (_strId == null || _strId.length() == 0) {
- return "Installation identifier number missing";
- }
-
- try {
- _iId = new Integer(_strId).intValue();
- }
- catch (NumberFormatException ex) {
- return "Invalid identifier syntax";
- }
- }
-
- return null;
- }
- /**
- */
- public String doList() {
-
- LaunchInfo launchInfoFormer = null;
-
- LaunchInfo.History[] histories = _launchInfo.getLaunchInfoHistory();
-
- if (histories.length == 0)
- return "No histories found";
-
- if (histories.length == 1 && histories[0].getLaunchInfoDate() == null)
- return "No histories found";
-
- // Same order as doSet()
- // Most recent to oldest order
- //----------------------------
- int iIndex = 1;
-
- for (int i = histories.length - 1; i >= 0; --i) {
-
- Date date = histories[i].getLaunchInfoDate();
-
- // Older profile
- //--------------
- if (date != null) {
- System.out.println(Integer.toString(iIndex++) + " " + histories[i].getLaunchInfoDate().toString());
- }
- }
-
- return null;
- }
- /**
- *
- */
- public String doSet() {
-
- LaunchInfo.History[] histories = _launchInfo.getLaunchInfoHistory();
-
- if (_iId < histories.length) {
-
- int iIndex = 1;
-
- // Same algorithm as doList()
- // Most recent to oldest order
- //----------------------------
- for (int i = histories.length - 1; i >= 0; --i) {
-
- Date date = histories[i].getLaunchInfoDate();
-
- // Older profile
- //--------------
- if (date != null) {
- if (iIndex == _iId) {
- _launchInfo.revertTo(histories[i]);
- System.out.println(date.toString());
- return null;
- }
- else {
- iIndex++;
- }
- }
- }
- }
-
- return "Identifier not found";
- }
- /**
- */
- public static void main(String[] args) {
-
- Installation installation = new Installation();
-
- installation.parseCommandLineOptions(args);
-
- String strError = installation.checkCommandLineOptions();
-
- if (strError == null) {
- if (installation._bList == true)
- strError = installation.doList();
-
- else if (installation._bSet == true)
- strError = installation.doSet();
- }
-
- if (strError != null) {
- System.out.println(strError);
- printUsage();
- System.exit(-1);
- }
- }
- /**
- */
- public void parseCommandLineOptions(String[] straArgs) {
-
- for (int i = 0; i < straArgs.length; ++i) {
-
- // Command: List
- //--------------
- if (straArgs[i].equalsIgnoreCase(STRING_LIST) == true) {
- _bList = true;
- }
-
- // Command: Set
- //-------------
- else if (straArgs[i].equalsIgnoreCase(STRING_SET) == true) {
- _bSet = true;
- }
-
- // Location to install from
- //-------------------------
- else if (straArgs[i].equalsIgnoreCase(STRING_LOCATION) == true && i < straArgs.length - 1) {
- _strLocation = straArgs[++i];
- }
-
- // Identifier
- //-----------
- else if (straArgs[i].equalsIgnoreCase(STRING_ID) == true && i < straArgs.length - 1) {
- _strId = straArgs[++i];
- }
- }
- }
- /**
- */
- public static void printUsage() {
- System.out.println("");
- System.out.println("-list -location urlPath");
- System.out.println("-set -location urlPath -id number");
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationDialog.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationDialog.java
deleted file mode 100644
index 6d5389d..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationDialog.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationResult.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationResult.java
deleted file mode 100644
index 1711181..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationResult.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Result of the service
- */
-public class JarVerificationResult {
-
- public static final int CANCEL_INSTALL = 0;
- public static final int OK_TO_INSTALL = 1;
-
- private int resultCode;
- private Exception resultException;
- /**
- */
- public int getResultCode() {
- return resultCode;
- }
- /**
- */
- public Exception getResultException() {
- return resultException;
- }
- /**
- */
- public void setResultCode(int newResultCode) {
- resultCode = newResultCode;
- }
- /**
- * called by JarVerificationService only
- */
- void setResultException(Exception newResultException) {
- resultException = newResultException;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationService.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationService.java
deleted file mode 100644
index 69b4339..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerificationService.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerifier.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerifier.java
deleted file mode 100644
index dda11d7..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/JarVerifier.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/KeyStores.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/KeyStores.java
deleted file mode 100644
index 7284e0a..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/KeyStores.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Main.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Main.java
deleted file mode 100644
index e0f0367..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/Main.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.net.*;
-import java.lang.reflect.*;
-import java.io.PrintWriter;
-import java.util.StringTokenizer;
-import java.util.Vector;
-/**
- * Startup class for Eclipse. Creates a class loader using
- * supplied URL of platform installation, loads and calls
- * the Eclipse Boot Loader
- */
-public class Main {
- protected boolean debug = false;
- protected boolean usage = false;
- protected String bootLocation = null;
- protected String application;
- protected URL pluginPathLocation;
- protected String location;
-
- // constants
- private static final String APPLICATION = "-application";
- private static final String BOOT = "-boot";
- private static final String DEBUG = "-debug";
- private static final String USAGE = "-?";
- private static final String BOOTLOADER = "org.eclipse.core.boot.BootLoader";
-
- // The project containing the boot loader code. This is used to construct
- // the correct class path for running in VAJ and VAME.
- private static final String PROJECT_NAME = "Eclipse Core Boot";
-
- private static boolean inVAJ;
- static {
- try {
- Class.forName("com.ibm.uvm.lang.ProjectClassLoader");
- inVAJ = true;
- } catch (Exception e) {
- inVAJ = false;
- }
- }
- private static boolean inVAME;
- static {
- try {
- Class.forName("com.ibm.eclipse.VAME");
- inVAME = true;
- } catch (Exception e) {
- inVAME = false;
- }
- }
-
-protected void basicRun(String[] args) throws Exception {
- Class clazz = getBootLoader(bootLocation);
- Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, URL.class, String.class, String[].class });
- try {
- method.invoke(clazz, new Object[] { application, pluginPathLocation, location, args });
- } catch (InvocationTargetException e) {
- if (e.getTargetException() instanceof Error)
- throw (Error) e.getTargetException();
- else
- throw e;
- }
-}
-public Class getBootLoader(String base) throws Exception {
- URLClassLoader loader = new URLClassLoader(new URL[] { getBootURL(base)}, null);
- return loader.loadClass(BOOTLOADER);
-}
-/**
- * Returns the <code>URL</code> where the boot classes are located.
- */
-protected URL getBootURL(String base) throws MalformedURLException {
- URL url = null;
- if (base != null)
- return new URL(base);
- // Create a URL based on the location of this class' code.
- // strip off jar file and/or last directory to get
- // to the directory containing projects.
- url = getClass().getProtectionDomain().getCodeSource().getLocation();
- String path = url.getFile();
- if (path.endsWith(".jar"))
- path = path.substring(0, path.lastIndexOf("/"));
- if (path.endsWith("/"))
- path = path.substring(0, path.length() - 1);
- if (inVAJ || inVAME) {
- int ix = path.lastIndexOf("/");
- path = path.substring(0, ix + 1);
- path = path + PROJECT_NAME + "/";
- } else
- path = path + "/plugins/org.eclipse.core.boot/boot.jar";
- return new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
-}
-/**
- * Print the usage of this launcher on the system console
- */
-protected void printUsage(PrintWriter out) {
- out.println("The general form of using the Platform bootstrap main is:");
- out.println(" java <main class> -application <name> [option list]");
- out.println("where the required arguments are:");
- out.println(" -application <name> : the application to run ");
- out.println("and where the option list can be any number of the following:");
- out.println(" -platform <location> : run in the given location");
- out.println(" -debug [debug options file] : turn on debug mode. Read debug options from ");
- out.println(" the specified file or from ./.options if not specified.");
- out.println(" -? : print this message");
- out.flush();
-}
-protected String[] processCommandLine(String[] args) throws Exception {
- int[] configArgs = new int[100];
- configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
- int configArgIndex = 0;
- for (int i = 0; i < args.length; i++) {
- boolean found = false;
- // check for args without parameters (i.e., a flag arg)
- // check if debug should be enabled for the entire platform
- if (args[i].equalsIgnoreCase(DEBUG)) {
- debug = true;
- // passed thru this arg (i.e., do not set found = true
- }
-
- // look for the usage flag
- if (args[i].equalsIgnoreCase(USAGE)) {
- usage = true;
- // passed thru this arg (i.e., do not set found = true
- }
-
- if (found) {
- configArgs[configArgIndex++] = i;
- continue;
- }
- // check for args with parameters. If we are at the last argument or if the next one
- // has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) {
- continue;
- }
- String arg = args[++i];
-
- // look for the laucher to run
- if (args[i - 1].equalsIgnoreCase(BOOT)) {
- found = true;
- bootLocation = arg;
- }
-
- // look for the application to run
- if (args[i - 1].equalsIgnoreCase(APPLICATION)) {
- found = true;
- application = arg;
- }
-
- // done checking for args. Remember where an arg was found
- if (found) {
- configArgs[configArgIndex++] = i - 1;
- configArgs[configArgIndex++] = i;
- }
- }
-
- // remove all the arguments consumed by this argument parsing
- if (configArgIndex == 0)
- return args;
- String[] passThruArgs = new String[args.length - configArgIndex];
- configArgIndex = 0;
- int j = 0;
- for (int i = 0; i < args.length; i++) {
- if (i == configArgs[configArgIndex])
- configArgIndex++;
- else
- passThruArgs[j++] = args[i];
- }
- return passThruArgs;
-}
-public void run(String[] args) throws Exception {
- String[] passThruArgs = processCommandLine(args);
- if (usage) {
- printUsage(new PrintWriter(System.out));
- return;
- }
- basicRun(passThruArgs);
-}
-}
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplication.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplication.java
deleted file mode 100644
index 3bb792a..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplication.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/*
- * Update Manager Install Application
- *
- * Command to run from command line:
- *
- *.\jre\bin\java -verify -cp startup.jar org.eclipse.core.launcher.UIMain -application org.eclipse.update.internal.ui.updateManager -install -url http://klicnik.torolab.ibm.com/eclipse/site/ -id org.eclipse.sdk %*
- *
- *
- * Arguments are:
- * -install Install command
- * -url [url] Location from which to install from
- * -id [id] Identifier of the manifest to install
- *
- * Sample:
- * -install -url file:/c:/temp/updatesite/ -id org.eclipse.sdk
- */
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-public class UMApplication extends Main {
- private static final String DEFAULT_APPLICATION = "org.eclipse.update.internal.ui.updateManager";
- public UMApplication() {
- super();
- application = DEFAULT_APPLICATION;
- }
- public static void main(String[] args) {
-
- int iReturnCode = 0;
-
- try {
- new UMApplication().run(args);
- }
-
- catch (Exception e) {
- }
-
- System.exit(0);
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterface.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterface.java
deleted file mode 100644
index 2543bc2..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterface.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterfaceProperties.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterfaceProperties.java
deleted file mode 100644
index ac84b0b..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationUserInterfaceProperties.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationWindow.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationWindow.java
deleted file mode 100644
index 9d6394b..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMApplicationWindow.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialog.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialog.java
deleted file mode 100644
index a098936..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialog.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialogAction.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialogAction.java
deleted file mode 100644
index 19dd3d4..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMDialogAction.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMPreferencePageSettings.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMPreferencePageSettings.java
deleted file mode 100644
index d5a2709..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMPreferencePageSettings.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizard.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizard.java
deleted file mode 100644
index 0adbc08..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizard.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageComplete.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageComplete.java
deleted file mode 100644
index 5d3a7ec..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageComplete.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstallable.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstallable.java
deleted file mode 100644
index b2803d4..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstallable.java
+++ /dev/null
@@ -1,1333 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.TreeSet;
-import java.util.Vector;
-
-import org.eclipse.core.internal.boot.update.IComponentDescriptor;
-import org.eclipse.core.internal.boot.update.IComponentEntryDescriptor;
-import org.eclipse.core.internal.boot.update.IManifestDescriptor;
-import org.eclipse.core.internal.boot.update.IProductDescriptor;
-import org.eclipse.core.internal.boot.update.IUMRegistry;
-import org.eclipse.core.internal.boot.update.UMEclipseTree;
-import org.eclipse.core.internal.boot.update.URLNamePair;
-import org.eclipse.core.internal.boot.update.UpdateManagerConstants;
-import org.eclipse.core.internal.boot.update.BaseURLHandler.Response;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ColumnLayoutData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.TableTree;
-import org.eclipse.swt.custom.TableTreeItem;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.events.MouseTrackListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.update.internal.core.URLHandler;
-import org.eclipse.update.internal.core.UpdateManagerStrings;
-import org.eclipse.webdav.http.client.IStatusCodes;
-
-/**
- * Presents products and components that may be selected for installation.
- */
-public class UMWizardPageInstallable extends WizardPage implements MouseMoveListener, MouseTrackListener, SelectionListener {
- protected boolean _bRefreshRequired = true;
- protected UMWizard _wizard = null;
- protected TableTree _tableTreeItems = null;
- protected Hashtable _hashRegistryCache = new Hashtable();
- protected TreeSet _treeSetItems = null;
- protected TreeSet _treeSetLocations = null;
- protected Text _textDescription = null;
- protected String _strDescription = null;
- protected boolean _bUpdateMode = false;
- protected SashForm _sashFormTopBottom = null;
- protected IProgressMonitor _progressMonitor = null;
- protected URLNamePair[] _urlNamePairs = null;
- protected Button _buttonShowLatestOnly = null;
- protected boolean _bShowLatestOnly = true;
- /**
- *
- */
- public UMWizardPageInstallable(UMWizard wizard, String strName, boolean bUpdateMode) {
- super(strName);
- _wizard = wizard;
- _bUpdateMode = bUpdateMode;
-
- if (bUpdateMode == true) {
- this.setTitle(UpdateManagerStrings.getString("S_New_Component_Updates"));
- this.setDescription(UpdateManagerStrings.getString("S_Select_available_versions_to_install"));
- }
- else {
- this.setTitle(UpdateManagerStrings.getString("S_New_Components"));
- this.setDescription(UpdateManagerStrings.getString("S_Select_components_to_install"));
- }
- }
- /**
- *
- */
- public void addLocationToTree(IUMRegistry registryRemote, IUMRegistry registryLocal, IProgressMonitor progressMonitor) {
-
- UMWizardTreeItem itemProduct = null;
- UMWizardTreeItem itemComponent = null;
- UMWizardTreeItem itemComponentEntry = null;
- UMWizardTreeItem itemLocation = null;
- UMWizardTreeItem itemComponentCategory = null;
- UMWizardTreeItem itemProductCategory = null;
-
- IProductDescriptor descriptorLocalProduct = null;
- IProductDescriptor[] descriptorsProduct = null;
- IComponentDescriptor descriptorLocalComponent = null;
- IComponentDescriptor[] descriptorsComponent = null;
- IComponentEntryDescriptor[] descriptorsEntry = null;
-
- // Obtain descriptors
- //-------------------
- if (_bShowLatestOnly == true) {
- descriptorsProduct = registryRemote.getProductDescriptors();
- descriptorsComponent = registryRemote.getComponentDescriptors();
- }
- else {
- descriptorsProduct = registryRemote.getAllProductDescriptors();
- descriptorsComponent = registryRemote.getAllComponentDescriptors();
- }
-
- if (descriptorsProduct.length + descriptorsComponent.length > 0) {
-
- itemLocation = new UMWizardTreeItem();
- itemLocation._iType = UpdateManagerConstants.TYPE_URL;
- itemLocation._strDescription = registryRemote.getRegistryBaseURL().toExternalForm();
- itemLocation._strName = getURLDescription(itemLocation._strDescription);
- itemLocation._strURLUpdate = itemLocation._strName;
-
- progressMonitor.beginTask(UpdateManagerStrings.getString("S_Examining") + ":", descriptorsProduct.length + descriptorsComponent.length);
- progressMonitor.subTask(itemLocation._strName);
-
- IManifestDescriptor[] descriptorsSelected = _wizard._manifestDescriptors;
-
- boolean bIncludeThisOne = false;
-
- // Products
- //---------
- if (descriptorsProduct.length > 0) {
-
- itemProductCategory = new UMWizardTreeItem();
- itemProductCategory._iType = UpdateManagerConstants.TYPE_PRODUCT_CATEGORY;
- itemProductCategory._strName = "products";
-
- // Add product category to location tree later
- //--------------------------------------------
- IProductDescriptor descriptorProductSelected = null;
-
- for (int i = 0; i < descriptorsProduct.length; ++i) {
-
- // Include all if selected descriptors is null
- // Otherwise, include only those selected
- //--------------------------------------------
- bIncludeThisOne = true;
-
- if (descriptorsSelected != null) {
- bIncludeThisOne = false;
-
- for (int j = 0; j < descriptorsSelected.length; ++j) {
- if (descriptorsSelected[j] instanceof IProductDescriptor) {
- descriptorProductSelected = (IProductDescriptor) descriptorsSelected[j];
- if (descriptorProductSelected.getUniqueIdentifier() != null) {
- if (descriptorProductSelected.getUniqueIdentifier().equals(descriptorsProduct[i].getUniqueIdentifier()) == true) {
- bIncludeThisOne = true;
- break;
- }
- }
- }
- }
- }
-
- // Display only non-installed items
- //---------------------------------
- if (_bUpdateMode == false) {
- if (registryLocal.getProductDescriptor(descriptorsProduct[i].getUniqueIdentifier()) != null) {
- bIncludeThisOne = false;
- }
- }
-
- if (bIncludeThisOne == true) {
- itemProduct = new UMWizardTreeItem();
- itemProduct._iType = UpdateManagerConstants.TYPE_PRODUCT;
- itemProduct._strDescription = descriptorsProduct[i].getDescription();
- itemProduct._strName = descriptorsProduct[i].getLabel();
- itemProduct._strId = descriptorsProduct[i].getUniqueIdentifier();
- itemProduct._strVendorName = descriptorsProduct[i].getProviderName();
- itemProduct._strVersionAvailable = descriptorsProduct[i].getVersionStr();
- itemProduct._descriptorAvailable = descriptorsProduct[i];
-
- descriptorLocalProduct = registryLocal.getProductDescriptor(itemProduct._strId);
-
- if (descriptorLocalProduct != null) {
- itemProduct._descriptorCurrent = descriptorLocalProduct;
- itemProduct._strVersionCurrent = descriptorLocalProduct.getVersionStr();
- }
-
- itemProductCategory.addChildItem(itemProduct);
-
- // Component entries of the product
- //---------------------------------
- descriptorsEntry = descriptorsProduct[i].getComponentEntries();
-
- for (int j = 0; j < descriptorsEntry.length; ++j) {
-
- // Turn off selected flag
- //-----------------------
- descriptorsEntry[j].isSelected(false);
- itemComponentEntry = new UMWizardTreeItem();
- itemComponentEntry._iType = UpdateManagerConstants.TYPE_COMPONENT_ENTRY;
- itemComponentEntry._strName = descriptorsEntry[j].getLabel();
- itemComponentEntry._strId = descriptorsEntry[j].getUniqueIdentifier();
- itemComponentEntry._strVersionAvailable = descriptorsEntry[j].getVersionStr();
- itemComponentEntry._descriptorEntry = descriptorsEntry[j];
-
- descriptorLocalComponent = registryLocal.getComponentDescriptor(itemComponentEntry._strId);
-
- if (descriptorLocalComponent != null) {
- itemComponentEntry._strVersionCurrent = descriptorLocalComponent.getVersionStr();
- itemComponentEntry._strVendorName = descriptorLocalComponent.getProviderName();
- itemComponentEntry._descriptorCurrent = descriptorLocalComponent;
- }
-
- itemProduct.addChildItem(itemComponentEntry);
- }
- }
-
- progressMonitor.worked(1);
- }
-
- // Add component category if there are any components
- //---------------------------------------------------
- if (itemProductCategory._vectorChildren != null && itemProductCategory._vectorChildren.size() > 0) {
- itemLocation.addChildItem(itemProductCategory);
- }
- }
-
- // Components
- //-----------
- if (descriptorsComponent.length > 0) {
-
- itemComponentCategory = new UMWizardTreeItem();
- itemComponentCategory._iType = UpdateManagerConstants.TYPE_COMPONENT_CATEGORY;
- itemComponentCategory._strName = "components";
-
- // Add product category to location tree later
- //--------------------------------------------
- IComponentDescriptor descriptorComponentSelected = null;
- for (int i = 0; i < descriptorsComponent.length; ++i) {
-
- // Include all if selected descriptors is null
- // Otherwise, include only those selected
- //--------------------------------------------
- bIncludeThisOne = true;
- if (descriptorsSelected != null) {
- bIncludeThisOne = false;
- for (int j = 0; j < descriptorsSelected.length; ++j) {
- if (descriptorsSelected[j] instanceof IComponentDescriptor) {
- descriptorComponentSelected = (IComponentDescriptor) descriptorsSelected[j];
- if (descriptorComponentSelected.getUniqueIdentifier() != null) {
- if (descriptorComponentSelected.getUniqueIdentifier().equals(descriptorsComponent[i].getUniqueIdentifier()) == true) {
- bIncludeThisOne = true;
- break;
- }
- }
- }
- }
- }
-
- // Display only non-installed items
- //---------------------------------
- if (_bUpdateMode == false) {
- if (registryLocal.getComponentDescriptor(descriptorsComponent[i].getUniqueIdentifier()) != null) {
- bIncludeThisOne = false;
- }
- }
-
- if (bIncludeThisOne == true) {
- itemComponent = new UMWizardTreeItem();
- itemComponent._iType = UpdateManagerConstants.TYPE_COMPONENT;
- itemComponent._strDescription = descriptorsComponent[i].getDescription();
- itemComponent._strName = descriptorsComponent[i].getLabel();
- itemComponent._strId = descriptorsComponent[i].getUniqueIdentifier();
- itemComponent._strVendorName = descriptorsComponent[i].getProviderName();
- itemComponent._strVersionAvailable = descriptorsComponent[i].getVersionStr();
- itemComponent._descriptorAvailable = descriptorsComponent[i];
-
- descriptorLocalComponent = registryLocal.getComponentDescriptor(itemComponent._strId);
-
- if (descriptorLocalComponent != null) {
- itemComponent._strVersionCurrent = descriptorLocalComponent.getVersionStr();
- itemComponent._descriptorCurrent = descriptorLocalComponent;
- }
-
- itemComponentCategory.addChildItem(itemComponent);
- }
- progressMonitor.worked(1);
- }
-
- // Add component category if there are any components
- //---------------------------------------------------
- if (itemComponentCategory._vectorChildren != null && itemComponentCategory._vectorChildren.size() > 0) {
- itemLocation.addChildItem(itemComponentCategory);
- }
- }
- progressMonitor.done();
-
- // Add location if there are any products/components
- //---------------------------------------------------
- if (itemLocation._vectorChildren != null && itemLocation._vectorChildren.size() > 0) {
- _treeSetItems.add(itemLocation);
- }
- }
- }
- /**
- *
- */
- public void connectToTree() {
-
- // Remove all existing tree items
- //-------------------------------
- _tableTreeItems.removeAll();
-
- UMWizardTreeItem item = null;
-
- Iterator iter = _treeSetItems.iterator();
-
- while (iter.hasNext() == true) {
-
- item = (UMWizardTreeItem) iter.next();
-
- // Create a new tree item for the top level (URL)
- //-----------------------------------------------
- TableTreeItem treeItem = new TableTreeItem(_tableTreeItems, SWT.NULL);
-
- if (item._strName != null)
- treeItem.setText(0, item._strName);
-
- if (item._strVendorName != null)
- treeItem.setText(4, item._strVendorName);
-
- treeItem.setData(item);
-
- // Create child tree items
- //------------------------
- if (item._vectorChildren != null) {
- for (int i = 0; i < item._vectorChildren.size(); ++i) {
- connectToTree((UMWizardTreeItem) item._vectorChildren.elementAt(i), treeItem);
- }
- }
-
- treeItem.setExpanded(true);
- }
- }
- /**
- * Connects items to a new tree widget.
- */
- public void connectToTree(UMWizardTreeItem item, TableTreeItem treeItemParent) {
-
- // Ignore product category and component category items
- //-----------------------------------------------------
- TableTreeItem treeItem = treeItemParent;
-
- // Create a new tree item
- //-----------------------
- if (item._iType == UpdateManagerConstants.TYPE_PRODUCT || item._iType == UpdateManagerConstants.TYPE_COMPONENT || item._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY) {
-
- treeItem = new TableTreeItem(treeItemParent, SWT.NULL);
- treeItem.setText(0, item._strName);
- treeItem.setData(item);
-
- // Table text
- //-----------
- if (item._strVersionCurrent != null)
- treeItem.setText(1, item._strVersionCurrent);
-
- if (item._strVersionAvailable != null)
- treeItem.setText(2, item._strVersionAvailable);
-
- if (item._strVendorName != null)
- treeItem.setText(4, item._strVendorName);
-
- // Status text
- //------------
- boolean bInstallable = false;
-
- if (item._iType == UpdateManagerConstants.TYPE_PRODUCT) {
- int iInstallable = isInstallableProduct(treeItem);
- treeItem.setText(3, convertInstallableToString(iInstallable));
- }
-
- else if (item._iType == UpdateManagerConstants.TYPE_COMPONENT) {
- int iInstallable = isInstallableComponent(treeItem);
- treeItem.setText(3, convertInstallableToString(iInstallable));
- }
-
- else if (item._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY) {
-
- int iInstallable = isInstallableComponentEntry(treeItem);
- treeItem.setText(3, convertInstallableToString(iInstallable));
-
- if (iInstallable == UpdateManagerConstants.OK_TO_INSTALL) {
- // Optional installation
- //----------------------
- if (item._descriptorEntry.isOptionalForInstall() == true) {
- treeItem.setText(3, UpdateManagerStrings.getString("S_optional"));
- }
- }
- else {
- treeItem.setText(3, convertInstallableToString(iInstallable));
- }
- }
- }
-
- // Create child tree items
- //------------------------
- if (item._vectorChildren != null) {
- for (int i = 0; i < item._vectorChildren.size(); ++i) {
- connectToTree((UMWizardTreeItem) item._vectorChildren.elementAt(i), treeItem);
- }
- }
-
- // Expand only after children have been created
- //---------------------------------------------
- if (item._iType != UpdateManagerConstants.TYPE_PRODUCT)
- treeItem.setExpanded(true);
-
- return;
- }
- /**
- * Converts installable constant to a displayable string
- */
- public String convertInstallableToString(int iInstallable) {
-
- switch (iInstallable) {
- case UpdateManagerConstants.NOT_COMPATIBLE :
- return UpdateManagerStrings.getString("S_not_compatible");
- case UpdateManagerConstants.NOT_NEWER :
- return UpdateManagerStrings.getString("S_not_newer");
- case UpdateManagerConstants.NOT_UPDATABLE :
- return UpdateManagerStrings.getString("S_not_updatable");
- case UpdateManagerConstants.NOT_AVAILABLE :
- return UpdateManagerStrings.getString("S_not_available");
- default :
- return "";
- }
- }
- /**
- * createContents method comment.
- */
- public void createControl(Composite compositeParent) {
- // Content
- //--------
- Composite compositeContent = new Composite(compositeParent, SWT.NULL);
-
- GridLayout layout = new GridLayout();
- compositeContent.setLayout(layout);
-
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- compositeContent.setLayoutData(gridData);
-
- // Checkbox: Show most recent versions only
- //-----------------------------------------
- _buttonShowLatestOnly = new Button(compositeContent, SWT.CHECK);
- _buttonShowLatestOnly.setText(UpdateManagerStrings.getString("S_Show_only_most_recent_versions"));
- _buttonShowLatestOnly.setSelection(_bShowLatestOnly);
- _buttonShowLatestOnly.addSelectionListener(this);
-
- // SashPane Top/Bottom
- //--------------------
- _sashFormTopBottom = new SashForm(compositeContent, SWT.VERTICAL);
-
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- _sashFormTopBottom.setLayoutData(gridData);
-
- // Tree: Installable
- //------------------
- _tableTreeItems = new TableTree(_sashFormTopBottom, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.CHECK);
-
- String[] columnTitles = { UpdateManagerStrings.getString("S_Component"), UpdateManagerStrings.getString("S_Installed"), UpdateManagerStrings.getString("S_Available"), UpdateManagerStrings.getString("S_Status"), UpdateManagerStrings.getString("S_Provider")};
- int[] iColumnWeight = { 40, 15, 15, 15, 15 };
- TableLayout layoutTable = new TableLayout();
-
- for (int i = 0; i < columnTitles.length; i++) {
- TableColumn tableColumn = new TableColumn(_tableTreeItems.getTable(), SWT.NONE);
- tableColumn.setText(columnTitles[i]);
- ColumnLayoutData cLayout = new ColumnWeightData(iColumnWeight[i], true);
- layoutTable.addColumnData(cLayout);
- }
-
- _tableTreeItems.getTable().setLinesVisible(true);
- _tableTreeItems.getTable().setHeaderVisible(true);
- _tableTreeItems.getTable().setLayout(layoutTable);
- _tableTreeItems.getTable().addMouseMoveListener(this);
- _tableTreeItems.getTable().addMouseTrackListener(this);
-
- _tableTreeItems.addSelectionListener(this);
-
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- _tableTreeItems.setLayoutData(gridData);
-
- // Text: Description
- //------------------
- _textDescription = new Text(_sashFormTopBottom, SWT.WRAP | SWT.READ_ONLY | SWT.MULTI | SWT.BORDER);
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.heightHint = 50;
- _textDescription.setLayoutData(gridData);
-
- _sashFormTopBottom.setWeights(new int[] { 80, 20 });
-
- setControl(compositeContent);
-
- setPageComplete(false);
- }
- /**
- *
- */
- public IUMRegistry getRegistryAt(String strLocation) {
-
- IUMRegistry registry = (IUMRegistry) _hashRegistryCache.get(strLocation);
-
- // Create new entry if not found
- //------------------------------
- if (registry == null) {
- URL url = null;
-
- try {
- url = new URL(strLocation);
- }
- catch (MalformedURLException ex) {
- return null;
- }
-
- registry = _wizard._updateManager.getRegistryAt(url);
-
- if (registry != null) {
- _hashRegistryCache.put(strLocation, registry);
- }
- }
-
- return registry;
- }
- /**
- *
- */
- public UMWizardTreeItem[] getSelectedItems() {
-
- UMWizardTreeItem[] items = null;
-
- // Obtain all selected items
- //--------------------------
- TableTreeItem[] treeItemChildren = _tableTreeItems.getItems();
-
- // Place them into an array
- //-------------------------
- Hashtable hashProducts = new Hashtable();
- Hashtable hashComponents = new Hashtable();
- Hashtable hashComponentEntries = new Hashtable();
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- getSelectedItemsRecursive(treeItemChildren[i], hashProducts, hashComponents, hashComponentEntries);
- }
-
- // Copy items to an array
- //-----------------------
- items = new UMWizardTreeItem[hashProducts.size() + hashComponents.size() + hashComponentEntries.size()];
-
- // Products
- //---------
- Object[] objArray = hashProducts.values().toArray();
- System.arraycopy(objArray, 0, items, 0, objArray.length);
-
- // Components
- //-----------
- objArray = hashComponents.values().toArray();
- System.arraycopy(objArray, 0, items, hashProducts.size(), objArray.length);
-
- // Component Entries
- //------------------
- objArray = hashComponentEntries.values().toArray();
- System.arraycopy(objArray, 0, items, hashProducts.size() + hashComponents.size(), objArray.length);
-
- return items;
- }
- /**
- *
- */
- public void getSelectedItemsRecursive(TableTreeItem treeItem, Hashtable hashProducts, Hashtable hashComponents, Hashtable hashComponentEntries) {
-
- // Obtain all selected items
- //--------------------------
- UMWizardTreeItem umTreeItem = null;
-
- if (treeItem.getChecked() == true) {
- umTreeItem = (UMWizardTreeItem) treeItem.getData();
-
- if (umTreeItem != null) {
- if (umTreeItem._iType == UpdateManagerConstants.TYPE_PRODUCT) {
-
- // Remove duplicates by storing newer ones only
- //---------------------------------------------
- if (hashProducts.containsKey(umTreeItem._strId) == true) {
- UMWizardTreeItem umTreeItemPrevious = (UMWizardTreeItem) hashProducts.get(umTreeItem._strId);
- if (((IProductDescriptor) umTreeItem._descriptorAvailable).compare((IProductDescriptor) umTreeItemPrevious._descriptorAvailable) > 0) {
- hashProducts.remove(umTreeItem._strId);
- hashProducts.put(umTreeItem._strId, umTreeItem);
- }
- }
- else {
- hashProducts.put(umTreeItem._strId, umTreeItem);
- }
- }
-
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT) {
-
- // Remove duplicates by storing newer ones only
- //---------------------------------------------
- if (hashComponents.containsKey(umTreeItem._strId) == true) {
- UMWizardTreeItem umTreeItemPrevious = (UMWizardTreeItem) hashComponents.get(umTreeItem._strId);
- if (((IComponentDescriptor) umTreeItem._descriptorAvailable).compare((IComponentDescriptor) umTreeItemPrevious._descriptorAvailable) > 0) {
- hashComponents.remove(umTreeItem._strId);
- hashComponents.put(umTreeItem._strId, umTreeItem);
- }
- }
- else {
- hashComponents.put(umTreeItem._strId, umTreeItem);
- }
- }
-
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY) {
-
- // Add only if the parent product has not been selected
- //-----------------------------------------------------
- TableTreeItem treeItemParent = treeItem.getParentItem();
- if (treeItemParent.getChecked() == false) {
-
- // Remove duplicates by storing newer ones only
- //---------------------------------------------
- if (hashComponentEntries.containsKey(umTreeItem._strId) == true) {
- UMWizardTreeItem umTreeItemPrevious = (UMWizardTreeItem) hashComponentEntries.get(umTreeItem._strId);
- if (((IComponentEntryDescriptor) umTreeItem._descriptorEntry).compare((IComponentEntryDescriptor) umTreeItemPrevious._descriptorEntry) > 0) {
- hashComponentEntries.remove(umTreeItem._strId);
- hashComponentEntries.put(umTreeItem._strId, umTreeItem);
- }
- }
- else {
- hashComponentEntries.put(umTreeItem._strId, umTreeItem);
- }
- }
- }
- }
- }
-
- // Do child items
- //---------------
- TableTreeItem[] treeItemChildren = treeItem.getItems();
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- getSelectedItemsRecursive(treeItemChildren[i], hashProducts, hashComponents, hashComponentEntries);
- }
-
- return;
- }
- /**
- */
- public String getURLDescription(String strURL) {
-
- if (_treeSetLocations != null && _treeSetLocations.size() > 0) {
- Iterator iter = _treeSetLocations.iterator();
- URLNamePair pair = null;
- while (iter.hasNext() == true) {
- pair = (URLNamePair) iter.next();
- if (pair._getURL().equals(strURL) == true) {
- if (pair._getName() != null && pair._getName().length() > 0) {
- return pair._getName();
- }
- }
- }
- }
-
- return strURL;
- }
- /**
- * Obtains a list of registered component URLs from the local update registry.
- * Obtains a list of bookmarked URLs from the persistent data.
- * Creates a tree for all of the URLs.
- */
- protected void initializeContent() {
-
- if (_bRefreshRequired == false) {
- return;
- }
-
- // Add all selected locations to a set
- //------------------------------------
- _treeSetLocations = new TreeSet(new UMWizardURLNamePairComparator());
-
- // Obtain predefined locations strings from location page
- //-------------------------------------------------------
- UMWizardPageLocations pageLocations = (UMWizardPageLocations) _wizard.getPage("locations");
-
- URLNamePair[] pairs = pageLocations.getSelectedPredefinedLocations();
-
- for (int i = 0; i < pairs.length; ++i) {
- _treeSetLocations.add(pairs[i]);
- }
-
- // Obtain additional locations strings from location page
- //-------------------------------------------------------
- pairs = pageLocations.getSelectedAdditionalLocations();
-
- for (int i = 0; i < pairs.length; ++i) {
- _treeSetLocations.add(pairs[i]);
- }
-
- // Obtain local registry in case there are installed versions
- //-----------------------------------------------------------
- final IUMRegistry registryLocal = _wizard._updateManager.getRegistryManager().getCurrentRegistry();
-
- final Vector vectorRegistries = new Vector();
- final Vector vectorURLsFailed = new Vector();
-
- _tableTreeItems.setRedraw(false);
-
- // Create an operation that read and create a registry for each location
- //----------------------------------------------------------------------
- IRunnableWithProgress operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
-
- _progressMonitor = progressMonitor;
-
- progressMonitor.beginTask(UpdateManagerStrings.getString("S_Reading") + ":", _treeSetLocations.size());
-
- URLNamePair pair = null;
- IUMRegistry registry = null;
-
- Iterator iter = _treeSetLocations.iterator();
-
- boolean bUrlOk = false;
-
- while (iter.hasNext() == true) {
-
- bUrlOk = false;
-
- // Obtain the registry for the URL
- // This will download the information
- //-----------------------------------
- pair = (URLNamePair) iter.next();
-
- progressMonitor.subTask(pair._getName());
-
- // Attempt to open the stream
- //---------------------------
- try {
- URL url = new URL(pair._getURL());
- url = UMEclipseTree.appendTrailingSlash(url);
- Response response = URLHandler.open(url);
- // we open the url to get authenticated. response code not
- // important at this point
- /* if (response.getResponseCode() == IStatusCodes.HTTP_OK) {
- InputStream stream = response.getInputStream();
-
- if (stream != null) {
- stream.close();*/
- bUrlOk = true;
- // }
- // }
- }
- catch (Exception ex) {
- }
-
- if (bUrlOk == true) {
- registry = getRegistryAt(pair._getURL());
-
- // Add it to the list
- //-------------------
- if (registry != null)
- vectorRegistries.add(registry);
- }
- else {
- vectorURLsFailed.add(pair);
- }
-
- progressMonitor.worked(1);
- }
- progressMonitor.done();
-
- _progressMonitor = null;
- }
- };
-
- // Run the operation
- //------------------
- try {
- _wizard.getContainer().run(true, true, operation);
- }
- catch (InterruptedException e) {
- }
- catch (InvocationTargetException e) {
- }
-
- // Create a new tree
- //------------------
- _treeSetItems = new TreeSet(new UMWizardTreeItemComparator());
-
- // Create an operation that will fill the tree with information
- // Location URL A
- // products
- // Product A
- // Product B
- // components
- // Component A
- // Component B
- // Location URL B
- // ...
- //-------------------------------------------------------------
- operation = new IRunnableWithProgress() {
- public void run(IProgressMonitor progressMonitor) throws InvocationTargetException {
-
- IUMRegistry registryRemote = null;
-
- for (int i = 0; i < vectorRegistries.size(); ++i) {
- registryRemote = (IUMRegistry) vectorRegistries.elementAt(i);
- addLocationToTree(registryRemote, registryLocal, progressMonitor);
- }
- }
- };
-
- // Run the operation
- //------------------
- try {
- _wizard.getContainer().run(true, true, operation);
- }
- catch (InterruptedException e) {
- return;
- // System.out.println( "Interrupted" );
- }
- catch (InvocationTargetException e) {
- // System.out.println( "Invocation" );
- }
-
- _tableTreeItems.setRedraw(true);
-
- // Create tree widget items for each update manager tree item
- //-----------------------------------------------------------
- connectToTree();
-
- StringBuffer strbMessage = new StringBuffer();
-
- // Determine whether there are any updatable items
- //------------------------------------------------
- if (_tableTreeItems.getItemCount() == 0)
- strbMessage.append(UpdateManagerStrings.getString("S_No_installable_items_were_found") + "\n\n");
-
- // Determine if any locations could not be accessed
- //-------------------------------------------------
- if (vectorURLsFailed.size() > 0) {
- strbMessage.append(UpdateManagerStrings.getString("S_Unable_to_access_the_following_locations") + ":");
- for (int i = 0; i < vectorURLsFailed.size(); ++i) {
- strbMessage.append("\n ");
- strbMessage.append(((URLNamePair) vectorURLsFailed.elementAt(i))._getName());
- strbMessage.append(" (");
- strbMessage.append(((URLNamePair) vectorURLsFailed.elementAt(i))._getURL());
- strbMessage.append(")");
- }
- }
-
- if (strbMessage.length() > 0) {
- MessageDialog.openInformation(getControl().getShell(), UpdateManagerStrings.getString("S_Information"), strbMessage.toString());
- }
-
- // Reset refresh flag
- //-------------------
- _bRefreshRequired = false;
-
- return;
- }
- /**
- */
- public int isInstallableComponent(TableTreeItem treeItemComponent) {
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItemComponent.getData();
-
- // False if none available to install
- //-----------------------------------
- if (umTreeItem._descriptorAvailable == null) {
- return -1;
- }
-
- // True if not yet installed
- //--------------------------
- if (umTreeItem._descriptorCurrent == null) {
- return UpdateManagerConstants.OK_TO_INSTALL;
- }
-
- // True if installable
- //--------------------
- return ((IComponentDescriptor) umTreeItem._descriptorAvailable).isInstallable((IComponentDescriptor) umTreeItem._descriptorCurrent);
- }
- /**
- * @return int
- * @param treeItemComponent org.eclipse.swt.custom.TableTreeItem
- */
- public int isInstallableComponentEntry(TableTreeItem treeItemComponentEntry) {
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItemComponentEntry.getData();
-
- // False if none available to install
- //-----------------------------------
- if (umTreeItem._descriptorEntry == null) {
- return -1;
- }
-
- // Is the product installable?
- //----------------------------
- TableTreeItem treeItemProduct = treeItemComponentEntry.getParentItem();
-
- int iProductInstallable = isInstallableProduct(treeItemProduct);
-
- // If the product is not installable, disable if mandatory component
- //------------------------------------------------------------------
- if (iProductInstallable != UpdateManagerConstants.OK_TO_INSTALL) {
- if (umTreeItem._descriptorEntry.isOptionalForInstall() == false) {
- return iProductInstallable;
- }
- }
-
- return umTreeItem._descriptorEntry.isInstallable((IComponentDescriptor) umTreeItem._descriptorCurrent);
- }
- /**
- * @return int
- * @param treeItemComponent org.eclipse.swt.custom.TableTreeItem
- */
- public int isInstallableProduct(TableTreeItem treeItemProduct) {
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItemProduct.getData();
-
- // False if none available to install
- //-----------------------------------
- if (umTreeItem._descriptorAvailable == null) {
- return -1;
- }
-
- // True if not yet installed
- //--------------------------
- else if (umTreeItem._descriptorCurrent == null) {
- return UpdateManagerConstants.OK_TO_INSTALL;
- }
-
- // True if installable
- //--------------------
- return ((IProductDescriptor) umTreeItem._descriptorAvailable).isInstallable((IProductDescriptor) umTreeItem._descriptorCurrent);
- }
- /**
- *
- */
- public boolean isInstallableRecursive(TableTreeItem treeItem) {
-
- boolean bInstallable = false;
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItem.getData();
-
- // True if product or component is checked
- //----------------------------------------
- if (treeItem.getChecked() == true) {
- if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT || umTreeItem._iType == UpdateManagerConstants.TYPE_PRODUCT || umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY) {
- return true;
- }
- }
-
- // Check all children
- //-------------------
- TableTreeItem[] treeItemChildren = treeItem.getItems();
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- if (isInstallableRecursive(treeItemChildren[i]) == true) {
- return true;
- }
- }
-
- return false;
- }
- /**
- * Sent when the mouse pointer passes into the area of
- * the screen covered by a control.
- */
- public void mouseEnter(org.eclipse.swt.events.MouseEvent e) {
- }
- /**
- * Sent when the mouse pointer passes out of the area of
- * the screen covered by a control. Erases the description text area.
- */
- public void mouseExit(MouseEvent e) {
- if (_strDescription != _wizard._strEmpty) {
- _textDescription.setText(_wizard._strEmpty);
- _strDescription = _wizard._strEmpty;
- }
- }
- /**
- * Sent when the mouse pointer hovers (that is, stops moving
- * for an (operating system specified) period of time) over
- * a control.
- */
- public void mouseHover(MouseEvent e) {
- }
- /**
- * Determines which item the mouse is over. Sets the text in the description text area to the description of the item.
- */
- public void mouseMove(MouseEvent e) {
-
- // Table item
- //-----------
- TableItem tableItem = _tableTreeItems.getTable().getItem(new Point(e.x, e.y));
-
- // TableTree item
- //---------------
- if (tableItem != null) {
-
- TableTreeItem tableTreeItem = (TableTreeItem) tableItem.getData();
-
- // UMWizardTreeItem
- //----------------------
- if (tableTreeItem != null) {
-
- UMWizardTreeItem item = (UMWizardTreeItem) tableTreeItem.getData();
-
- // Description string
- //-------------------
- if (item != null) {
- if (item._strDescription != null) {
- if (_strDescription != item._strDescription) {
- _textDescription.setText(item._strDescription);
- _strDescription = item._strDescription;
- }
- }
- else {
- if (_strDescription != _wizard._strEmpty) {
- _textDescription.setText(_wizard._strEmpty);
- _strDescription = _wizard._strEmpty;
- }
- }
- }
- else if (_strDescription != _wizard._strEmpty) {
- _textDescription.setText(_wizard._strEmpty);
- _strDescription = _wizard._strEmpty;
- }
-
- }
- }
- else if (_strDescription != _wizard._strEmpty) {
- _textDescription.setText(_wizard._strEmpty);
- _strDescription = _wizard._strEmpty;
- }
- }
- /**
- * @return boolean
- */
- public boolean performCancel() {
-
- if (_progressMonitor == null)
- return true;
-
- _progressMonitor.setCanceled(true);
- return false;
- }
- /**
- */
- protected boolean setCheckedComponent(TableTreeItem treeItemComponent) {
-
- if (treeItemComponent.getChecked() == false) {
- int iInstallable = isInstallableComponent(treeItemComponent);
-
- setTreeItemChecked(treeItemComponent, iInstallable == 0);
- return iInstallable == 0;
- }
-
- return true;
- }
- /**
- */
- protected boolean setCheckedComponentEntry(TableTreeItem treeItemComponentEntry) {
-
- if (treeItemComponentEntry.getChecked() == false) {
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItemComponentEntry.getData();
-
- int iInstallable = isInstallableComponentEntry(treeItemComponentEntry);
-
- if (iInstallable == 0) {
-
- // Set checked the product and all of its mandatory components
- //------------------------------------------------------------
- TableTreeItem treeItemProduct = treeItemComponentEntry.getParentItem();
-
- boolean bInstallableProduct = setCheckedProduct(treeItemProduct);
-
- // If the product is not installable, disable if mandatory component
- //------------------------------------------------------------------
- if (bInstallableProduct == false) {
-
- if (umTreeItem._descriptorEntry.isOptionalForInstall() == false) {
- if (treeItemComponentEntry.getChecked() == true)
- treeItemComponentEntry.setChecked(false);
- return false;
- }
- }
- }
-
- setTreeItemChecked(treeItemComponentEntry, iInstallable == 0);
- umTreeItem._descriptorEntry.isSelected(iInstallable == 0);
-
- return iInstallable == 0;
- }
-
- return true;
- }
- /**
- * This routine assumes that the checkbox was unchecked and is currently checked
- */
- protected boolean setCheckedProduct(TableTreeItem treeItemProduct) {
-
- if (treeItemProduct.getChecked() == false) {
-
- int iInstallable = isInstallableProduct(treeItemProduct);
-
- setTreeItemChecked(treeItemProduct, iInstallable == 0);
-
- if (iInstallable == 0) {
-
- TableTreeItem[] treeItemChildren = treeItemProduct.getItems();
-
- UMWizardTreeItem umTreeItem = null;
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- setCheckedComponentEntry(treeItemChildren[i]);
- }
- }
-
- return iInstallable == 0;
- }
-
- return true;
- }
- /**
- * This routine assumes that the checkbox was unchecked and is currently checked.
- */
- protected boolean setCheckedURL(TableTreeItem treeItemURL) {
-
- TableTreeItem[] treeItemChildren = treeItemURL.getItems();
- UMWizardTreeItem umTreeItem = null;
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- umTreeItem = (UMWizardTreeItem) treeItemChildren[i].getData();
-
- if (umTreeItem._iType == UpdateManagerConstants.TYPE_PRODUCT) {
- setCheckedProduct(treeItemChildren[i]);
- }
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT) {
- setCheckedComponent(treeItemChildren[i]);
- }
- }
-
- // Always checked
- //---------------
- if (treeItemURL.getChecked() == false)
- treeItemURL.setChecked(true);
-
- return true;
- }
- /**
- */
- protected void setTreeItemChecked(TableTreeItem treeItem, boolean bChecked) {
-
- if (bChecked == true) {
- if (treeItem.getChecked() == false)
- treeItem.setChecked(true);
- }
- else {
- if (treeItem.getChecked() == true)
- treeItem.setChecked(false);
- }
- }
- /**
- */
- public void setTreeItemChecked(boolean bChecked) {
- }
- /**
- */
- public void setTreeItemUncheckedRecursiveBackward(TableTreeItem treeItem) {
-
- if (treeItem.getChecked() != false) {
- treeItem.setChecked(false);
- }
-
- TableTreeItem treeItemParent = treeItem.getParentItem();
-
- if (treeItemParent != null) {
- setTreeItemUncheckedRecursiveBackward(treeItemParent);
- }
- }
- /**
- */
- public void setTreeItemUncheckedRecursiveForward(TableTreeItem treeItem) {
-
- if (treeItem.getChecked() != false) {
-
- treeItem.setChecked(false);
- /*
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItem.getData();
-
- if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY) {
-
- if (umTreeItem._descriptorEntry.isOptionalForInstall() == true) {
- umTreeItem._descriptorEntry.isSelected(false);
- }
- }
- */
- }
-
- TableTreeItem[] treeItemChildren = treeItem.getItems();
-
- for (int i = 0; i < treeItemChildren.length; ++i) {
- setTreeItemUncheckedRecursiveForward(treeItemChildren[i]);
- }
- }
- /**
- *
- */
- public void setVisible(boolean bVisible) {
-
- super.setVisible(bVisible);
-
- if (bVisible == true) {
- _sashFormTopBottom.layout();
- initializeContent();
-
- }
- }
- /**
- * Sent when default selection occurs in the control.
- */
- public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {
- }
- /**
- * Sent when selection occurs in the control.
- */
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
-
- // Checkbox: Show latest versions only
- //------------------------------------
- if (e.widget == _buttonShowLatestOnly) {
- _bShowLatestOnly = _buttonShowLatestOnly.getSelection();
- _bRefreshRequired = true;
- initializeContent();
- }
-
- // TableTreeItem: Checkbox
- //------------------------
- else if (e.widget == _tableTreeItems && e.detail == SWT.CHECK) {
-
- // Set page complete to false in case there are
- // no selected items, or until selection is determined to be valid
- //----------------------------------------------------------------
- setPageComplete(false);
-
- TableTreeItem treeItem = (TableTreeItem) e.item;
-
- UMWizardTreeItem umTreeItem = (UMWizardTreeItem) treeItem.getData();
-
- boolean bChecked = treeItem.getChecked();
-
- // Check
- //------
- if (bChecked == true) {
- // Temporarily uncheck
- //--------------------
- treeItem.setChecked(false);
-
- if (umTreeItem._iType == UpdateManagerConstants.TYPE_URL)
- setCheckedURL(treeItem);
-
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_PRODUCT)
- setCheckedProduct(treeItem);
-
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT)
- setCheckedComponent(treeItem);
-
- else if (umTreeItem._iType == UpdateManagerConstants.TYPE_COMPONENT_ENTRY)
- setCheckedComponentEntry(treeItem);
- }
-
- // Uncheck
- //--------
- else {
- switch (umTreeItem._iType) {
- case UpdateManagerConstants.TYPE_COMPONENT_ENTRY :
- umTreeItem._descriptorEntry.isSelected(false);
- if (umTreeItem._descriptorEntry.isOptionalForInstall() == false)
- setTreeItemUncheckedRecursiveBackward(treeItem);
- break;
-
- default :
- setTreeItemUncheckedRecursiveBackward(treeItem);
- setTreeItemUncheckedRecursiveForward(treeItem);
- break;
- }
- }
-
- // Determine if page is complete
- //------------------------------
- boolean bPageComplete = false;
-
- TableTreeItem[] treeItems = _tableTreeItems.getItems();
-
- for (int i = 0; i < treeItems.length; ++i) {
- if (isInstallableRecursive(treeItems[i]) == true) {
- setPageComplete(true);
- break;
- }
- }
- }
-
- return;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstalling.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstalling.java
deleted file mode 100644
index 7eb1bb8..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageInstalling.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistory.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistory.java
deleted file mode 100644
index 9589619..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistory.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistoryComplete.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistoryComplete.java
deleted file mode 100644
index 84a9d61..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLaunchHistoryComplete.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLocations.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLocations.java
deleted file mode 100644
index d61bfbb..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageLocations.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLComplete.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLComplete.java
deleted file mode 100644
index 582c842..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLComplete.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstall.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstall.java
deleted file mode 100644
index 4057a14..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstall.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstallable.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstallable.java
deleted file mode 100644
index 0e87c19..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstallable.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstalling.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstalling.java
deleted file mode 100644
index ba49c34..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPageURLInstalling.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPersistentProperties.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPersistentProperties.java
deleted file mode 100644
index 9cd1af7..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardPersistentProperties.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentNew.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentNew.java
deleted file mode 100644
index cdf3a47..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentNew.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentRevert.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentRevert.java
deleted file mode 100644
index 908d541..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentRevert.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentURLInstall.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentURLInstall.java
deleted file mode 100644
index 5c08941..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentURLInstall.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentUpdate.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentUpdate.java
deleted file mode 100644
index f686d65..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardProductComponentUpdate.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItem.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItem.java
deleted file mode 100644
index 57ebf4a..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItem.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItemComparator.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItemComparator.java
deleted file mode 100644
index 96c1981..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardTreeItemComparator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.update.internal.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- *
- */
-import java.util.Comparator;
-public class UMWizardTreeItemComparator implements Comparator {
- /**
- * UpdateManagerTreeItemComparator constructor comment.
- */
- public UMWizardTreeItemComparator() {
- super();
- }
- /**
- * Compares its two arguments for order. Returns a negative integer,
- * zero, or a positive integer as the first argument is less than, equal
- * to, or greater than the second.<p>
- *
- * The implementor must ensure that <tt>sgn(compare(x, y)) ==
- * -sgn(compare(y, x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
- * implies that <tt>compare(x, y)</tt> must throw an exception if and only
- * if <tt>compare(y, x)</tt> throws an exception.)<p>
- *
- * The implementor must also ensure that the relation is transitive:
- * <tt>((compare(x, y)>0) && (compare(y, z)>0))</tt> implies
- * <tt>compare(x, z)>0</tt>.<p>
- *
- * Finally, the implementer must ensure that <tt>compare(x, y)==0</tt>
- * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all
- * <tt>z</tt>.<p>
- *
- * It is generally the case, but <i>not</i> strictly required that
- * <tt>(compare(x, y)==0) == (x.equals(y))</tt>. Generally speaking,
- * any comparator that violates this condition should clearly indicate
- * this fact. The recommended language is "Note: this comparator
- * imposes orderings that are inconsistent with equals."
- *
- * @return a negative integer, zero, or a positive integer as the
- * first argument is less than, equal to, or greater than the
- * second.
- * @throws ClassCastException if the arguments' types prevent them from
- * being compared by this Comparator.
- */
- public int compare(java.lang.Object o1, java.lang.Object o2) {
-
- if (o1 instanceof UMWizardTreeItem && o2 instanceof UMWizardTreeItem) {
- if (((UMWizardTreeItem) o1)._strName != null && ((UMWizardTreeItem) o2)._strName != null) {
- return ((UMWizardTreeItem) o1)._strName.compareTo(((UMWizardTreeItem) o2)._strName);
- }
- }
-
- return 0;
- }
-}
\ No newline at end of file
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardURLNamePairComparator.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardURLNamePairComparator.java
deleted file mode 100644
index 59cd313..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UMWizardURLNamePairComparator.java
+++ /dev/null
Binary files differ
diff --git a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UserValidationDialog.java b/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UserValidationDialog.java
deleted file mode 100644
index 8645286..0000000
--- a/update/org.eclipse.update/src/org/eclipse/update/internal/ui/UserValidationDialog.java
+++ /dev/null
Binary files differ