You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/07/13 15:26:06 UTC

svn commit: r793581 [15/23] - in /felix/trunk/sigil: ./ bld-ivy/ bld-ivy/example/ bld-ivy/example/dependence/ bld-ivy/example/dependence/dependee/ bld-ivy/example/dependence/dependee/src/ bld-ivy/example/dependence/dependee/src/standalone/ bld-ivy/exam...

Added: felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/new_system.html
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/new_system.html?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/new_system.html (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/new_system.html Mon Jul 13 13:25:46 2009
@@ -0,0 +1,31 @@
+<html>
+<header>
+<title>Creating Newton Systems</title>
+</header>
+<body bgcolor="#ffffff">
+<table width="100%">
+	<tr>
+		<td valign="bottom"><h1>Creating Newton Systems</h1></td><td align="right"><img src="../images/sigil.gif" /></td>
+	</tr>
+	<tr><td colspan="2">
+<div id="footer">
+<table cellpadding="4" cellspacing="0" border="0">
+<tr>
+<td><a href="http://www.paremus.com/License">
+          Copyright &copy; 2003-2007 Paremus Limited.</a>
+      All rights reserved.
+            <br>
+
+<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+              //  --></script>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:webmaster@paremus.com?subject=Feedback%C2%A0common/eclipse/UsingEclipsePlugin.html">webmaster@paremus.com</a>
+</div>
+</td><td nowrap class="footerLogos"></td>
+</tr>
+</table>
+</td></tr></table>
+</body>
+</html>
\ No newline at end of file

Added: felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/sigil_config.html
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/sigil_config.html?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/sigil_config.html (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/html/tasks/sigil_config.html Mon Jul 13 13:25:46 2009
@@ -0,0 +1,32 @@
+<html>
+<header>
+<title>Configuring Sigil</title>
+</header>
+<body bgcolor="#ffffff">
+<table width="100%">
+	<tr>
+		<td valign="bottom"><h1>Configuring Sigil</h1></td><td align="right"><img src="../images/sigil.gif" /></td>
+	</tr>
+	<tr><td colspan="2">
+<p>After having installed sigil, the preferences dialog should appear and ask you to specify the location of a valid newton install directory.</p>
+<div id="footer">
+<table cellpadding="4" cellspacing="0" border="0">
+<tr>
+<td><a href="http://www.paremus.com/License">
+          Copyright &copy; 2003-2007 Paremus Limited.</a>
+      All rights reserved.
+            <br>
+
+<script type="text/javascript" language="JavaScript"><!--
+              document.write(" - "+"Last Published: " + document.lastModified);
+              //  --></script>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:webmaster@paremus.com?subject=Feedback%C2%A0common/eclipse/UsingEclipsePlugin.html">webmaster@paremus.com</a>
+</div>
+</td><td nowrap class="footerLogos"></td>
+</tr>
+</table>
+</div>
+</body>
+</html>
\ No newline at end of file

Added: felix/trunk/sigil/org.cauldron.sigil.help/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/plugin.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/plugin.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/plugin.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.cheatsheets.cheatSheetContent">
+      <category
+            id="org.cauldron.sigil.help.category"
+            name="Sigil">
+      </category>
+      <cheatsheet
+            category="org.cauldron.sigil.help.category"
+            composite="false"
+            contentFile="cheatsheets/HelloWorld.xml"
+            id="org.cauldron.sigil.help.createProjectCheatSheet"
+            name="Create a Hello World composite application">
+      </cheatsheet>
+   </extension>
+</plugin>

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/AbstractNewWizardAction.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/AbstractNewWizardAction.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/AbstractNewWizardAction.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/AbstractNewWizardAction.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.cheatsheets.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+public abstract class AbstractNewWizardAction extends Action {
+
+	@Override
+	public void run() {
+		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+		
+		try {
+			INewWizard wizard = createWizard();
+			wizard.init(PlatformUI.getWorkbench(), getSelection());
+			WizardDialog dialog = new WizardDialog(shell, wizard);
+			int res = dialog.open();
+			notifyResult(res == Window.OK);
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+	}
+	
+	protected abstract INewWizard createWizard() throws CoreException;
+
+	private IStructuredSelection getSelection() {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window != null)
+		{
+			ISelection selection = window.getSelectionService().getSelection();
+			if (selection instanceof IStructuredSelection)
+			{
+				return (IStructuredSelection)selection;
+			}
+		}
+		return StructuredSelection.EMPTY;
+	}
+}
\ No newline at end of file

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/CopyResourceFromPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/CopyResourceFromPlugin.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/CopyResourceFromPlugin.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/CopyResourceFromPlugin.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.cheatsheets.actions;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+import org.eclipse.ui.part.FileEditorInput;
+import org.osgi.framework.Bundle;
+
+public class CopyResourceFromPlugin extends Action implements ICheatSheetAction {
+
+	private String targetProject;
+	private String targetFolder;
+	private String sourceBundle;
+	private String sourcePath;
+	private String editorID;
+	
+	public void run(String[] params, ICheatSheetManager manager) {
+		if ( params != null && params.length > 4 )  {
+			targetProject = params[0];
+			targetFolder = params[1];
+			sourceBundle= params[2];
+			sourcePath = params[3];
+			editorID = params[4];
+		}
+		
+		WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
+			@Override
+			protected void execute(IProgressMonitor monitor) throws CoreException {
+				try {
+					Bundle b = Platform.getBundle(sourceBundle);
+					
+				    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+				    IProject project = workspaceRoot.getProject(targetProject);
+				    IPath path = new Path( targetFolder ).append( sourcePath.substring( sourcePath.lastIndexOf( '/' ) ) );
+					IFile file = project.getFile( path );
+					
+					if ( !file.exists() ) {
+						mkdirs( (IFolder) file.getParent(), monitor );
+						
+						InputStream in = FileLocator.openStream(b, new Path(sourcePath), false);
+						file.create(in, true, monitor);
+					}
+					
+					IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+					FileEditorInput input = new FileEditorInput(file); 
+					window.getActivePage().openEditor(input, editorID);
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		try {
+			new ProgressMonitorDialog(Display.getCurrent().getActiveShell()).run(false, false, op);
+		} catch (InvocationTargetException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	private void mkdirs(IFolder folder, IProgressMonitor monitor) throws CoreException {
+		IContainer parent = folder.getParent();
+		if ( !parent.exists() ) {
+			mkdirs((IFolder) parent, monitor);			
+		}
+		
+		if ( !folder.exists() ) {
+			folder.create(true, true, monitor);
+		}
+		
+	}		
+}

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/OpenEmptySigilProjectWizardAction.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/OpenEmptySigilProjectWizardAction.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/OpenEmptySigilProjectWizardAction.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/OpenEmptySigilProjectWizardAction.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.cheatsheets.actions;
+
+import org.cauldron.sigil.ui.wizard.project.SigilProjectWizard;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+
+public class OpenEmptySigilProjectWizardAction extends AbstractNewWizardAction implements ICheatSheetAction {
+
+	private String name;
+	
+	public void run(String[] params, ICheatSheetManager manager) {
+		if ( params != null && params.length > 0 )  {
+			name = params[0];
+		}
+		
+		run();
+	}
+
+	@Override
+	protected INewWizard createWizard() throws CoreException {
+		SigilProjectWizard wizard = new SigilProjectWizard();
+		wizard.setName(name);
+		return wizard;
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ResolveProjectDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ResolveProjectDependencies.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ResolveProjectDependencies.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ResolveProjectDependencies.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.cheatsheets.actions;
+
+import org.cauldron.sigil.SigilCore;
+import org.cauldron.sigil.model.project.ISigilProjectModel;
+import org.cauldron.sigil.actions.ResolveProjectDependenciesAction;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+
+public class ResolveProjectDependencies extends Action implements ICheatSheetAction {
+
+	private String targetProject;
+	
+	public void run(String[] params, ICheatSheetManager manager) {
+		if ( params != null && params.length > 3 )  {
+			targetProject = params[0];
+		}
+
+	    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+	    IProject project = workspaceRoot.getProject(targetProject);
+	    
+	    try {
+			ISigilProjectModel sigil = SigilCore.create(project);
+			new ResolveProjectDependenciesAction(sigil, false).run();
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ShowViewAction.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ShowViewAction.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ShowViewAction.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/cheatsheets/actions/ShowViewAction.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.cheatsheets.actions;
+
+import org.cauldron.sigil.SigilCore;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+
+public class ShowViewAction extends Action implements ICheatSheetAction {
+
+	public void run(String[] params, ICheatSheetManager manager) {
+		if ( params != null && params.length > 0 )  {
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+			try {
+				page.showView(params[0]);
+			} catch (PartInitException e) {
+				SigilCore.error( "Failed to show view", e);
+			}
+		}
+
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/help/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/help/Activator.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/help/Activator.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/src/org/cauldron/sigil/help/Activator.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.help;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.cauldron.sigil.help";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: felix/trunk/sigil/org.cauldron.sigil.help/toc.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.help/toc.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.help/toc.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.help/toc.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<toc label="Sigil - Newton Development Plugin" topic="html/book.html">
+	<topic label="Configuring Sigil" href="html/tasks/sigil_config.html"/>
+	<topic label="Creating A Newton Project" href="html/tasks/new_project.html"/> 
+	<topic label="Creating SCA Composites" href="html/tasks/new_composite.html"/>
+	<topic label="Creating Newton Systems" href="html/tasks/new_system.html"/>
+	<topic label="Launching Newton" href="html/tasks/launch_newton.html"/>
+	<topic label="Viewing The Newton Log" href="html/tasks/container_log.html"/>
+	<topic label="Installing Your Composites" href="html/tasks/install_composite.html"/>	
+	<topic label="Debugging Your Composites" href="html/tasks/debug_composite.html"/>	
+</toc>

Added: felix/trunk/sigil/org.cauldron.sigil.junit/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: felix/trunk/sigil/org.cauldron.sigil.junit/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.junit</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.junit/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sigil Junit Plug-in
+Bundle-SymbolicName: org.cauldron.sigil.junit;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.cauldron.sigil.junit.activator.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.cauldron.sigil.core;bundle-version="0.7.0",
+ org.apache.ant;bundle-version="1.7.0",
+ org.junit4;bundle-version="4.3.1",
+ org.junit4.source;bundle-version="4.3.1";resolution:=optional

Added: felix/trunk/sigil/org.cauldron.sigil.junit/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: felix/trunk/sigil/org.cauldron.sigil.junit/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/plugin.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/plugin.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/plugin.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+
+</plugin>

Added: felix/trunk/sigil/org.cauldron.sigil.junit/src/org/cauldron/sigil/junit/activator/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.junit/src/org/cauldron/sigil/junit/activator/Activator.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.junit/src/org/cauldron/sigil/junit/activator/Activator.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.junit/src/org/cauldron/sigil/junit/activator/Activator.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.junit.activator;
+
+import org.cauldron.sigil.model.project.ISigilProjectModel;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.cauldron.sigil.junit";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	public static void runTests(ISigilProjectModel project) {
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.obr.feature/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr.feature/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr.feature/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr.feature/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.obr.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.obr.feature/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr.feature/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr.feature/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr.feature/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1 @@
+bin.includes = feature.xml

Added: felix/trunk/sigil/org.cauldron.sigil.obr.feature/feature.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr.feature/feature.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr.feature/feature.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr.feature/feature.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<feature
+      id="org.cauldron.sigil.obr.feature"
+      label="Sigil OBR"
+      version="0.8.0.qualifier"
+      provider-name="Paremus Ltd">
+
+   <description>
+      Sigil OBR plugin, allows Sigil to use OSGi Bundle Repositories to download OSGi bundles into the Eclipse workspace.
+   </description>
+
+   <copyright>
+      Copyright (C) 2003-2008 Paremus Limited, London, United Kingdom
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0">
+      Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+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 &quot;AS IS&quot; 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.
+   </license>
+
+   <url>
+      <update url="http://replace.with.real.url"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.cauldron.sigil.core" version="0.6.0" match="greaterOrEqual"/>
+      <import plugin="org.cauldron.sigil.ui" version="0.6.0" match="greaterOrEqual"/>
+      <import plugin="org.cauldron.bld.core" version="0.6.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.osgi"/>
+      <import plugin="org.eclipse.equinox.common" version="3.4.0" match="greaterOrEqual"/>
+   </requires>
+
+   <plugin
+         id="org.cauldron.sigil.obr"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.cauldron.bld.obr"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: felix/trunk/sigil/org.cauldron.sigil.obr/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: felix/trunk/sigil/org.cauldron.sigil.obr/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.obr</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.obr/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/.settings/org.eclipse.jdt.core.prefs?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/.settings/org.eclipse.jdt.core.prefs (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/.settings/org.eclipse.jdt.core.prefs Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+#Wed Aug 27 13:25:05 BST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: felix/trunk/sigil/org.cauldron.sigil.obr/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OBR Plug-in
+Bundle-SymbolicName: org.cauldron.sigil.obr;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.cauldron.sigil.obr.Activator
+Bundle-Vendor: Paremus Ltd
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.cauldron.sigil.core;bundle-version="0.6.0",
+ org.cauldron.sigil.ui;bundle-version="0.6.0",
+ org.cauldron.bld.core
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Import-Package: org.cauldron.bld.obr,
+ org.cauldron.sigil.model

Added: felix/trunk/sigil/org.cauldron.sigil.obr/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Added: felix/trunk/sigil/org.cauldron.sigil.obr/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/plugin.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/plugin.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/plugin.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.cauldron.sigil.repositoryprovider">
+      <provider
+            class="org.cauldron.bld.obr.OBRRepositoryProvider"
+            dynamic="true"
+            id="org.cauldron.sigil.obr.provider"
+            type="OSGi Bundle Repository (OBR)">
+      </provider>
+   </extension>
+   <extension
+         point="org.cauldron.sigil.ui.repositorywizard">
+      <wizard
+            class="org.cauldron.sigil.obr.OBRRepositoryWizard"
+            repository="org.cauldron.sigil.obr.provider">
+      </wizard>
+   </extension>
+
+</plugin>

Added: felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/Activator.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/Activator.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/Activator.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.obr;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.cauldron.sigil.obr";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Added: felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizard.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizard.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizard.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizard.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.obr;
+
+import org.cauldron.sigil.ui.wizard.repository.RepositoryWizard;
+
+public class OBRRepositoryWizard extends RepositoryWizard {
+	
+	@Override
+	public void addPages() {
+		addPage( new OBRRepositoryWizardPage(this) );
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizardPage.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizardPage.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizardPage.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.obr/src/org/cauldron/sigil/obr/OBRRepositoryWizardPage.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.obr;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.cauldron.sigil.ui.wizard.repository.RepositoryWizard;
+import org.cauldron.sigil.ui.wizard.repository.RepositoryWizardPage;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+
+public class OBRRepositoryWizardPage extends RepositoryWizardPage implements IWizardPage {
+
+	private StringFieldEditor urlEditor;
+	private StringFieldEditor cacheEditor;
+
+	protected OBRRepositoryWizardPage(RepositoryWizard parent) {
+		super("OSGi Bundle Repository", parent);
+	}
+
+	@Override
+	public void createFieldEditors() {
+		createField( urlEditor = new StringFieldEditor("url", "URL:", getFieldEditorParent()) );
+		createField( cacheEditor = new DirectoryFieldEditor("cache", "Cache:", getFieldEditorParent()) );
+		addField( new BooleanFieldEditor( "inmemory", "In Memory:", getFieldEditorParent() ));
+	}
+
+	private void createField(StringFieldEditor editor) {
+		editor.getTextControl(getFieldEditorParent()).addModifyListener( new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				checkPageComplete();
+			}
+		});
+		addField(editor);
+	}
+
+	@Override
+	protected void checkPageComplete() {
+		super.checkPageComplete();
+		if ( isPageComplete() && checkURLComplete() ) {
+			checkCacheComplete();
+		}
+	}
+
+	private boolean checkCacheComplete() {
+		setPageComplete(cacheEditor.getStringValue().length() > 0);
+		
+		if ( isPageComplete() ) {
+			if ( new File( cacheEditor.getStringValue() ).isDirectory() ) {
+				setErrorMessage(null);				
+			}
+			else {
+				setErrorMessage("Invalid cache directory");
+				setPageComplete(false);
+			}
+		}
+		
+		return isPageComplete();
+	}
+
+	private boolean checkURLComplete() {
+		setPageComplete(urlEditor.getStringValue().length() > 0);
+		
+		if ( isPageComplete() ) {
+			try {
+				new URL(urlEditor.getStringValue());
+				setErrorMessage(null);
+			}
+			catch (MalformedURLException e) {
+				if ( !new File(urlEditor.getStringValue()).isFile() ) {
+					setErrorMessage("Invalid repository url: " + e.getMessage());
+					setPageComplete(false);
+				}
+			}
+		}
+		
+		return isPageComplete();
+	}
+
+	@Override
+	public void storeFields() {
+		super.storeFields();
+		IPath dir = Activator.getDefault().getStateLocation();
+		getModel().getPreferences().setValue( "index", dir.append( getModel().getId() + ".obr" ).toOSString() );
+	}
+	
+}

Added: felix/trunk/sigil/org.cauldron.sigil.search/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="lib" path="lib/bcel-5.2.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: felix/trunk/sigil/org.cauldron.sigil.search/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.search</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.search/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/.settings/org.eclipse.jdt.core.prefs?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/.settings/org.eclipse.jdt.core.prefs (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/.settings/org.eclipse.jdt.core.prefs Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+#Fri Oct 03 18:13:19 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: felix/trunk/sigil/org.cauldron.sigil.search/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Search Plug-in
+Bundle-SymbolicName: org.cauldron.sigil.search;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.cauldron.sigil.search.SigilSearch
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jdt.core;bundle-version="3.4.0",
+ org.cauldron.sigil.core;bundle-version="0.7.0",
+ org.cauldron.bld.core;bundle-version="0.7.0",
+ org.eclipse.core.resources;bundle-version="3.4.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.cauldron.sigil.search
+Bundle-ClassPath: lib/bcel-5.2.jar,
+ .

Added: felix/trunk/sigil/org.cauldron.sigil.search/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/bcel-5.2.jar

Added: felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/ISearchResult.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/ISearchResult.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/ISearchResult.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/ISearchResult.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.search;
+
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.model.osgi.IPackageExport;
+
+public interface ISearchResult {
+	ISigilBundle getProvider();
+	IPackageExport getExport();
+	String getPackageName();
+	String getClassName();
+}

Added: felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/SigilSearch.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/SigilSearch.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/SigilSearch.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/SigilSearch.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.search;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.regex.Pattern;
+
+import org.apache.bcel.classfile.ClassParser;
+import org.apache.bcel.classfile.JavaClass;
+import org.cauldron.sigil.SigilCore;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.model.osgi.IPackageExport;
+import org.cauldron.sigil.model.project.ISigilProjectModel;
+import org.cauldron.sigil.model.util.JavaHelper;
+import org.cauldron.sigil.repository.IBundleRepository;
+import org.cauldron.sigil.repository.IRepositoryChangeListener;
+import org.cauldron.sigil.repository.IRepositoryVisitor;
+import org.cauldron.sigil.repository.RepositoryChangeEvent;
+import org.cauldron.sigil.search.index.Index;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class SigilSearch extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.cauldron.sigil.search";
+
+	private static final String CLASS_EXTENSION = ".class";
+
+	// The shared instance
+	private static SigilSearch plugin;
+	private static Index index;
+
+	/**
+	 * The constructor
+	 */
+	public SigilSearch() {
+	}
+	
+	public static List<ISearchResult> findProviders(String fullyQualifiedName, ISigilProjectModel sigil, IProgressMonitor monitor) {
+		listen(sigil);
+		return index.findProviders(fullyQualifiedName, monitor);
+	}
+	
+	public static List<ISearchResult> findProviders(Pattern namePattern, ISigilProjectModel sigil, IProgressMonitor monitor) {
+		listen(sigil);
+		return index.findProviders(namePattern, monitor);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static SigilSearch getDefault() {
+		return plugin;
+	}
+	
+	private static void listen(ISigilProjectModel sigil) {
+		synchronized(plugin) {
+			if ( index == null ) {
+				index = new Index();
+				for ( IBundleRepository rep : SigilCore.getRepositoryManager(sigil).getRepositories() ) {
+					index(index, rep);
+				}
+				
+				SigilCore.getRepositoryManager(sigil).addRepositoryChangeListener( new IRepositoryChangeListener() {
+					public void repositoryChanged(RepositoryChangeEvent event) {
+						index(index, event.getRepository());
+					}					
+				});
+			}
+		}
+	}
+
+	private static void index(final Index index, final IBundleRepository rep) {
+		index.delete(rep);
+		rep.accept( new IRepositoryVisitor() {
+			public boolean visit(ISigilBundle bundle) {
+				ISigilProjectModel p = bundle.getAncestor(ISigilProjectModel.class);
+				if ( p == null ) {
+					if ( bundle.isSynchronized() ) {
+						IPath loc = bundle.getLocation();
+						if ( loc.isAbsolute() ) {
+							indexJar(rep, bundle, loc);
+						}
+					}
+				}
+				else {
+					indexProject(rep, p);
+				}
+				return true;
+			}					
+		});
+	}
+	
+	private static void indexProject(IBundleRepository rep, ISigilProjectModel sigil) {
+		try {
+			for (ICompilationUnit unit : JavaHelper.findCompilationUnits(sigil) ) {
+				IPackageFragment p = (IPackageFragment) unit.getParent();
+				ISigilBundle b = sigil.getBundle();
+				IPackageExport export = b.findExport(p.getElementName());
+				index.addEntry(unit, rep, b, export != null);
+			}
+		} catch (JavaModelException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	private static void indexJar(IBundleRepository rep, ISigilBundle bundle, IPath loc) {
+		JarFile jar = null;
+		try {
+			jar = new JarFile(loc.toOSString());
+			for (Map.Entry<JarEntry, IPackageExport> export : findExportedClasses(bundle, jar).entrySet() ) {
+				JarEntry entry = export.getKey();
+				InputStream in = null;
+				try {
+					in = jar.getInputStream(entry);
+					ClassParser parser = new ClassParser(in, entry.getName());
+					JavaClass c = parser.parse();
+					index.addEntry(c, rep, bundle, true);
+				}
+				finally {
+					if ( in != null ) {
+						in.close();
+					}
+				}
+			}
+		}
+		catch (IOException e) {
+			SigilCore.error( "Failed to read jar " + loc, e );
+		}
+		finally {
+			if ( jar != null ) {
+				try {
+					jar.close();
+				} catch (IOException e) {
+					SigilCore.error( "Failed to close jar " + loc, e );
+				}
+			}
+		}
+	}
+
+	private static Map<JarEntry, IPackageExport> findExportedClasses(ISigilBundle bundle, JarFile jar) {
+		HashMap<JarEntry, IPackageExport> found = new HashMap<JarEntry, IPackageExport>();
+		
+		IPackageExport[] exports = bundle.getBundleInfo().childrenOfType(IPackageExport.class);
+		if ( exports.length > 0 ) {
+			Arrays.sort(exports, new Comparator<IPackageExport> () {
+				public int compare(IPackageExport o1, IPackageExport o2) {
+					return -1 * o1.compareTo(o2);
+				}				
+			});
+			for (Enumeration<JarEntry> e = jar.entries(); e.hasMoreElements();) {
+				JarEntry entry = e.nextElement();
+				String className = toClassName(entry);
+				if ( className != null ) {
+					IPackageExport ex = findExport(className, exports);
+					
+					if ( found != null ) {
+						found.put( entry, ex );
+					}
+				}
+			}
+		}
+		
+		return found;
+	}
+
+	private static IPackageExport findExport(String className, IPackageExport[] exports) {
+		for ( IPackageExport e : exports ) {
+			if ( className.startsWith(e.getPackageName())) {
+				return e;
+			}
+		}
+		return null;
+	}
+
+	private static String toClassName(JarEntry entry) {
+		String name = entry.getName();
+		if ( name.endsWith(CLASS_EXTENSION) ) {
+			name = name.substring(0, name.length() - CLASS_EXTENSION.length());
+			name = name.replace('/', '.');
+			return name;
+		}
+		else {
+			return null;
+		}
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/index/Index.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/index/Index.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/index/Index.java (added)
+++ felix/trunk/sigil/org.cauldron.sigil.search/src/org/cauldron/sigil/search/index/Index.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.cauldron.sigil.search.index;
+
+import java.lang.ref.SoftReference;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.regex.Pattern;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.cauldron.sigil.model.ModelElementFactory;
+import org.cauldron.sigil.model.common.VersionRange;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.model.osgi.IPackageExport;
+import org.cauldron.sigil.model.osgi.IRequiredBundle;
+import org.cauldron.sigil.repository.IBundleRepository;
+import org.cauldron.sigil.search.ISearchResult;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.osgi.framework.Version;
+
+public class Index {
+	private HashMap<String, ClassData> primary = new HashMap<String, ClassData>();
+	private HashMap<IBundleRepository, HashSet<String>> secondary = new HashMap<IBundleRepository, HashSet<String>>();
+	
+	private final ReadWriteLock lock = new ReentrantReadWriteLock();
+	
+	static class ClassData {
+		HashMap<IBundleRepository, Set<ISearchResult>> provided = new HashMap<IBundleRepository, Set<ISearchResult>>();
+
+		void add(IBundleRepository rep, ISearchResult export) {
+			Set<ISearchResult> exports = provided.get(rep);
+			
+			if ( exports == null ) {
+				exports = new HashSet<ISearchResult>();
+				provided.put( rep, exports );
+			}
+			
+			exports.add(export);
+		}
+
+		List<ISearchResult> getResults() {
+			LinkedList<ISearchResult> exports = new LinkedList<ISearchResult>();
+			for ( Set<ISearchResult> p : provided.values() ) {
+				exports.addAll(p);
+			}
+			return exports;
+		}
+
+		void remove(IBundleRepository rep) {
+			provided.remove(rep);
+		}
+		
+		boolean isEmpty() {
+			return provided.isEmpty();
+		}
+	}
+	
+	static class SearchResult implements ISearchResult {
+		private final String className;
+		private final String packageName;
+		private final IBundleRepository rep;
+		private final String bundleSymbolicName;
+		private final Version version;
+		private final boolean exported;
+		
+		private SoftReference<ISigilBundle> bundleReference;
+		private SoftReference<IPackageExport> exportReference;
+		
+		public SearchResult(String className, IBundleRepository rep, ISigilBundle bundle, String packageName, boolean exported) {
+			this.className = className;
+			this.rep = rep;
+			this.exported = exported;
+			this.bundleSymbolicName = bundle.getBundleInfo().getSymbolicName();
+			this.version = bundle.getVersion();
+			this.packageName = packageName;
+		}
+
+		public String getClassName() {
+			return className;
+		}
+		
+		public String getPackageName() {
+			return packageName;
+		}
+
+		public IPackageExport getExport() {
+			IPackageExport ipe = null;
+			if ( exported ) {
+				ipe = exportReference == null ? null : exportReference.get();
+				if (ipe == null) {
+					ipe = getProvider().findExport(packageName);
+					exportReference = new SoftReference<IPackageExport>(ipe);
+				}
+			}
+			return ipe; 
+		}
+
+		public ISigilBundle getProvider() {
+			ISigilBundle b = bundleReference == null ? null : bundleReference.get();
+			if ( b == null ) {
+				IRequiredBundle rb = ModelElementFactory.getInstance().newModelElement(IRequiredBundle.class);
+				rb.setSymbolicName(bundleSymbolicName);
+				VersionRange versions = new VersionRange(false, version, version, false);
+				rb.setVersions(versions);
+				b = rep.findProvider(rb, 0);
+				bundleReference = new SoftReference<ISigilBundle>(b);
+			}
+			return b;
+		}
+		
+	}
+
+	public void addEntry(JavaClass c, IBundleRepository rep, ISigilBundle bundle, boolean exported) {
+		addEntry(c.getClassName(), rep, bundle, c.getPackageName(), exported);
+	}
+	
+	public void addEntry(ICompilationUnit unit, IBundleRepository rep, ISigilBundle bundle, boolean exported) {
+		String name = unit.getElementName();
+		if ( name.endsWith( ".java" ) ) {
+			name = name.substring(0, name.length() - 5 );
+		}
+		IPackageFragment p = (IPackageFragment) unit.getAncestor(IJavaElement.PACKAGE_FRAGMENT);
+		addEntry(p.getElementName() + "." + name, rep, bundle, p.getElementName(), exported);
+	}
+
+	private void addEntry(String className, IBundleRepository rep, ISigilBundle bundle, String packageName, boolean exported) {
+		List<String> keys = genKeys(className);
+		lock.writeLock().lock();
+		try {
+			for ( String key : keys ) {
+				ClassData data = primary.get(key);
+				
+				if ( data == null ) {
+					data = new ClassData();
+					primary.put(key, data);
+				}
+				
+				SearchResult result = new SearchResult(className, rep, bundle, packageName, exported);
+				data.add(rep, result);
+			}
+			
+			HashSet<String> all = secondary.get(rep);
+			if ( all == null ) {
+				all = new HashSet<String>();
+				secondary.put(rep, all);
+			}
+			all.addAll(keys);
+		}
+		finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	
+	public List<ISearchResult> findProviders(String className, IProgressMonitor monitor) {
+		lock.readLock().lock();
+		try {
+			ClassData data = primary.get(className);
+			return data == null ? Collections.<ISearchResult>emptyList() : data.getResults();
+		}
+		finally {
+			lock.readLock().unlock();
+		}
+	}	
+	
+	public List<ISearchResult> findProviders(Pattern className, IProgressMonitor monitor) {
+		lock.readLock().lock();
+		try {
+			ClassData data = primary.get(className);
+			return data == null ? Collections.<ISearchResult>emptyList() : data.getResults();
+		}
+		finally {
+			lock.readLock().unlock();
+		}
+	}
+	
+	public void delete(IBundleRepository rep) {
+		lock.writeLock().lock();
+		try {
+			Set<String> keys = secondary.remove(rep);
+			if ( keys != null ) {
+				for ( String key : keys ) {
+					ClassData data = primary.get(key);
+					data.remove(rep);
+					if ( data.isEmpty() ) {
+						primary.remove(key);
+					}
+				}
+			}
+		}
+		finally {
+			lock.writeLock().unlock();
+		}
+	}
+	
+	private List<String> genKeys(String className) {
+		LinkedList<String> keys = new LinkedList<String>();
+		keys.add(className);
+		int i = className.lastIndexOf('.');
+		if ( i != -1 ) {
+			String name = className.substring(i + 1);
+			keys.add( name );
+		}
+		return keys;
+	}
+
+}

Added: felix/trunk/sigil/org.cauldron.sigil.ui/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="org/eclipse/pde/internal/ui/parts/*"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: felix/trunk/sigil/org.cauldron.sigil.ui/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Ui Plug-in
+Bundle-SymbolicName: org.cauldron.sigil.ui;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.cauldron.sigil.ui.SigilUI
+Bundle-Vendor: Paremus Ltd
+Require-Bundle: org.cauldron.sigil.core,
+ org.cauldron.bld.core,
+ org.cauldron.sigil.utils,
+ org.cauldron.sigil.search,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.ui,
+ org.eclipse.jface.text,
+ org.eclipse.pde.ui,
+ org.eclipse.ui,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide,
+ org.eclipse.help,
+ org.eclipse.zest.core;bundle-version="[1,2)",
+ org.eclipse.zest.layouts;bundle-version="[1,2)",
+ org.eclipse.ltk.core.refactoring
+Eclipse-LazyStart: true
+Export-Package: org.cauldron.sigil.actions,
+ org.cauldron.sigil.handlers,
+ org.cauldron.sigil.ui,
+ org.cauldron.sigil.ui.util,
+ org.cauldron.sigil.ui.wizard.project,
+ org.cauldron.sigil.ui.wizard.repository
+Bundle-Localization: plugin
+

Added: felix/trunk/sigil/org.cauldron.sigil.ui/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               etc/,\
+               plugin.xml,\
+               icons/,\
+               resources/,\
+               toc.xml,\
+               html/,\
+               plugin.properties,\
+               schema/

Added: felix/trunk/sigil/org.cauldron.sigil.ui/plugin.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/plugin.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/plugin.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/plugin.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,5 @@
+repositoriesPrefPage=Repositories
+newtonRepoPrefs=Newton Repository
+librariesPrefsPage=OSGi Libraries
+commandConvertProject=Convert Project To Sigil Project
+commandRefreshClasspath=Refresh bundle classpath
\ No newline at end of file

Added: felix/trunk/sigil/org.cauldron.sigil.ui/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/plugin.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.ui/plugin.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.ui/plugin.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+   <extension-point id="org.cauldron.sigil.ui.repositorywizard" name="Repository Wizard" schema="schema/org.cauldron.sigil.ui.repositorywizard.exsd"/>
+      <extension
+         point="org.eclipse.ui.startup">
+      <startup class="org.cauldron.sigil.startup.SigilStartup"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <category
+            id="org.cauldron.sigil.newWizardCategory"
+            name="Sigil"/>
+      <wizard
+            category="org.cauldron.sigil.newWizardCategory"
+            class="org.cauldron.sigil.ui.wizard.project.SigilProjectWizard"
+            finalPerspective="org.cauldron.sigil.ui.perspective"
+            icon="etc/images/newton.png"
+            id="org.cauldron.sigil.editors.newProjectWizard"
+            name="Sigil Project"
+            project="true"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            class="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            id="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            name="Sigil"/>
+      <!--page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.ui.preferences.LibraryPreferencePage"
+            id="org.cauldron.sigil.ui.libraryPreferences"
+            name="%librariesPrefsPage" >
+      </page-->
+      <page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.ui.preferences.repository.RepositoriesPreferencePage"
+            id="org.cauldron.sigil.ui.preferences.repositoriesPreferencePage"
+            name="%repositoriesPrefPage">
+      </page>
+      <page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.ui.preferences.ExcludedResourcesPrefsPage"
+            id="org.cauldron.sigil.ui.preferences.excludedResources"
+            name="Excluded Resources">
+      </page>
+      <page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.ui.preferences.VersionsPreferencePage"
+            id="org.cauldron.sigil.ui.preferences.VersionsPreferencePage"
+            name="Version Handling">
+      </page>
+      <page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.ui.preferences.installs.OSGiInstallsPreferencePage"
+            id="org.cauldron.sigil.ui.preferences.newtonInstalls"
+            name="Newton Installs">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.cauldron.sigil.ui.editors.project.SigilProjectEditorPart"
+            default="true"
+            filenames="sigil.properties"
+            icon="etc/images/newton.png"
+            id="org.cauldron.sigil.editors.SigilProjectEditor"
+            name="Sigil Project Editor"/>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.core.classpathContainerInitializer">
+      <classpathContainerInitializer
+            class="org.cauldron.sigil.classpath.SigilClasspathContainerInitializer"
+            id="org.cauldron.sigil.core.classpathContainer"/>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.ui.classpathContainerPage">
+      <classpathContainerPage
+            class="org.cauldron.sigil.classpath.SigilLibraryPage"        id="org.cauldron.sigil.core.classpathContainer"
+            name="Sigil Library"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.cauldron.sigil.ui.perspective.SigilPerspectiveFactory"
+            icon="etc/images/newton.png"
+            id="org.cauldron.sigil.ui.perspective"
+            name="Sigil">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.ui.quickFixProcessors">
+      <quickFixProcessor
+            class="org.cauldron.sigil.ui.quickfix.ImportQuickFixProcessor"
+            id="org.cauldron.sigil.ui.quickFixProcessor1">
+      </quickFixProcessor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            allowMultiple="false"
+            category="org.cauldron.sigil.ui.views"
+            class="org.cauldron.sigil.ui.views.resolution.BundleResolverView"
+            icon="icons/jar_web_obj.png"
+            id="org.cauldron.sigil.ui.bundleDependencyView"
+            name="Bundle Dependency View"
+            restorable="true">
+      </view>
+      <view
+            allowMultiple="false"
+            category="org.cauldron.sigil.ui.views"
+            class="org.cauldron.sigil.ui.views.RepositoryViewPart"
+            icon="icons/jars_obj.png"
+            id="org.cauldron.sigil.ui.repositoryBrowser"
+            name="Repository Browser"
+            restorable="true">
+      </view>
+      <category
+            id="org.cauldron.sigil.ui.views"
+            name="Sigil">
+      </category>
+   </extension>
+   <extension
+         point="org.cauldron.sigil.ui.repositorywizard">
+      <wizard
+            class="org.cauldron.sigil.ui.internal.repository.FileSystemRepositoryWizard"
+            repository="org.cauldron.sigil.core.file">
+      </wizard>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.cauldron.sigil.ui.commands.renameComposite"
+            name="Rename Composite">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ltk.core.refactoring.refactoringContributions">
+      <contribution
+            class="org.cauldron.sigil.ui.refactor.RenameCompositeRefactoring"
+            id="org.cauldron.sigil.ui.rename.composite">
+      </contribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.propertyPages">
+      <page
+            class="org.cauldron.sigil.ui.preferences.project.ProjectPropertyPage"
+            id="org.cauldron.sigil.ui.projectpage"
+            name="Repositories">
+         <filter
+               name="projectNature"
+               value="org.cauldron.sigil.core.newtonnature"/>
+         <enabledWhen>
+            <adapt
+                  type="org.eclipse.core.resources.IProject">
+            </adapt>
+         </enabledWhen>
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="popup:org.eclipse.ui.popup.any">
+         <menu
+               icon="etc/images/newton.png"
+               label="Sigil">
+            <command
+                  commandId="org.cauldron.sigil.ui.convertproject"
+                  label="Convert Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+         </menu>
+         <separator
+               name="org.cauldron.sigil.ui.separator"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.cauldron.sigil.ui.refreshclasspath"
+               icon="icons/refreshBundle.png"
+               label="Refresh bundle classpath"
+               style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.cauldron.sigil.ui.convertproject"
+            name="%commandConvertProject">
+      </command>
+      <command
+            id="org.cauldron.sigil.ui.refreshclasspath"
+            name="%commandRefreshClasspath">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commandImages">
+      <image
+            commandId="org.cauldron.sigil.ui.convertproject"
+            icon="etc/images/newton.png">
+      </image>
+      <image
+            commandId="org.cauldron.sigil.ui.refreshclasspath"
+            icon="etc/images/newton.png">
+      </image>
+   </extension>
+   
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.cauldron.sigil.handlers.project.ConvertProjectHandler"
+            commandId="org.cauldron.sigil.ui.convertproject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="and">
+					<instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                </instanceof>
+		            <test
+						property="org.cauldron.sigil.isSigilProject"
+						value="false">
+					</test>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+      <handler
+            class="org.cauldron.sigil.handlers.project.RefreshSigilClasspathHandler"
+            commandId="org.cauldron.sigil.ui.refreshclasspath">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="and">
+					<instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                </instanceof>
+		            <test
+						property="org.cauldron.sigil.isSigilProject"
+						value="true">
+					</test>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+   </extension>   
+</plugin>

Added: felix/trunk/sigil/org.cauldron.sigil.ui/resources/org/cauldron/sigil/ui/SigilUI.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.ui/resources/org/cauldron/sigil/ui/SigilUI.properties?rev=793581&view=auto
==============================================================================
    (empty)