felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsav...@apache.org
Subject svn commit: r989695 - in /felix/trunk/sigil/eclipse: core/ core/schema/ core/src/org/apache/felix/sigil/eclipse/ core/src/org/apache/felix/sigil/eclipse/internal/model/project/ core/src/org/apache/felix/sigil/eclipse/internal/model/repository/ core/src...
Date Thu, 26 Aug 2010 13:56:06 GMT
Author: dsavage
Date: Thu Aug 26 13:56:05 2010
New Revision: 989695

URL: http://svn.apache.org/viewvc?rev=989695&view=rev
Log:
further work towards FELIX-1355 - now projects can compile against repositories defined in sigil.properties files as well as those defined in eclipse preferences

Added:
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/EclipseRepositoryConfig.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryFactory.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/RepositoryMap.java
      - copied, changed from r988955, felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/RepositoryMap.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/IRepositoryMap.java
Removed:
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/RepositoryMap.java
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/internal/preferences/project/
Modified:
    felix/trunk/sigil/eclipse/core/plugin.xml
    felix/trunk/sigil/eclipse/core/schema/org.apache.felix.sigil.repositoryprovider.exsd
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java
    felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java
    felix/trunk/sigil/eclipse/obr/plugin.xml
    felix/trunk/sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/OSGiLauncher.java
    felix/trunk/sigil/eclipse/ui/plugin.xml
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/wizard/repository/RepositoryWizardPage.java

Modified: felix/trunk/sigil/eclipse/core/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/plugin.xml?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/plugin.xml (original)
+++ felix/trunk/sigil/eclipse/core/plugin.xml Thu Aug 26 13:56:05 2010
@@ -75,18 +75,21 @@
             defaultLevel="-3"
             dynamic="false"
             id="org.apache.felix.sigil.core.workspaceprovider"
+            alias="project"
             type="Workspace Repository">
       </provider>
       <provider
             class="org.apache.felix.sigil.common.core.repository.FileSystemRepositoryProvider"
             dynamic="true"
             id="org.apache.felix.sigil.core.file"
+            alias="filesystem"
             type="File System Repository">
       </provider>
       <provider
             class="org.apache.felix.sigil.common.core.repository.SystemRepositoryProvider"
             dynamic="false"
             id="org.apache.felix.sigil.core.system"
+            alias="system"
             type="System Repository">
       </provider>
    </extension>

Modified: felix/trunk/sigil/eclipse/core/schema/org.apache.felix.sigil.repositoryprovider.exsd
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/schema/org.apache.felix.sigil.repositoryprovider.exsd?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/schema/org.apache.felix.sigil.repositoryprovider.exsd (original)
+++ felix/trunk/sigil/eclipse/core/schema/org.apache.felix.sigil.repositoryprovider.exsd Thu Aug 26 13:56:05 2010
@@ -1,22 +1,4 @@
 <?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.
--->
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.apache.felix.sigil.eclipse.core" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
@@ -74,6 +56,13 @@
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="alias" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
          <attribute name="type" type="string" use="required">
             <annotation>
                <documentation>

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/SigilCore.java Thu Aug 26 13:56:05 2010
@@ -26,7 +26,6 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Locale;
 import java.util.ResourceBundle;
 import java.util.Set;
@@ -47,8 +46,7 @@ import org.apache.felix.sigil.eclipse.in
 import org.apache.felix.sigil.eclipse.internal.model.project.SigilProject;
 import org.apache.felix.sigil.eclipse.internal.model.repository.RepositoryConfiguration;
 import org.apache.felix.sigil.eclipse.internal.repository.eclipse.GlobalRepositoryManager;
-import org.apache.felix.sigil.eclipse.internal.repository.eclipse.RepositoryMap;
-import org.apache.felix.sigil.eclipse.internal.repository.eclipse.SigilRepositoryManager;
+import org.apache.felix.sigil.eclipse.internal.repository.manager.RepositoryMap;
 import org.apache.felix.sigil.eclipse.internal.resources.ProjectResourceListener;
 import org.apache.felix.sigil.eclipse.internal.resources.SigilProjectManager;
 import org.apache.felix.sigil.eclipse.model.project.ISigilModelRoot;
