Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2725 - in development/laboratory/ide/eclipse/plugins: net.dpml.ide.eclipse.core net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core net.dpml.ide.eclipse.features net.dpml.ide.eclipse.ui net.dpml.ide.eclipse.update

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: peter AT neubauer.se
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2725 - in development/laboratory/ide/eclipse/plugins: net.dpml.ide.eclipse.core net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core net.dpml.ide.eclipse.features net.dpml.ide.eclipse.ui net.dpml.ide.eclipse.update
  • Date: Sun, 05 Jun 2005 17:10:16 -0400

Author: peter AT neubauer.se
Date: Sun Jun 5 17:10:16 2005
New Revision: 2725

Modified:

development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/plugin.xml

development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core/DpmlCorePlugin.java

development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.features/feature.xml

development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.ui/plugin.xml

development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.update/site.xml
Log:
fixing ant classpath, too


Modified:
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/plugin.xml
==============================================================================
---
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/plugin.xml
(original)
+++
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/plugin.xml
Sun Jun 5 17:10:16 2005
@@ -3,7 +3,7 @@
<plugin
id="net.dpml.ide.eclipse.core"
name="DPML Studio Core"
- version="0.1.97"
+ version="0.1.98"
provider-name="DPML"
class="net.dpml.ide.eclipse.core.DpmlCorePlugin">
<runtime>

Modified:
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core/DpmlCorePlugin.java
==============================================================================
---
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core/DpmlCorePlugin.java
(original)
+++
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core/DpmlCorePlugin.java
Sun Jun 5 17:10:16 2005
@@ -1,5 +1,8 @@
package net.dpml.ide.eclipse.core;

