Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1922 - in development/laboratory/ide/eclipse/TransitPlugin: . META-INF src/net/dpml/transit src/transitPlugin

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: pneubauer AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1922 - in development/laboratory/ide/eclipse/TransitPlugin: . META-INF src/net/dpml/transit src/transitPlugin
  • Date: Tue, 01 Mar 2005 22:20:37 +0100

Author: pneubauer
Date: Tue Mar 1 22:20:35 2005
New Revision: 1922

Added:
development/laboratory/ide/eclipse/TransitPlugin/ant-1.6.2.jar
(contents, props changed)
development/laboratory/ide/eclipse/TransitPlugin/build.xml (contents,
props changed)

development/laboratory/ide/eclipse/TransitPlugin/dpml-magic-core-SNAPSHOT.jar
(contents, props changed)
development/laboratory/ide/eclipse/TransitPlugin/index.xml (contents,
props changed)

development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicClasspathInitializer.java

development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicContainer.java
Removed:

development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/TransitClasspathInitializer.java

development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/TransitContainer.java
Modified:
development/laboratory/ide/eclipse/TransitPlugin/.classpath
development/laboratory/ide/eclipse/TransitPlugin/META-INF/MANIFEST.MF
development/laboratory/ide/eclipse/TransitPlugin/dpml-transit-main.jar
development/laboratory/ide/eclipse/TransitPlugin/dpml-transit-tools.jar
development/laboratory/ide/eclipse/TransitPlugin/plugin.xml

development/laboratory/ide/eclipse/TransitPlugin/src/transitPlugin/ArtifactURLHandler.java
Log:
starting to get in dependencies into the classpath container


Modified: development/laboratory/ide/eclipse/TransitPlugin/.classpath
==============================================================================
--- development/laboratory/ide/eclipse/TransitPlugin/.classpath (original)
+++ development/laboratory/ide/eclipse/TransitPlugin/.classpath Tue Mar 1
22:20:35 2005
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry exported="true" kind="lib"
path="dpml-transit-main.jar"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" sourcepath="/dpml-main" kind="lib"
path="dpml-transit-main.jar"/>
<classpathentry exported="true" kind="lib"
path="dpml-transit-tools.jar"/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="dpml-magic-core-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="ant-1.6.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Modified:
development/laboratory/ide/eclipse/TransitPlugin/META-INF/MANIFEST.MF
==============================================================================
--- development/laboratory/ide/eclipse/TransitPlugin/META-INF/MANIFEST.MF
(original)
+++ development/laboratory/ide/eclipse/TransitPlugin/META-INF/MANIFEST.MF
Tue Mar 1 22:20:35 2005
@@ -3,9 +3,11 @@
Bundle-Name: TransitPlugin Plug-in
Bundle-SymbolicName: TransitPlugin
Bundle-Version: 1.0.0
-Bundle-ClassPath: TransitPlugin.jar,
+Bundle-ClassPath: ant-1.6.2.jar,
+ TransitPlugin.jar,
dpml-transit-main.jar,
- dpml-transit-tools.jar
+ dpml-transit-tools.jar,
+ dpml-magic-core-SNAPSHOT.jar
Bundle-Activator: transitPlugin.TransitPlugin
Bundle-Localization: plugin
Export-Package: transitPlugin

Added: development/laboratory/ide/eclipse/TransitPlugin/ant-1.6.2.jar
==============================================================================
Binary file. No diff available.

Added: development/laboratory/ide/eclipse/TransitPlugin/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/ide/eclipse/TransitPlugin/build.xml Tue Mar 1
22:20:35 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2004 Peter Neubauer
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.
+
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="eclipse-magic-plugin" default="default" basedir="."
+ xmlns:x="antlib:net.dpml.magic" xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+</project>

Added:
development/laboratory/ide/eclipse/TransitPlugin/dpml-magic-core-SNAPSHOT.jar
==============================================================================
Binary file. No diff available.

Modified:
development/laboratory/ide/eclipse/TransitPlugin/dpml-transit-main.jar
==============================================================================
Binary files. No diff available.

Modified:
development/laboratory/ide/eclipse/TransitPlugin/dpml-transit-tools.jar
==============================================================================
Binary files. No diff available.

Added: development/laboratory/ide/eclipse/TransitPlugin/index.xml
==============================================================================
--- (empty file)
+++ development/laboratory/ide/eclipse/TransitPlugin/index.xml Tue Mar 1
22:20:35 2005
@@ -0,0 +1,24 @@
+
+<index>
+
+ <!-- Unrecognized element type "plugin" found in index.
+ <import index="../../index.xml"/>-->
+
+ <project basedir=".">
+ <info>
+ <group>dpml/eclipse</group>
+ <name>eclipse-magic-plugin</name>
+ </info>
+ <dependencies>
+ <include key="ant"/>
+ </dependencies>
+ </project>
+
+ <resource>
+ <info>
+ <group>ant</group>
+ <name>ant</name>
+ <version>1.6.2</version>
+ </info>
+ </resource>
+</index>