@@ -141,8 +139,6 @@ public class SigilCore extends AbstractU
     public static final String PREFERENCES_REMOVE_IMPORT_FOR_EXPORT = BASE
         + ".removeImportForExport";
 
-    private static final Object NULL = new Object();
-
     // The shared instance
     private static SigilCore plugin;
 
@@ -153,7 +149,6 @@ public class SigilCore extends AbstractU
     private static SigilProjectManager projectManager;
     private static OSGiInstallManager installs;
     private static ISigilModelRoot modelRoot;
-    private static HashMap<Object, SigilRepositoryManager> repositoryManagers = new HashMap<Object, SigilRepositoryManager>();
     private static GlobalRepositoryManager globalRepositoryManager;
     private static RepositoryMap repositoryMap;
 
@@ -316,13 +311,6 @@ public class SigilCore extends AbstractU
             serializerTracker = null;
         }
 
-        for (SigilRepositoryManager m : repositoryManagers.values())
-        {
-            m.destroy();
-        }
-
-        repositoryManagers.clear();
-
         globalRepositoryManager.destroy();
         globalRepositoryManager = null;
 
@@ -435,48 +423,18 @@ public class SigilCore extends AbstractU
         return globalRepositoryManager;
     }
 
-    public static IRepositoryManager getRepositoryManager(String set)
+    public static IRepositoryManager getRepositoryManager(ISigilProjectModel model)
     {
-        SigilRepositoryManager manager = null;
-
-        if (set == null)
-        {
-            manager = repositoryManagers.get(NULL);
-            if (manager == null)
-            {
-                manager = new SigilRepositoryManager(null, repositoryMap);
-                manager.initialise();
-                repositoryManagers.put(NULL, manager);
-            }
-        }
-        else
+        if ( model == null ) return globalRepositoryManager;
+        try
         {
-            manager = repositoryManagers.get(set);
-
-            if (manager == null)
-            {
-                manager = new SigilRepositoryManager(set, repositoryMap);
-                manager.initialise();
-                repositoryManagers.put(set, manager);
-            }
+            return model.getRepositoryManager(repositoryMap);
         }
-
-        return manager;
-    }
-
-    public static IRepositoryManager getRepositoryManager(ISigilProjectModel model)
-    {
-        return getRepositoryManager(loadProjectRepositorySet(model));
-    }
-
-    private static String loadProjectRepositorySet(ISigilProjectModel model)
-    {
-        if (model == null)
+        catch (CoreException e)
         {
-            return null;
+            warn("Failed to build repository manager for " + model, e);
+            return globalRepositoryManager;
         }
-
-        return model.getPreferences().get(REPOSITORY_SET, null);
     }
 
     public static IRepositoryConfiguration getRepositoryConfiguration()

