diff --git a/sigil/eclipse/ui/plugin.properties b/sigil/eclipse/ui/plugin.properties
index c87b069..4b96436 100644
--- a/sigil/eclipse/ui/plugin.properties
+++ b/sigil/eclipse/ui/plugin.properties
@@ -3,6 +3,7 @@
 librariesPrefsPage=OSGi Libraries
 commandConvertProject=Convert Project To Sigil Project
 commandRefreshClasspath=Refresh bundle classpath
+RenameActivatorPackageParticipant.name=Rename Activator Package Participant
 RenameActivatorParticipant.name=Rename Activator Participant
 RenamePackageParticipant.name=Rename Package Participant
 MoveActivatorParticipant.name=Move Activator Participant
diff --git a/sigil/eclipse/ui/plugin.xml b/sigil/eclipse/ui/plugin.xml
index 74b51e7..c18582a 100644
--- a/sigil/eclipse/ui/plugin.xml
+++ b/sigil/eclipse/ui/plugin.xml
@@ -289,6 +289,21 @@
          </with>
        </enablement>
      </renameParticipant>
+     <renameParticipant
+        id="org.apache.felix.sigil.movePackageParticipant"
+        name="%RenameActivatorPackageParticipant.name" 
+        class="org.apache.felix.sigil.ui.eclipse.refactor.RenameActivatorPackageParticipant">
+       <enablement>
+         <with variable="affectedNatures">
+           <iterate operator="or">
+             <equals value="org.apache.felix.sigil.sigilnature"/>
+           </iterate>
+         </with>
+         <with variable="element">
+           <instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
+         </with>
+       </enablement>
+     </renameParticipant>
    </extension>  
    <extension point="org.eclipse.ltk.core.refactoring.moveParticipants">
      <moveParticipant
diff --git a/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/refactor/RenameActivatorPackageParticipant.java b/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/refactor/RenameActivatorPackageParticipant.java
new file mode 100644
index 0000000..07d33b0
--- /dev/null
+++ b/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/refactor/RenameActivatorPackageParticipant.java
@@ -0,0 +1,118 @@
+/*
+ * 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.ui.eclipse.refactor;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.felix.sigil.eclipse.SigilCore;
+import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.NullChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+
+public class RenameActivatorPackageParticipant extends RenameParticipant
+{
+    private IPackageFragment packageFragment;
+    private List<Change> changes = new LinkedList<Change>();
+
+    @Override
+    public RefactoringStatus checkConditions(IProgressMonitor monitor,
+        CheckConditionsContext ctx) throws OperationCanceledException
+    {
+        RefactoringStatus status = null;
+        if(getArguments().getUpdateReferences()) {
+            try
+            {
+                ISigilProjectModel sigil = SigilCore.create(packageFragment.getJavaProject().getProject());
+                RefactorUtil.touch(ctx, sigil);
+                
+                String oldName = sigil.getBundle().getBundleInfo().getActivator();
+                if ( oldName != null ) {
+                    String[] parts = splitPackageClass(oldName);
+                    if (parts[0].equals(packageFragment.getElementName())) {
+                        String newName = getArguments().getNewName() + "." + parts[1];
+                        changes.add(new BundleActivatorChange(sigil, oldName, newName));
+                        status = RefactoringStatus.createInfoStatus("Updating bundle activator from " + oldName + " to " + newName );
+                    }
+                }
+            }
+            catch (CoreException e)
+            {
+                SigilCore.warn("Failed to update activator", e);
+            }
+        }
+        
+        return status;
+    }
+
+    private static String[] splitPackageClass(String className)
+    {
+        String[] parts = new String[2];
+        int i = className.lastIndexOf('.');
+        if ( i == -1 ) {
+            parts[0] = "";
+            parts[1] = className;
+        }
+        else {
+            parts[0] = className.substring(0, i);
+            parts[1] = className.substring(i + 1);
+        }
+        return parts;
+    }
+
+    @Override
+    public Change createChange(IProgressMonitor monitor) throws CoreException,
+        OperationCanceledException
+    {
+        if (changes.isEmpty()) {
+            return new NullChange();
+        }
+        else 
+        {
+            CompositeChange ret = new CompositeChange("Export-Package update");
+            
+            ret.addAll(changes.toArray(new Change[changes.size()]));
+            
+            return ret;
+        }
+    }
+
+    @Override
+    public String getName()
+    {        
+        return "Sigil Rename Activator Package Participant";
+    }
+
+    @Override
+    protected boolean initialize(Object element)
+    {
+        packageFragment = (IPackageFragment) element;
+        return true;
+    }
+
+}