Modified: development/laboratory/ide/eclipse/TransitPlugin/plugin.xml
==============================================================================
--- development/laboratory/ide/eclipse/TransitPlugin/plugin.xml (original)
+++ development/laboratory/ide/eclipse/TransitPlugin/plugin.xml Tue Mar 1
22:20:35 2005
@@ -33,8 +33,8 @@

<extension point="org.eclipse.jdt.core.classpathContainerInitializer">

<classpathContainerInitializer
- id="TRANSIT"
- class="net.dpml.transit.TransitClasspathInitializer"/>

+ id="MAGIC"
+ class="net.dpml.transit.MagicClasspathInitializer"/>

</extension>



Added:
development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicClasspathInitializer.java
==============================================================================
--- (empty file)
+++
development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicClasspathInitializer.java
Tue Mar 1 22:20:35 2005
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.dpml.transit;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.launching.JREContainer;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+public class MagicClasspathInitializer extends ClasspathContainerInitializer
+{
+
+ private static final String MAGIC = "MAGIC";
+
+ public void initialize( IPath containerPath, IJavaProject project )
+ throws CoreException
+ {
+ int size = containerPath.segmentCount();
+ if (size > 0) {
+ if (containerPath.segment(0).equals(MAGIC)) {
+ MagicContainer container = null;
+ container = new MagicContainer(containerPath);
+ JavaCore.setClasspathContainer(containerPath, new
IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
+ }
+ }
+
+ }
+
+}

Added:
development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicContainer.java
==============================================================================
--- (empty file)
+++
development/laboratory/ide/eclipse/TransitPlugin/src/net/dpml/transit/MagicContainer.java
Tue Mar 1 22:20:35 2005
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2004 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.dpml.transit;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.dpml.magic.Index;
+import net.dpml.magic.model.Definition;
+import net.dpml.magic.model.Resource;
+import net.dpml.magic.model.ResourceRef;
+import net.dpml.magic.project.Context;
+import net.dpml.magic.tasks.ContextualTask;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+
+public class MagicContainer extends ContextualTask implements
IClasspathContainer
+{
+
+ private IPath path;
+ private Definition definition;
+
+ public MagicContainer( IPath containerPath )
+ {
+ this.path = containerPath;
+ this.definition = getProjectDefinition();
+ }
+
+ public IClasspathEntry[] getClasspathEntries()
+ {
+ List entries = new ArrayList();
+ ResourceRef[] rrs = definition.getResourceRefs();
+ ArrayList resources = getResources(rrs);
+
+ //for (int i = 0; i < rs.length; i++) {
+ for(int i=0,n=resources.size();i<n;i++){
+ Resource resource = (Resource) resources.get(i);
+ org.apache.tools.ant.types.Path resourcePath =
resource.getPath(getIndex().getProject(), 0);
+ entries.add(JavaCore.newLibraryEntry(new
Path(resourcePath.toString()), null, null));
+ }
+ return (IClasspathEntry[])entries.toArray(new
IClasspathEntry[entries.size()]);
+ }
+
+ public String getDescription()
+ {
+ return "Deps [" + definition.getKey() + "]";
+ }
+
+ public int getKind()
+ {
+ return IClasspathContainer.K_APPLICATION;
+ }
+
+ public IPath getPath()
+ {
+ return path;
+ }
+
+ private Definition getProjectDefinition() {
+ Context ctx = getContext();
+ String key = ctx.getKey();
+ ResourceRef ref = new ResourceRef(key);
+ Index index = getIndex();
+ return index.getDefinition(ref);
+ }
+
+ private ArrayList getResources(ResourceRef[] rrs) {
+ ArrayList resources = new ArrayList();
+ for (int i = 0; i < rrs.length; i++) {
+// rs[i] = getHome().getResource(rrs[i]);
+ Resource r = getIndex().getResource(rrs[i]);
+ resources.add(r);
+ resources.addAll( getResources( r.getResourceRefs() ) ); //
recursive
+ }
+ return resources;
+ }
+
+}

Modified:
development/laboratory/ide/eclipse/TransitPlugin/src/transitPlugin/ArtifactURLHandler.java
==============================================================================
---
development/laboratory/ide/eclipse/TransitPlugin/src/transitPlugin/ArtifactURLHandler.java
(original)
+++
development/laboratory/ide/eclipse/TransitPlugin/src/transitPlugin/ArtifactURLHandler.java
Tue Mar 1 22:20:35 2005
@@ -36,10 +36,10 @@
public static final String JAR_SEPARATOR = "!/"; //$NON-NLS-1$
public static final String PROTOCOL_SEPARATOR = ":"; //$NON-NLS-1$

- private Handler artifactUrlHandler;
+ private Handler transitHandler;
public ArtifactURLHandler() throws TransitException {
super();
- artifactUrlHandler = new Handler() ;
+ transitHandler = new Handler() ;
}

public URLConnection openConnection(URL url) throws IOException {



  • svn commit: r1922 - in development/laboratory/ide/eclipse/TransitPlugin: . META-INF src/net/dpml/transit src/transitPlugin, pneubauer, 03/01/2005

Archive powered by MHonArc 2.6.24.

Top of Page