Added: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/EclipseRepositoryConfig.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/EclipseRepositoryConfig.java?rev=989695&view=auto
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/EclipseRepositoryConfig.java (added)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/EclipseRepositoryConfig.java Thu Aug 26 13:56:05 2010
@@ -0,0 +1,157 @@
+/*
+ * 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.apache.felix.sigil.eclipse.internal.model.project;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.felix.sigil.common.config.IRepositoryConfig;
+import org.apache.felix.sigil.eclipse.SigilCore;
+import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * @author dave
+ *
+ */
+public class EclipseRepositoryConfig implements IRepositoryConfig
+{
+
+    private final IRepositoryConfig projectConfig;
+    
+    public EclipseRepositoryConfig(IRepositoryConfig projectConfig) {
+        this.projectConfig = projectConfig;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.felix.sigil.common.config.IRepositoryConfig#getAllRepositories()
+     */
+    public List<String> getAllRepositories()
+    {
+        ArrayList<String> list = new ArrayList<String>(readRepositories().keySet());
+        list.addAll(projectConfig.getAllRepositories());
+        return list;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.felix.sigil.common.config.IRepositoryConfig#getRepositoryConfig(java.lang.String)
+     */
+    public Properties getRepositoryConfig(String name)
+    {
+        Properties props = projectConfig.getRepositoryConfig(name);
+        if ( props.isEmpty() ) {
+            props = readRepositories().get(name);
+        }
+        return props;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.felix.sigil.common.config.IRepositoryConfig#getRepositoryDefinition(java.lang.String)
+     */
+    public URI getRepositoryDefinition(String name)
+    {
+        URI def = projectConfig.getRepositoryDefinition(name);
+        if ( def == null ) {
+            if ( readRepositories().containsKey(name) ) {
+                def = URI.create("sigil:eclipse:preferences");
+            }
+        }
+        return def;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.felix.sigil.common.config.IRepositoryConfig#getRepositoryPath()
+     */
+    public List<String> getRepositoryPath()
+    {
+        return projectConfig.getRepositoryPath();
+    }
+
+    private Map<String, Properties> readRepositories() {
+        HashMap<String, Properties> repos = new HashMap<String, Properties>();
+        IPreferenceStore prefs = SigilCore.getDefault().getPreferenceStore();
+
+        IRepositoryModel[] models = findRepositories();
+        for (IRepositoryModel repo : models)
+        {
+            try
+            {
+                String id = repo.getId();
+                Properties pref = null;
+                if (repo.getType().isDynamic())
+                {
+                    String instance = "repository." + repo.getType().getId() + "." + id;
+                    String loc = prefs.getString(instance + ".loc");
+                    pref = loadPreferences(loc);
+                }
+                else
+                {
+                    pref = new Properties();
+                }
+                
+                repos.put(id, pref);
+            }
+            catch (IOException e)
+            {
+                SigilCore.error("Failed to load repository for " + repo, e);
+            }
+        }
+        
+        return repos;
+    }
+    
+    private IRepositoryModel[] findRepositories()
+    {
+        return SigilCore.getRepositoryConfiguration().getDefaultRepositorySet().getRepositories();
+    }
+    
+    private Properties loadPreferences(String loc) throws FileNotFoundException,
+    IOException
+    {
+        FileInputStream in = null;
+        try
+        {
+            Properties pref = new Properties();
+            pref.load(new FileInputStream(loc));
+            return pref;
+        }
+        finally
+        {
+            if (in != null)
+            {
+                try
+                {
+                    in.close();
+                }
+                catch (IOException e)
+                {
+                    SigilCore.error("Failed to close file", e);
+                }
+            }
+        }
+    }    
+}

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/project/SigilProject.java Thu Aug 26 13:56:05 2010
@@ -33,6 +33,7 @@ import java.util.regex.Matcher;
 
 import org.apache.felix.sigil.common.config.BldFactory;
 import org.apache.felix.sigil.common.config.IBldProject;
+import org.apache.felix.sigil.common.config.IRepositoryConfig;
 import org.apache.felix.sigil.common.model.AbstractCompoundModelElement;
 import org.apache.felix.sigil.common.model.ICapabilityModelElement;
 import org.apache.felix.sigil.common.model.IModelElement;
@@ -50,7 +51,9 @@ import org.apache.felix.sigil.common.rep
 import org.apache.felix.sigil.common.repository.ResolutionException;
 import org.apache.felix.sigil.eclipse.PathUtil;
 import org.apache.felix.sigil.eclipse.SigilCore;
+import org.apache.felix.sigil.eclipse.internal.repository.manager.EclipseRepositoryManager;
 import org.apache.felix.sigil.eclipse.job.ThreadProgressMonitor;
+import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap;
 import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel;
 import org.apache.felix.sigil.eclipse.model.util.JavaHelper;
 import org.apache.felix.sigil.eclipse.progress.ProgressAdapter;
@@ -60,16 +63,12 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener;
 import org.eclipse.jdt.core.ClasspathContainerInitializer;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaElement;
@@ -80,7 +79,6 @@ import org.eclipse.jdt.core.IParent;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.osgi.framework.Version;
-import org.osgi.service.prefs.Preferences;
 
 /**
  * @author dave
@@ -97,8 +95,6 @@ public class SigilProject extends Abstra
 
     private ISigilBundle bundle;
 
-    private IEclipsePreferences preferences;
-
     private List<IRequirementModelElement> lastReqs = new LinkedList<IRequirementModelElement>();
     private List<ICapabilityModelElement> lastCaps = new LinkedList<ICapabilityModelElement>();
 
@@ -329,59 +325,6 @@ public class SigilProject extends Abstra
         marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
     }
 
-    /**
-     * Returns the project custom preference pool.
-     * Project preferences may include custom encoding.
-     * @return IEclipsePreferences or <code>null</code> if the project
-     * 	does not have a java nature.
-     */
-    public Preferences getPreferences()
-    {
-        synchronized (this)
-        {
-            if (preferences == null)
-            {
-                preferences = loadPreferences();
-            }
-
-            return preferences;
-        }
-    }
-
-    /**
-     * @return
-     */
-    private synchronized IEclipsePreferences loadPreferences()
-    {
-        IScopeContext context = new ProjectScope(getProject());
-        final IEclipsePreferences eclipsePreferences = context.getNode(SigilCore.PLUGIN_ID);
-
-        // Listen to node removal from parent in order to reset cache
-        INodeChangeListener nodeListener = new IEclipsePreferences.INodeChangeListener()
-        {
-            public void added(IEclipsePreferences.NodeChangeEvent event)
-            {
-                // do nothing
-            }
-
-            public void removed(IEclipsePreferences.NodeChangeEvent event)
-            {
-                if (event.getChild() == eclipsePreferences)
-                {
-                    synchronized (SigilProject.this)
-                    {
-                        preferences = null;
-                    }
-                    ((IEclipsePreferences) eclipsePreferences.parent()).removeNodeChangeListener(this);
-                }
-            }
-        };
-
-        ((IEclipsePreferences) eclipsePreferences.parent()).addNodeChangeListener(nodeListener);
-
-        return eclipsePreferences;
-    }
-
     public Collection<IClasspathEntry> findExternalClasspath(IProgressMonitor monitor)
         throws CoreException
     {
@@ -728,6 +671,24 @@ public class SigilProject extends Abstra
         }
     }
 
+    public IRepositoryConfig getRepositoryConfig() throws CoreException
+    {
+        try
+        {
+            return BldFactory.getConfig(project.getFile(IBldProject.PROJECT_FILE).getLocationURI());
+        }
+        catch (IOException e)
+        {
+            throw SigilCore.newCoreException("Failed to get project file: ", e);
+        }
+    }
+    
+    public IRepositoryManager getRepositoryManager(IRepositoryMap repositoryMap) throws CoreException {
+        IRepositoryConfig config = getRepositoryConfig();
+        config = new EclipseRepositoryConfig(config);
+        return new EclipseRepositoryManager(config, repositoryMap);
+    }
+    
     public boolean isInBundleClasspath(IPackageFragment root) throws JavaModelException
     {
         if (getBundle().getClasspathEntrys().isEmpty())

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryConfiguration.java Thu Aug 26 13:56:05 2010
@@ -139,9 +139,10 @@ public class RepositoryConfiguration imp
                 String type = c.getAttribute("type");
                 boolean dynamic = Boolean.valueOf(c.getAttribute("dynamic"));
                 String icon = c.getAttribute("icon");
+                String provider = c.getAttribute("alias");
                 Image image = (icon == null || icon.trim().length() == 0) ? null
                     : loadImage(e, icon);
-                repositories.add(new RepositoryType(id, type, dynamic, image));
+                repositories.add(new RepositoryType(id, provider, type, dynamic, image));
             }
         }
 
@@ -160,7 +161,6 @@ public class RepositoryConfiguration imp
 
     public IRepositorySet getDefaultRepositorySet()
     {
-        //int level = findLevel( key + LEVEL, type, prefs );
         ArrayList<IRepositoryModel> reps = new ArrayList<IRepositoryModel>();
         for (String s : PrefsUtils.stringToArray(getPreferences().getString(
             REPOSITORY_DEFAULT_SET)))

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/model/repository/RepositoryType.java Thu Aug 26 13:56:05 2010
@@ -24,16 +24,18 @@ import org.eclipse.swt.graphics.Image;
 
 public class RepositoryType implements IRepositoryType
 {
-    private String type;
-    private String id;
-    private Image icon;
-    private boolean dynamic;
+    private final String type;
+    private final String id;
+    private final String provider;
+    private final Image icon;
+    private final boolean dynamic;
 
-    public RepositoryType(String id, String type, boolean dynamic, Image icon)
+    public RepositoryType(String id, String provider, String type, boolean dynamic, Image icon)
     {
         this.id = id;
         this.type = type;
         this.dynamic = dynamic;
+        this.provider = provider;
         this.icon = icon;
     }
 
@@ -41,6 +43,10 @@ public class RepositoryType implements I
     {
         return type;
     }
+    
+    public String getProvider() {
+        return provider;
+    }
 
     public String getId()
     {

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/GlobalRepositoryManager.java Thu Aug 26 13:56:05 2010
@@ -24,6 +24,7 @@ import java.util.List;
 import org.apache.felix.sigil.common.repository.IRepositoryManager;
 import org.apache.felix.sigil.eclipse.SigilCore;
 import org.apache.felix.sigil.eclipse.internal.repository.eclipse.SigilRepositoryManager;
+import org.apache.felix.sigil.eclipse.internal.repository.manager.RepositoryMap;
 import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel;
 
 public class GlobalRepositoryManager extends SigilRepositoryManager implements IRepositoryManager

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/SigilRepositoryManager.java Thu Aug 26 13:56:05 2010
@@ -32,7 +32,8 @@ import org.apache.felix.sigil.common.rep
 import org.apache.felix.sigil.common.repository.IRepositoryProvider;
 import org.apache.felix.sigil.common.repository.RepositoryException;
 import org.apache.felix.sigil.eclipse.SigilCore;
-import org.apache.felix.sigil.eclipse.internal.repository.eclipse.RepositoryMap.RepositoryCache;
+import org.apache.felix.sigil.eclipse.internal.repository.manager.RepositoryMap;
+import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap.RepositoryCache;
 import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel;
 import org.apache.felix.sigil.eclipse.model.repository.IRepositorySet;
 import org.apache.felix.sigil.eclipse.model.repository.IRepositoryType;

Added: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryFactory.java?rev=989695&view=auto
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryFactory.java (added)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryFactory.java Thu Aug 26 13:56:05 2010
@@ -0,0 +1,62 @@
+/*
+ * 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.apache.felix.sigil.eclipse.internal.repository.manager;
+
+import org.apache.felix.sigil.common.repository.IRepositoryProvider;
+import org.apache.felix.sigil.eclipse.SigilCore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author dave
+ *
+ */
+public class EclipseRepositoryFactory
+{
+
+    /**
+     * @param alias
+     * @return
+     */
+    public static IRepositoryProvider getProvider(String alias)
+    throws CoreException
+    {
+        IExtensionRegistry registry = Platform.getExtensionRegistry();
+        IExtensionPoint p = registry.getExtensionPoint(SigilCore.REPOSITORY_PROVIDER_EXTENSION_POINT_ID);
+
+        for (IExtension e : p.getExtensions())
+        {
+            for (IConfigurationElement c : e.getConfigurationElements())
+            {
+                if (alias.equals(c.getAttribute("alias")))
+                {
+                    IRepositoryProvider provider = (IRepositoryProvider) c.createExecutableExtension("class");
+                    return provider;
+                }
+            }
+        }
+
+        return null;
+    }
+}

Added: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryManager.java?rev=989695&view=auto
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryManager.java (added)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/EclipseRepositoryManager.java Thu Aug 26 13:56:05 2010
@@ -0,0 +1,173 @@
+/*
+ * 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.apache.felix.sigil.eclipse.internal.repository.manager;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.felix.sigil.common.config.IRepositoryConfig;
+import org.apache.felix.sigil.common.repository.AbstractRepositoryManager;
+import org.apache.felix.sigil.common.repository.IBundleRepository;
+import org.apache.felix.sigil.common.repository.IRepositoryProvider;
+import org.apache.felix.sigil.common.repository.RepositoryException;
+import org.apache.felix.sigil.eclipse.SigilCore;
+import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap;
+import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap.RepositoryCache;
+
+/**
+ * @author dave
+ *
+ */
+public class EclipseRepositoryManager extends AbstractRepositoryManager
+{
+    private final IRepositoryConfig config;
+    private final IRepositoryMap repositoryMap;
+    
+    /**
+     * @param config
+     * @param repositoryMap2 
+     */
+    public EclipseRepositoryManager(IRepositoryConfig config, IRepositoryMap repositoryMap)
+    {
+        this.config = config;
+        this.repositoryMap = repositoryMap;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.felix.sigil.common.repository.AbstractRepositoryManager#loadRepositories()
+     */
+    @Override
+    protected void loadRepositories()
+    {
+        List<IBundleRepository> list = new ArrayList<IBundleRepository>();
+        scanRepositories(config.getRepositoryPath(), list);
+        setRepositories(list.toArray(new IBundleRepository[list.size()]));
+    }
+    
+    /**
+     * @param list 
+     * @param config2
+     * @param i
+     */
+    private void scanRepositories(List<String> path, List<IBundleRepository> list)
+    {
+        for (String name : path)
+        {
+            if ( IRepositoryConfig.WILD_CARD.equals(name) ) {
+                HashSet<String> defined = new HashSet<String>();
+                for (String n : path) {
+                    if (!IRepositoryConfig.WILD_CARD.equals(n)) {
+                        defined.add(n);
+                    }
+                }
+                List<String> subpath = new LinkedList<String>();
+                for (String key : config.getAllRepositories()) {
+                    if (!defined.contains(key))
+                    {
+                        subpath.add(key);
+                    }
+                }
+                scanRepositories(subpath, list);
+            }
+            else {
+                Properties props = config.getRepositoryConfig(name);
+                String uid = config.getRepositoryDefinition(name).toString() + name;
+                IBundleRepository repo = buildRepository(uid, name, props);
+                
+                if ( repo != null ) {
+                    list.add(repo);
+                }                
+            }
+        }
+    }
+
+    /**
+     * @param repo
+     * @return 
+     */
+    private IBundleRepository buildRepository(String uid, String name, Properties repo)
+    {
+        String disabled = repo.getProperty("disabled");
+        if ("true".equalsIgnoreCase(disabled == null ? null : disabled.trim())) return null;
+        
+        String optStr = repo.getProperty("optional", "false");
+        boolean optional = Boolean.parseBoolean(optStr.trim());
+
+        String alias = repo.getProperty(IRepositoryConfig.REPOSITORY_PROVIDER);
+        if (alias == null)
+        {
+            String msg = "provider not specified for repository: " + name;
+            
+            if (optional)            
+                SigilCore.log(msg);
+            else
+                SigilCore.warn(msg);
+        }
+
+        try
+        {
+            IRepositoryProvider instance = EclipseRepositoryFactory.getProvider(alias);
+            IBundleRepository repository = loadRepository(uid, name, repo, instance);
+            return repository;
+        }
+        catch (Exception e)
+        {
+            String msg = "failed to create repository: ";
+            
+            if (optional)            
+                SigilCore.log(msg + e);
+            else
+                SigilCore.warn(msg, e);
+        }
+        
+        return null;
+    }
+    
+    private IBundleRepository loadRepository(String uid, String id, Properties pref,
+        IRepositoryProvider provider) throws RepositoryException
+    {
+        try
+        {
+            if (pref == null)
+            {
+                pref = new Properties();
+            }
+
+            RepositoryCache cache = repositoryMap.get(uid);
+
+            if (cache == null || !cache.pref.equals(pref))
+            {
+                IBundleRepository repo = provider.createRepository(id, pref);
+                cache = new RepositoryCache(pref, repo);
+                repositoryMap.put(uid, cache);
+            }
+
+            return cache.repo;
+        }
+        catch (RuntimeException e)
+        {
+            throw new RepositoryException("Failed to build repositories", e);
+        }
+    }
+    
+}

Copied: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/RepositoryMap.java (from r988955, felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/RepositoryMap.java)
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/RepositoryMap.java?p2=felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/RepositoryMap.java&p1=felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/RepositoryMap.java&r1=988955&r2=989695&rev=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/eclipse/RepositoryMap.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/internal/repository/manager/RepositoryMap.java Thu Aug 26 13:56:05 2010
@@ -17,32 +17,19 @@
  * under the License.
  */
 
-package org.apache.felix.sigil.eclipse.internal.repository.eclipse;
+package org.apache.felix.sigil.eclipse.internal.repository.manager;
 
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Properties;
 
-import org.apache.felix.sigil.common.repository.IBundleRepository;
+import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap;
 
-public class RepositoryMap
+public class RepositoryMap implements IRepositoryMap
 {
-    static class RepositoryCache
-    {
-        final Properties pref;
-        final IBundleRepository repo;
-
-        RepositoryCache(Properties pref, IBundleRepository repo)
-        {
-            this.pref = pref;
-            this.repo = repo;
-        }
-    }
-
     private HashMap<String, RepositoryCache> cachedRepositories = new HashMap<String, RepositoryCache>();
 
-    synchronized void retainAll(Collection<String> ids)
+    public synchronized void retainAll(Collection<String> ids)
     {
         for (Iterator<String> i = cachedRepositories.keySet().iterator(); i.hasNext();)
         {
@@ -53,12 +40,12 @@ public class RepositoryMap
         }
     }
 
-    synchronized RepositoryCache get(String id)
+    public synchronized RepositoryCache get(String id)
     {
         return cachedRepositories.get(id);
     }
 
-    synchronized void put(String id, RepositoryCache cache)
+    public synchronized void put(String id, RepositoryCache cache)
     {
         cachedRepositories.put(id, cache);
     }

Added: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/IRepositoryMap.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/IRepositoryMap.java?rev=989695&view=auto
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/IRepositoryMap.java (added)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/IRepositoryMap.java Thu Aug 26 13:56:05 2010
@@ -0,0 +1,57 @@
+/*
+ * 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.apache.felix.sigil.eclipse.model.project;
+
+import java.util.Properties;
+
+import org.apache.felix.sigil.common.repository.IBundleRepository;
+
+/**
+ * @author dave
+ *
+ */
+public interface IRepositoryMap
+{
+
+    public static class RepositoryCache
+    {
+        public final Properties pref;
+        public final IBundleRepository repo;
+
+        public RepositoryCache(Properties pref, IBundleRepository repo)
+        {
+            this.pref = pref;
+            this.repo = repo;
+        }
+    }
+
+    /**
+     * @param uid
+     * @return
+     */
+    RepositoryCache get(String uid);
+
+    /**
+     * @param uid
+     * @param cache
+     */
+    void put(String uid, RepositoryCache cache);
+
+}

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/project/ISigilProjectModel.java Thu Aug 26 13:56:05 2010
@@ -22,10 +22,12 @@ package org.apache.felix.sigil.eclipse.m
 import java.util.Collection;
 
 import org.apache.felix.sigil.common.config.IBldProject;
+import org.apache.felix.sigil.common.config.IRepositoryConfig;
 import org.apache.felix.sigil.common.core.BldCore;
 import org.apache.felix.sigil.common.model.ICompoundModelElement;
 import org.apache.felix.sigil.common.model.IModelElement;
 import org.apache.felix.sigil.common.model.eclipse.ISigilBundle;
+import org.apache.felix.sigil.common.repository.IRepositoryManager;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -35,7 +37,6 @@ import org.eclipse.jdt.core.IJavaProject
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaModelException;
 import org.osgi.framework.Version;
-import org.osgi.service.prefs.Preferences;
 
 /**
  * Represents a sigil project. To get a reference to a ISigilProjectModel you can use the 
@@ -55,8 +56,6 @@ public interface ISigilProjectModel exte
     // shortcut to getProject().getName()
     String getName();
 
-    Preferences getPreferences();
-
     /**
      * 
      * @param monitor
@@ -113,6 +112,18 @@ public interface ISigilProjectModel exte
 
     IBldProject getBldProject() throws CoreException;
 
+    /**
+     * @return
+     */
+    IRepositoryConfig getRepositoryConfig() throws CoreException;
+    
     Collection<IClasspathEntry> findExternalClasspath(IProgressMonitor monitor)
         throws CoreException;
+
+    /**
+     * @param repositoryMap 
+     * @return
+     * @throws CoreException 
+     */
+    IRepositoryManager getRepositoryManager(IRepositoryMap repositoryMap) throws CoreException;
 }

Modified: felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java (original)
+++ felix/trunk/sigil/eclipse/core/src/org/apache/felix/sigil/eclipse/model/repository/IRepositoryType.java Thu Aug 26 13:56:05 2010
@@ -32,4 +32,5 @@ public interface IRepositoryType
 
     boolean isDynamic();
 
+    String getProvider();
 }
\ No newline at end of file

Modified: felix/trunk/sigil/eclipse/obr/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/obr/plugin.xml?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/obr/plugin.xml (original)
+++ felix/trunk/sigil/eclipse/obr/plugin.xml Thu Aug 26 13:56:05 2010
@@ -25,6 +25,7 @@
             class="org.apache.felix.sigil.common.obr.OBRRepositoryProvider"
             dynamic="true"
             id="org.apache.felix.sigil.obr.provider"
+            alias="obr"
             type="OSGi Bundle Repository (OBR)">
       </provider>
    </extension>

Modified: felix/trunk/sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/OSGiLauncher.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/OSGiLauncher.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/OSGiLauncher.java (original)
+++ felix/trunk/sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/OSGiLauncher.java Thu Aug 26 13:56:05 2010
@@ -88,8 +88,8 @@ public class OSGiLauncher extends Abstra
 
         try
         {
-            String name = LaunchHelper.getRepositoryManagerName(config);
-            IRepositoryManager manager = SigilCore.getRepositoryManager(name);
+            // TODO need to figure out a sensible repository manager for launch configs
+            IRepositoryManager manager = SigilCore.getRepositoryManager(null);
             client.apply(form.resolve(new RuntimeBundleResolver(manager, config)));
         }
         catch (Exception e)

Modified: felix/trunk/sigil/eclipse/ui/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/ui/plugin.xml?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/ui/plugin.xml (original)
+++ felix/trunk/sigil/eclipse/ui/plugin.xml Thu Aug 26 13:56:05 2010
@@ -146,22 +146,6 @@
       </wizard>
    </extension>
    <extension
-         point="org.eclipse.ui.propertyPages">
-      <page
-            class="org.apache.felix.sigil.eclipse.ui.internal.preferences.project.ProjectPropertyPage"
-            id="org.apache.felix.sigil.ui.projectpage"
-            name="Repositories">
-         <filter
-               name="projectNature"
-               value="org.apache.felix.sigil.sigilnature"/>
-         <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">

Modified: felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/wizard/repository/RepositoryWizardPage.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/wizard/repository/RepositoryWizardPage.java?rev=989695&r1=989694&r2=989695&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/wizard/repository/RepositoryWizardPage.java (original)
+++ felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/eclipse/ui/wizard/repository/RepositoryWizardPage.java Thu Aug 26 13:56:05 2010
@@ -121,6 +121,8 @@ public abstract class RepositoryWizardPa
         {
             e.store();
         }
+        getModel().getPreferences().setValue("provider", getModel().getType().getProvider());
+
     }
 
 }



Mime
View raw message