You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/01/09 10:26:13 UTC
svn commit: r1229069 - in
/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix: ./ META-INF/
src/main/java/info/evanchik/eclipse/felix/
src/main/java/info/evanchik/eclipse/felix/internal/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/ap...
Author: jbonofre
Date: Mon Jan 9 09:26:12 2012
New Revision: 1229069
URL: http://svn.apache.org/viewvc?rev=1229069&view=rev
Log:
Refactore of Eclipse felix wrapper
Added:
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/Activator.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixInitializer.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixLaunchConfiguration.java
- copied, changed from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixLaunchConfiguration.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/BundleEntry.java
- copied, changed from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/BundleEntry.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/FelixLaunchHelper.java
- copied, changed from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/FelixLaunchHelper.java
Removed:
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/Activator.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixInitializer.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixLaunchConfiguration.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/BundleEntry.java
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/FelixLaunchHelper.java
Modified:
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/META-INF/MANIFEST.MF
karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/plugin.xml
Modified: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/META-INF/MANIFEST.MF?rev=1229069&r1=1229068&r2=1229069&view=diff
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/META-INF/MANIFEST.MF (original)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/META-INF/MANIFEST.MF Mon Jan 9 09:26:12 2012
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Apache Karaf :: EIK :: Plugins :: Felix OSGi Framework for Eclipse PDE
Bundle-SymbolicName: org.apache.karaf.eik.felix;singleton:=true
Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: info.evanchik.eclipse.felix.Activator
+Bundle-Activator: org.apache.karaf.eik.felix.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
Modified: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/plugin.xml
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/plugin.xml?rev=1229069&r1=1229068&r2=1229069&view=diff
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/plugin.xml (original)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/plugin.xml Mon Jan 9 09:26:12 2012
@@ -4,9 +4,9 @@
<extension
point="org.eclipse.pde.ui.osgiFrameworks">
<framework
- id="info.evanchik.eclipse.felix.framework"
- initializer="info.evanchik.eclipse.felix.FelixInitializer"
- launcherDelegate="info.evanchik.eclipse.felix.FelixLaunchConfiguration"
+ id="org.apache.karaf.eik.felix.framework"
+ initializer="org.apache.karaf.eik.felix.FelixInitializer"
+ launcherDelegate="org.apache.karaf.eik.felix.FelixLaunchConfiguration"
name="Apache Felix">
</framework>
</extension>
Added: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/Activator.java
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/Activator.java?rev=1229069&view=auto
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/Activator.java (added)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/Activator.java Mon Jan 9 09:26:12 2012
@@ -0,0 +1,63 @@
+/*
+ * 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.karaf.eik.felix;
+
+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.apache.karaf.eik.felix";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ 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: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixInitializer.java
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixInitializer.java?rev=1229069&view=auto
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixInitializer.java (added)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixInitializer.java Mon Jan 9 09:26:12 2012
@@ -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.apache.karaf.eik.felix;
+
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer;
+
+public class FelixInitializer extends OSGiLaunchConfigurationInitializer {
+
+ @Override
+ protected String getAutoStart(String bundleID) {
+ return super.getAutoStart(bundleID);
+ }
+
+ @Override
+ protected String getStartLevel(String bundleID) {
+ return super.getStartLevel(bundleID);
+ }
+
+ @Override
+ protected void initializeBundleState(ILaunchConfigurationWorkingCopy configuration) {
+ super.initializeBundleState(configuration);
+ }
+
+ @Override
+ protected void initializeFrameworkDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ super.initializeFrameworkDefaults(configuration);
+ }
+
+}
Copied: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixLaunchConfiguration.java (from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixLaunchConfiguration.java)
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixLaunchConfiguration.java?p2=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixLaunchConfiguration.java&p1=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixLaunchConfiguration.java&r1=1229068&r2=1229069&rev=1229069&view=diff
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/FelixLaunchConfiguration.java (original)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/FelixLaunchConfiguration.java Mon Jan 9 09:26:12 2012
@@ -1,17 +1,25 @@
-/**
- * Copyright (c) 2009 Stephen Evanchik
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+/*
+ * 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
*
- * Contributors:
- * Stephen Evanchik - initial implementation
+ * 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 info.evanchik.eclipse.felix;
+package org.apache.karaf.eik.felix;
-import info.evanchik.eclipse.felix.internal.BundleEntry;
-import info.evanchik.eclipse.felix.internal.FelixLaunchHelper;
+import org.apache.karaf.eik.felix.internal.BundleEntry;
+import org.apache.karaf.eik.felix.internal.FelixLaunchHelper;
import java.io.File;
import java.io.FileOutputStream;
@@ -20,7 +28,6 @@ import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -54,27 +61,23 @@ import org.eclipse.pde.ui.launcher.Abstr
import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
import org.osgi.framework.Bundle;
-/**
- * @author Stephen Evanchik (evanchsa@gmail.com)
- *
- */
public class FelixLaunchConfiguration extends AbstractPDELaunchConfiguration {
- public static String FELIX_FRAMEWORK_LAUNCHER = "org.apache.felix.main"; //$NON-NLS-1$
+ public static String FELIX_FRAMEWORK_LAUNCHER = "org.apache.felix.main";
- public static String FELIX_FRAMEWORK = "org.apache.felix.framework"; //$NON-NLS-1$
+ public static String FELIX_FRAMEWORK = "org.apache.felix.framework";
- public static String FELIX_SYSTEM_PROPERTIES_KEY = "felix.system.properties"; //$NON-NLS-1$
+ public static String FELIX_SYSTEM_PROPERTIES_KEY = "felix.system.properties";
- public static String FELIX_CONFIG_PROPERTIES_KEY = "felix.config.properties"; //$NON-NLS-1$
+ public static String FELIX_CONFIG_PROPERTIES_KEY = "felix.config.properties";
- public static String FELIX_AUTO_START_PREFIX = "felix.auto.start."; //$NON-NLS-1$
+ public static String FELIX_AUTO_START_PREFIX = "felix.auto.start.";
- public static String FELIX_AUTO_INSTALL_PREFIX = "felix.auto.install."; //$NON-NLS-1$
+ public static String FELIX_AUTO_INSTALL_PREFIX = "felix.auto.install.";
- public static String FELIX_CONFIG_PROPERTIES_FILE = "config.properties"; //$NON-NLS-1$
+ public static String FELIX_CONFIG_PROPERTIES_FILE = "config.properties";
- public static String FELIX_SYSTEM_PROPERTIES_FILE = "system.properties"; //$NON-NLS-1$
+ public static String FELIX_SYSTEM_PROPERTIES_FILE = "system.properties";
public static int DEFAULT_START_LEVEL = 4;
@@ -502,4 +505,5 @@ public class FelixLaunchConfiguration ex
}
}
}
+
}
Copied: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/BundleEntry.java (from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/BundleEntry.java)
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/BundleEntry.java?p2=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/BundleEntry.java&p1=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/BundleEntry.java&r1=1229068&r2=1229069&rev=1229069&view=diff
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/BundleEntry.java (original)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/BundleEntry.java Mon Jan 9 09:26:12 2012
@@ -1,30 +1,31 @@
-/**
- * Copyright (c) 2009 Stephen Evanchik
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+/*
+ * 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
*
- * Contributors:
- * Stephen Evanchik - initial implementation
+ * 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 info.evanchik.eclipse.felix.internal;
+package org.apache.karaf.eik.felix.internal;
import java.net.MalformedURLException;
import java.net.URL;
-/**
- * @author Stephen Evanchik (evanchsa@gmail.com)
- *
- */
public class BundleEntry {
/**
* A builder to help facilitate the construction of {@link BundleEntry}
- * objects
- *
- * @author Stephen Evanchik (evanchsa@gmail.com)
- *
+ * objects.
*/
public static class Builder {
@@ -140,9 +141,6 @@ public class BundleEntry {
/**
* A simple class to distinguish between simple bundle entries and URL
* bundle entries.
- *
- * @author Stephen Evanchik (evanchsa@gmail.com)
- *
*/
private static class UrlBundleEntry extends BundleEntry {
@@ -227,4 +225,5 @@ public class BundleEntry {
return sb.toString();
}
+
}
Copied: karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/FelixLaunchHelper.java (from r1229068, karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/FelixLaunchHelper.java)
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/FelixLaunchHelper.java?p2=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/FelixLaunchHelper.java&p1=karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/FelixLaunchHelper.java&r1=1229068&r2=1229069&rev=1229069&view=diff
==============================================================================
--- karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/info/evanchik/eclipse/felix/internal/FelixLaunchHelper.java (original)
+++ karaf/eik/trunk/plugins/org.apache.karaf.eik.felix/src/main/java/org/apache/karaf/eik/felix/internal/FelixLaunchHelper.java Mon Jan 9 09:26:12 2012
@@ -1,14 +1,22 @@
-/**
- * Copyright (c) 2009 Stephen Evanchik
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+/*
+ * 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
*
- * Contributors:
- * Stephen Evanchik - initial implementation
+ * 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 info.evanchik.eclipse.felix.internal;
+package org.apache.karaf.eik.felix.internal;
import java.util.ArrayList;
import java.util.HashSet;
@@ -24,10 +32,6 @@ import org.eclipse.pde.core.plugin.Model
import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-/**
- * @author Stephen Evanchik (evanchsa@gmail.com)
- *
- */
public class FelixLaunchHelper {
public static final char VERSION_SEPARATOR = '*';
@@ -120,4 +124,5 @@ public class FelixLaunchHelper {
return new String[] { id, version };
}
+
}