3.x compatibility
authorkhartlage <khartlage>
Thu, 3 Jun 2004 21:38:30 +0000 (21:38 +0000)
committerkhartlage <khartlage>
Thu, 3 Jun 2004 21:38:30 +0000 (21:38 +0000)
archive/net.sourceforge.phpeclipse.jtidy/.classpath
archive/net.sourceforge.phpeclipse.jtidy/.project
archive/net.sourceforge.phpeclipse.jtidy/plugin.xml
archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/JtidyPlugin.java
net.sourceforge.phpeclipse.phphelp/.project
net.sourceforge.phpeclipse.phphelp/plugin.xml
net.sourceforge.phpeclipse.phphelp/src/net/sourceforge/phpdt/phphelp/PHPHelpPlugin.java
net.sourceforge.phpeclipse.phphelp/src/net/sourceforge/phpdt/phphelp/actions/PHPEclipseShowContextHelp.java

index 1c3bb0c..275b34c 100644 (file)
@@ -1,32 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-    <classpathentry kind="src" path="src/"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_2.1.1/resources.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.resources_2.1.1/resourcessrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui_2.1.1/ui.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui_2.1.1/uisrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.swt.win32_2.1.1/ws/win32/swt.jar" sourcepath="ORG_ECLIPSE_PLATFORM_WIN32_SOURCE_SRC/org.eclipse.swt.win32_2.1.1/ws/win32/swtsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.text_2.1.0/text.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.text_2.1.0/textsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.jface_2.1.1/jface.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface_2.1.1/jfacesrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.jface.text_2.1.0/jfacetext.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface.text_2.1.0/jfacetextsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui.views_2.1.0/views.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.views_2.1.0/viewssrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_2.1.1/workbench.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench_2.1.1/workbenchsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui.win32_2.1.0/workbenchwin32.jar" sourcepath="ORG_ECLIPSE_PLATFORM_WIN32_SOURCE_SRC/org.eclipse.ui.win32_2.1.0/workbenchwin32src.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench.texteditor_2.1.0/texteditor.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench.texteditor_2.1.0/texteditorsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.ui.editors_2.1.0/editors.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.editors_2.1.0/editorssrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_2.1.1/boot.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.boot_2.1.1/bootsrc.zip"/>
-    <classpathentry kind="var"
-        path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_2.1.1/runtime.jar" sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.runtime_2.1.1/runtimesrc.zip"/>
-    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-    <classpathentry kind="output" path="bin"/>
+       <classpathentry kind="src" path="src/"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="output" path="bin"/>
 </classpath>
index 32654ea..3fb29c9 100644 (file)
@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>de.katzien.jtidy</name>
+       <name>net.sourceforge.phpeclipse.jtidy</name>
        <comment></comment>
        <projects>
+               <project>net.sourceforge.phpeclipse</project>
+               <project>net.sourceforge.phpeclipse.quantum.sql</project>
        </projects>
        <buildSpec>
                <buildCommand>
index 185aacf..167eb5a 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
 <plugin
    id="net.sourceforge.phpeclipse.tidy"
    name="%pluginName"
-   version="1.0.3"
+   version="1.1.0"
    provider-name="%providerName"
    class="net.sourceforge.phpdt.tidy.JtidyPlugin">
 
       <library name="jtidy.jar"/>
    </runtime>
    <requires>
+      <import plugin="org.eclipse.core.runtime.compatibility"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.jface.text"/>
+      <import plugin="org.eclipse.ui.workbench.texteditor"/>
+      <import plugin="org.eclipse.ui.editors"/>
       <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.eclipse.core.filebuffers"/>
       <import plugin="org.eclipse.ui"/>
       <import plugin="org.eclipse.swt"/>
    </requires>