+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
import java.util.Hashtable;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -8,10 +11,16 @@
import org.eclipse.ant.core.AntCorePreferences;
import org.eclipse.ant.core.IAntClasspathEntry;
import org.eclipse.ant.internal.core.AntClasspathEntry;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.osgi.framework.adaptor.core.AbstractBundleData;
+import org.eclipse.osgi.framework.adaptor.core.BundleFile;
+import org.eclipse.osgi.framework.internal.core.AbstractBundle;
import org.eclipse.ui.IStartup;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.service.url.URLConstants;
import org.osgi.service.url.URLStreamHandlerService;
@@ -19,191 +28,174 @@
/**
* The main plugin class to be used in the desktop.
*/
-public class DpmlCorePlugin extends Plugin implements IStartup
-{
- /**
- * The shared instance.
- */
- private static DpmlCorePlugin m_PLUGIN;
-
- /**
- * Resource bundle.
- */
- private ResourceBundle m_resourceBundle;
-
- /**
- * number of entries we need for the DPML libs
- */
- private static final int MAGIC_ENTRIES_LENGTH = 3;
-
- /**
- * the prefix for plugin search path
- */
- private static final int UPDATE_PREFIX_LENGTH = 7;
+public class DpmlCorePlugin extends Plugin implements IStartup {
+ /**
+ * The shared instance.
+ */
+ private static DpmlCorePlugin m_PLUGIN;
+
+ /**
+ * Resource bundle.
+ */
+ private ResourceBundle m_resourceBundle;
+
+ /**
+ * number of entries we need for the DPML libs
+ */
+ private static final int MAGIC_ENTRIES_LENGTH = 3;
+
+ /**
+ * the prefix for plugin search path
+ */
+ private static final int UPDATE_PREFIX_LENGTH = 7;

- private static final String TRANSIT_VERSION = "2579";
+ private static final String TRANSIT_VERSION = "2720";

private static final String JUNIT_VERSION = "3.8.1";

- /**
- * The constructor.
- */
- public DpmlCorePlugin()
- {
- super();
- m_PLUGIN = this;
- }
-
- /**
- *
- * @see
org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start( BundleContext context ) throws Exception
- {
- super.start( context );
- //registerArtifactHandler( context );
-
- fixAntClasspath();
- }
-
- /**
- * add the Transit libs to the root ant classpath for the eclipse ant
plugin
- * in order to get it understand transit ant tasks
- *
- */
- private void fixAntClasspath()
- {
- IAntClasspathEntry[] transitClasspath = new
IAntClasspathEntry[MAGIC_ENTRIES_LENGTH];
- AntCorePreferences prefs =
AntCorePlugin.getPlugin().getPreferences();
- IAntClasspathEntry[] coreClasspath =
prefs.getDefaultAntHomeEntries();
- IAntClasspathEntry[] newClasspath;
- String pluginPath =
DpmlCorePlugin.getDefault().getBundle().getLocation()
- .substring( UPDATE_PREFIX_LENGTH );
- try
- {
- transitClasspath[0] = new AntClasspathEntry( pluginPath
- + "lib/dpml-transit-main-"+ TRANSIT_VERSION + ".jar" );
- transitClasspath[1] = new AntClasspathEntry( pluginPath
- + "lib/dpml-transit-tools-"+ TRANSIT_VERSION + ".jar" );
- transitClasspath[2] = new AntClasspathEntry( pluginPath
- + "lib/junit-"+ JUNIT_VERSION + ".jar" );
- }
- catch ( Exception e )
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- newClasspath = new AntClasspathEntry[coreClasspath.length
- + transitClasspath.length];
- System.arraycopy( coreClasspath, 0, newClasspath, 0,
- coreClasspath.length );
- System.arraycopy( transitClasspath, 0, newClasspath,
- coreClasspath.length, transitClasspath.length );
- prefs.setAntHomeClasspathEntries( newClasspath );
- }
-
- /**
- * Register the artifact URL support as a service to the URLHandler
service
- *
- * @param context
- * the context to register in
- */
- private void registerArtifactHandler( BundleContext context )
- {
- Hashtable properties = new Hashtable( 1 );
- properties.put( URLConstants.URL_HANDLER_PROTOCOL,
- new String[]{ArtifactURLHandler.PROTOCOL} );
- try
- {
- context.registerService(
URLStreamHandlerService.class.getName(),
- new ArtifactURLHandler(), properties
);
-
-
- }
- catch ( Exception e )
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- /**
- *
- * @see
org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop( BundleContext context ) throws Exception
- {
- super.stop( context );
- m_PLUGIN = null;
- m_resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- * @return the instance
- */
- public static DpmlCorePlugin getDefault()
- {
- return m_PLUGIN;
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not
- * found.
- */
- public static String getResourceString( String key )
- {
- ResourceBundle bundle =
DpmlCorePlugin.getDefault().getResourceBundle();
- try
- {
- return ( bundle != null ) ? bundle.getString( key ) : key;
- }
- catch ( MissingResourceException e )
- {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle()
- {
- try
- {
- if ( m_resourceBundle == null )
- m_resourceBundle = ResourceBundle
- .getBundle( "transitPlugin.TransitPluginResources" );
- }
- catch ( MissingResourceException x )
- {
- m_resourceBundle = null;
- }
- return m_resourceBundle;
- }
-
- public IPreferenceStore getPreferenceStore()
- {
- return null;
- }
-
- public void earlyStartup()
- {
- }
-
- public static void log( String string, int severity )
- {
- DpmlCorePlugin.getDefault().getLog().log(
- new Status( severity, DpmlCorePlugin.getDefault().getClass()
- .getName(), 0, string, null ) );
-
- }
-
- public static void logInfo( String message )
- {
- log( message, Status.INFO );
+ /**
+ * The constructor.
+ */
+ public DpmlCorePlugin() {
+ super();
+ m_PLUGIN = this;
+ }
+
+ /**
+ *
+ * @see
org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ // registerArtifactHandler( context );
+
+ fixAntClasspath();
+ }
+
+ /**
+ * add the Transit libs to the root ant classpath for the eclipse ant
plugin
+ * in order to get it understand transit ant tasks
+ *
+ */
+ private void fixAntClasspath() {
+ IAntClasspathEntry[] transitClasspath = new
IAntClasspathEntry[MAGIC_ENTRIES_LENGTH];
+ AntCorePreferences prefs =
AntCorePlugin.getPlugin().getPreferences();
+ IAntClasspathEntry[] coreClasspath =
prefs.getDefaultAntHomeEntries();
+ IAntClasspathEntry[] newClasspath;
+ AbstractBundle bundle = (AbstractBundle)
DpmlCorePlugin.getDefault()
+ .getBundle();
+ AbstractBundleData bundleData = (AbstractBundleData) bundle
+ .getBundleData();
+ BundleFile bundleFile = bundleData.getBaseBundleFile();
+ File f = bundleFile.getFile("lib/dpml-transit-main-" +
TRANSIT_VERSION
+ + ".jar");
+
+ try {
+ transitClasspath[0] = new
AntClasspathEntry(bundleFile.getFile(
+ "/lib/dpml-transit-main-" +
TRANSIT_VERSION + ".jar")
+ .toString());
+ transitClasspath[1] = new
AntClasspathEntry(bundleFile.getFile(
+ "/lib/dpml-transit-tools-" +
TRANSIT_VERSION + ".jar")
+ .toString());
+ transitClasspath[2] = new
AntClasspathEntry(bundleFile.getFile(
+ "/lib/junit-" + JUNIT_VERSION +
".jar").toString());
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ newClasspath = new AntClasspathEntry[coreClasspath.length
+ + transitClasspath.length];
+ System.arraycopy(coreClasspath, 0, newClasspath, 0,
+ coreClasspath.length);
+ System.arraycopy(transitClasspath, 0, newClasspath,
+ coreClasspath.length,
transitClasspath.length);
+ prefs.setAntHomeClasspathEntries(newClasspath);
+ }
+
+ /**
+ * Register the artifact URL support as a service to the URLHandler
service
+ *
+ * @param context
+ * the context to register in
+ */
+ private void registerArtifactHandler(BundleContext context) {
+ Hashtable properties = new Hashtable(1);
+ properties.put(URLConstants.URL_HANDLER_PROTOCOL,
+ new String[] { ArtifactURLHandler.PROTOCOL });
+ try {
+
context.registerService(URLStreamHandlerService.class.getName(),
+ new ArtifactURLHandler(), properties);
+
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ *
+ * @see
org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ m_PLUGIN = null;
+ m_resourceBundle = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the instance
+ */
+ public static DpmlCorePlugin getDefault() {
+ return m_PLUGIN;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle, or 'key' if
not
+ * found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle =
DpmlCorePlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ try {
+ if (m_resourceBundle == null)
+ m_resourceBundle = ResourceBundle
+
.getBundle("transitPlugin.TransitPluginResources");
+ } catch (MissingResourceException x) {
+ m_resourceBundle = null;
+ }
+ return m_resourceBundle;
+ }
+
+ public IPreferenceStore getPreferenceStore() {
+ return null;
+ }
+
+ public void earlyStartup() {
+ }
+
+ public static void log(String string, int severity) {
+ DpmlCorePlugin.getDefault().getLog().log(
+ new Status(severity,
DpmlCorePlugin.getDefault().getClass()
+ .getName(), 0, string, null));

- }
+ }
+
+ public static void logInfo(String message) {
+ log(message, Status.INFO);
+
+ }

}

Modified:
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.features/feature.xml
==============================================================================
---
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.features/feature.xml
(original)
+++
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.features/feature.xml
Sun Jun 5 17:10:16 2005
@@ -2,7 +2,7 @@
<feature
id="net.dpml.ide.eclipse"
label="DPML Studio"
- version="0.1.97"
+ version="0.1.98"
provider-name="DPML">

<description url="http://www.dpml.net/magic-eclpse-integration";>
@@ -63,12 +63,12 @@
id="net.dpml.ide.eclipse.core"
download-size="0"
install-size="0"
- version="0.1.97"/>
+ version="0.1.98"/>

<plugin
id="net.dpml.ide.eclipse.ui"
download-size="0"
install-size="0"
- version="0.1.97"/>
+ version="0.1.98"/>

</feature>

Modified:
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.ui/plugin.xml
==============================================================================
---
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.ui/plugin.xml
(original)
+++
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.ui/plugin.xml
Sun Jun 5 17:10:16 2005
@@ -3,7 +3,7 @@
<plugin
id="net.dpml.ide.eclipse.ui"
name="DPML Studio UI"
- version="0.1.97"
+ version="0.1.98"
provider-name="DPML"
class="net.dpml.ide.eclipse.ui.DpmlUiPlugin">
<runtime>

Modified:
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.update/site.xml
==============================================================================
---
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.update/site.xml
(original)
+++
development/laboratory/ide/eclipse/plugins/net.dpml.ide.eclipse.update/site.xml
Sun Jun 5 17:10:16 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/net.dpml.ide.eclipse_0.1.97.jar"
id="net.dpml.ide.eclipse" version="0.1.97">
+ <feature url="features/net.dpml.ide.eclipse_0.1.98.jar"
id="net.dpml.ide.eclipse" version="0.1.98">
<category name="Eclipse 3.1M4+"/>
</feature>
<category-def name="Eclipse 3.1M4+" label="DPML Studio Eclipse Plugins
for Eclipse 3.1M4 and onwards"/>



  • svn commit: r2725 - in development/laboratory/ide/eclipse/plugins: net.dpml.ide.eclipse.core net.dpml.ide.eclipse.core/src/net/dpml/ide/eclipse/core net.dpml.ide.eclipse.features net.dpml.ide.eclipse.ui net.dpml.ide.eclipse.update, peter, 06/05/2005

Archive powered by MHonArc 2.6.24.

Top of Page