index cf100dc..4ce8530 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
 
 /**
  * The main plugin class to be used in the desktop.
@@ -335,5 +336,17 @@ public class JtidyPlugin extends AbstractUIPlugin implements IPreferenceConstant
     }
     return getDefault().fTidy;
   }
-
+  /**
+        * This method is called upon plug-in activation
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+       }
+
+       /**
+        * This method is called when the plug-in is stopped
+        */
+       public void stop(BundleContext context) throws Exception {
+               super.stop(context);
+       }
 }
index 39448c4..1fc41f3 100644 (file)
@@ -4,6 +4,7 @@
        <comment></comment>
        <projects>
                <project>net.sourceforge.phpeclipse</project>
+               <project>net.sourceforge.phpeclipse.quantum.sql</project>
        </projects>
        <buildSpec>
                <buildCommand>
index ee11706..a663fbc 100644 (file)
@@ -3,12 +3,14 @@
 <plugin
    id="net.sourceforge.phpeclipse.phphelp"
    name="%pluginName"
-   version="1.0.4"
+   version="1.1.0"
    provider-name="%providerName"
    class="net.sourceforge.phpdt.phphelp.PHPHelpPlugin">
 
    <runtime>
-      <library name="phphelp.jar"/>
+      <library name="phphelp.jar">
+      <export name="*"/>
+      </library>
    </runtime>
    <requires>
       <import plugin="org.eclipse.core.runtime.compatibility"/>
@@ -22,8 +24,8 @@
       <import plugin="org.eclipse.help"/>
       <import plugin="org.eclipse.swt"/>
       <import plugin="net.sourceforge.phpeclipse"/>
+      <import plugin="net.sourceforge.phpeclipse.quantum.sql"/>
    </requires>
-  
    <extension
          point="org.eclipse.ui.popupMenus">   
       <viewerContribution
index 9ddc55a..c7dd57d 100644 (file)
@@ -11,18 +11,8 @@ Contributors:
 **********************************************************************/
 package net.sourceforge.phpdt.phphelp;
 
-import net.sourceforge.phpdt.externaltools.internal.model.ColorManager;
-import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
-import net.sourceforge.phpeclipse.resourcesview.PHPElement;
-import net.sourceforge.phpeclipse.resourcesview.PHPElementAdapterFactory;
-import net.sourceforge.phpeclipse.resourcesview.ResourceAdapterFactory;
-
-import org.eclipse.core.boot.BootLoader;
-import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdapterManager;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IPluginDescriptor;
 import org.eclipse.core.runtime.IStatus;
@@ -34,7 +24,9 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
 
 /**
  * The main plugin class to be used in the desktop.
@@ -55,7 +47,7 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
    * The constructor.
    */
   public PHPHelpPlugin(IPluginDescriptor descriptor) {
-    super(descriptor);
+    super();
     plugin = this;
   }
 
@@ -77,23 +69,23 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
   }
 
   private IWorkbenchPage internalGetActivePage() {
-    IWorkbenchWindow window = getWorkbench().getActiveWorkbenchWindow();
+    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
     if (window != null)
       return window.getActivePage();
     return null;
   }
 
   public static IWorkbenchWindow getActiveWorkbenchWindow() {
-    return getDefault().getWorkbench().getActiveWorkbenchWindow();
+    return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
   }
 
   public static Shell getActiveWorkbenchShell() {
     return getActiveWorkbenchWindow().getShell();
   }
 
-  public static String getPluginId() {
-    return getDefault().getDescriptor().getUniqueIdentifier();
-  }
+//  public static String getPluginId() {
+//    return getDefault().getDescriptor().getUniqueIdentifier();
+//  }
 
   public static void log(IStatus status) {
     getDefault().getLog().log(status);
@@ -111,15 +103,15 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
     return getDefault().isDebugging();
   }
 
-  static IPath getInstallLocation() {
-    return new Path(getDefault().getDescriptor().getInstallURL().getFile());
-  }
+//  static IPath getInstallLocation() {
+//    return new Path(getDefault().getDescriptor().getInstallURL().getFile());
+//  }
 
   protected void initializeDefaultPreferences(IPreferenceStore store) {
     // windows preferences:
-    String windowsSystem = BootLoader.getWS();
+    String windowsSystem = Platform.getWS();
 
-    if (windowsSystem.equals(BootLoader.WS_WIN32)) {
+    if (windowsSystem.equals(Platform.WS_WIN32)) {
       store.setDefault(PHP_CHM_ENABLED, "false");
       store.setDefault(PHP_CHM_FILE, "c:\\wampp2\\php\\php_manual_en.chm");
       store.setDefault(PHP_CHM_COMMAND, "hh.exe \"mk:@MSITStore:{0}::/en/function.{1}.html\"");
@@ -144,26 +136,49 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
     return display;
   }
 
-  public void startup() throws CoreException {
-    super.startup();
-    IAdapterManager manager = Platform.getAdapterManager();
-    manager.registerAdapters(new PHPElementAdapterFactory(), PHPElement.class);
-    manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
-    //  externalTools.startUp(); 
-    getStandardDisplay().asyncExec(new Runnable() {
-      public void run() {
-        //initialize the variable context manager
-        VariableContextManager.getDefault();
-      }
-    });
-  }
-
-  /**
-   * @see org.eclipse.core.runtime.Plugin#shutdown()
-   */
-  public void shutdown() throws CoreException {
-    //  externalTools.shutDown();
-    ColorManager.getDefault().dispose();
-  }
-
+//  public void startup() throws CoreException {
+//    super.startup();
+//    IAdapterManager manager = Platform.getAdapterManager();
+//    manager.registerAdapters(new PHPElementAdapterFactory(), PHPElement.class);
+//    manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
+//    //  externalTools.startUp(); 
+//    getStandardDisplay().asyncExec(new Runnable() {
+//      public void run() {
+//        //initialize the variable context manager
+//        VariableContextManager.getDefault();
+//      }
+//    });
+//  }
+
+//  /**
+//   * @see org.eclipse.core.runtime.Plugin#shutdown()
+//   */
+//  public void shutdown() throws CoreException {
+//    //  externalTools.shutDown();
+//    ColorManager.getDefault().dispose();
+//  }
+
+       /* (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+//             IAdapterManager manager = Platform.getAdapterManager();
+//         manager.registerAdapters(new PHPElementAdapterFactory(), PHPElement.class);
+//         manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
+//         //  externalTools.startUp(); 
+//         getStandardDisplay().asyncExec(new Runnable() {
+//           public void run() {
+//             //initialize the variable context manager
+//             VariableContextManager.getDefault();
+//           }
+//         });
+       }
+       /* (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+//             ColorManager.getDefault().dispose();
+               super.stop(context);
+       }
 }
\ No newline at end of file
index 6895f51..73957ae 100644 (file)
@@ -18,7 +18,6 @@ import net.sourceforge.phpdt.phphelp.PHPHelpPlugin;
 import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
 import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor;
 
-import org.eclipse.help.IHelp;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.BadLocationException;
@@ -91,13 +90,14 @@ public class PHPEclipseShowContextHelp extends ActionDelegate implements IEditor
       } catch (IOException e) {
       }
     } else {
-      IHelp help = WorkbenchHelp.getHelpSupport();
-      if (help != null) {
+//      IHelp help = WorkbenchHelp.getHelpSupport();
+//      if (help != null) {
         PHPFunctionHelpResource helpResource = new PHPFunctionHelpResource(word);
-        WorkbenchHelp.getHelpSupport().displayHelpResource(helpResource);
-      } else {
+        WorkbenchHelp.displayHelpResource(helpResource.getHref());
+        //getHelpSupport().displayHelpResource(helpResource);
+//      } else {
         //   showMessage(shell, dialogTitle, ActionMessages.getString("Open help not available"), false); //$NON-NLS-1$
-      }
+//      }
     }
   }