[jboss-svn-commits] JBL Code SVN: r34279 - in labs/jbossrules/trunk: osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/META-INF and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jul 29 02:33:49 EDT 2010


Author: mark.proctor at jboss.com
Date: 2010-07-29 02:33:49 -0400 (Thu, 29 Jul 2010)
New Revision: 34279

Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/commons/jci/compilers/EclipseJavaCompilerSettings.java
   labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/META-INF/MANIFEST.MF
Log:
JBRULES-2351 OSGi ready
-Fixed EclipseJavaCompilerSettings so it doesn't use internal classes
-updated jxls manifest.

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/commons/jci/compilers/EclipseJavaCompilerSettings.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/commons/jci/compilers/EclipseJavaCompilerSettings.java	2010-07-29 06:03:23 UTC (rev 34278)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/commons/jci/compilers/EclipseJavaCompilerSettings.java	2010-07-29 06:33:49 UTC (rev 34279)
@@ -20,22 +20,50 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-
 /**
  * Native Eclipse compiler settings
  * 
  * @author tcurdt
  */
 public final class EclipseJavaCompilerSettings extends JavaCompilerSettings {
+    
+  //copied from org.eclipse.jdt.internal.compiler.impl.CompilerOptions as we can't access it
+    public static final String CompilerOptions_VERSION_1_1 = "1.1"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_2 = "1.2"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_3 = "1.3"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_4 = "1.4"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_JSR14 = "jsr14"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_CLDC1_1 = "cldc1.1"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_5 = "1.5"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_6 = "1.6"; //$NON-NLS-1$
+    public static final String CompilerOptions_VERSION_1_7 = "1.7"; //$NON-NLS-1$
 
+    public static final String CompilerOptions_GENERATE = "generate";//$NON-NLS-1$
+    public static final String CompilerOptions_DO_NOT_GENERATE = "do not generate"; //$NON-NLS-1$
+    public static final String CompilerOptions_PRESERVE = "preserve"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTIMIZE_OUT = "optimize out"; //$NON-NLS-1$
+    public static final String CompilerOptions_ERROR = "error"; //$NON-NLS-1$
+    public static final String CompilerOptions_WARNING = "warning"; //$NON-NLS-1$
+    public static final String CompilerOptions_IGNORE = "ignore"; //$NON-NLS-1$
+
+    public static final String CompilerOptions_OPTION_LineNumberAttribute = "org.eclipse.jdt.core.compiler.debug.lineNumber"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_SourceFileAttribute = "org.eclipse.jdt.core.compiler.debug.sourceFile"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_LocalVariableAttribute = "org.eclipse.jdt.core.compiler.debug.localVariable"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_ReportUnusedImport = "org.eclipse.jdt.core.compiler.problem.unusedImport"; //$NON-NLS-1$
+
+    public static final String CompilerOptions_OPTION_SuppressWarnings =  "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_Encoding = "org.eclipse.jdt.core.encoding"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_Source = "org.eclipse.jdt.core.compiler.source"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_TargetPlatform = "org.eclipse.jdt.core.compiler.codegen.targetPlatform"; //$NON-NLS-1$
+    public static final String CompilerOptions_OPTION_ReportDeprecation = "org.eclipse.jdt.core.compiler.problem.deprecation"; //$NON-NLS-1$    
+
     final private Map defaultEclipseSettings = new HashMap();
 
     public EclipseJavaCompilerSettings() {
-        defaultEclipseSettings.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.GENERATE);
-        defaultEclipseSettings.put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.GENERATE);
-        defaultEclipseSettings.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
-        defaultEclipseSettings.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.GENERATE);
+        defaultEclipseSettings.put(CompilerOptions_OPTION_LineNumberAttribute, CompilerOptions_GENERATE);
+        defaultEclipseSettings.put(CompilerOptions_OPTION_SourceFileAttribute, CompilerOptions_GENERATE);
+        defaultEclipseSettings.put(CompilerOptions_OPTION_ReportUnusedImport, CompilerOptions_IGNORE);
+        defaultEclipseSettings.put(CompilerOptions_OPTION_LocalVariableAttribute, CompilerOptions_GENERATE);
     }
     
     public EclipseJavaCompilerSettings( final JavaCompilerSettings pSettings ) {
@@ -53,12 +81,12 @@
     private static Map nativeVersions = new HashMap() {
 		private static final long serialVersionUID = 1L;
 	{
-    	put("1.1", CompilerOptions.VERSION_1_1);
-    	put("1.2", CompilerOptions.VERSION_1_2);
-    	put("1.3", CompilerOptions.VERSION_1_3);
-    	put("1.4", CompilerOptions.VERSION_1_4);
-    	put("1.5", CompilerOptions.VERSION_1_5);
-    	put("1.6", CompilerOptions.VERSION_1_6);
+    	put("1.1", CompilerOptions_VERSION_1_1);
+    	put("1.2", CompilerOptions_VERSION_1_2);
+    	put("1.3", CompilerOptions_VERSION_1_3);
+    	put("1.4", CompilerOptions_VERSION_1_4);
+    	put("1.5", CompilerOptions_VERSION_1_5);
+    	put("1.6", CompilerOptions_VERSION_1_6);
     }};
     
     private String toNativeVersion( final String pVersion ) {
@@ -74,11 +102,11 @@
     Map toNativeSettings() {
         final Map map = new HashMap(defaultEclipseSettings);
 
-        map.put(CompilerOptions.OPTION_SuppressWarnings, isWarnings()?CompilerOptions.GENERATE:CompilerOptions.DO_NOT_GENERATE);
-        map.put(CompilerOptions.OPTION_ReportDeprecation, isDeprecations()?CompilerOptions.GENERATE:CompilerOptions.DO_NOT_GENERATE);
-        map.put(CompilerOptions.OPTION_TargetPlatform, toNativeVersion(getTargetVersion()));
-        map.put(CompilerOptions.OPTION_Source, toNativeVersion(getSourceVersion()));
-        map.put(CompilerOptions.OPTION_Encoding, getSourceEncoding());
+        map.put(CompilerOptions_OPTION_SuppressWarnings, isWarnings()?CompilerOptions_GENERATE:CompilerOptions_DO_NOT_GENERATE);
+        map.put(CompilerOptions_OPTION_ReportDeprecation, isDeprecations()?CompilerOptions_GENERATE:CompilerOptions_DO_NOT_GENERATE);
+        map.put(CompilerOptions_OPTION_TargetPlatform, toNativeVersion(getTargetVersion()));
+        map.put(CompilerOptions_OPTION_Source, toNativeVersion(getSourceVersion()));
+        map.put(CompilerOptions_OPTION_Encoding, getSourceEncoding());
 
         return map;
     }

Modified: labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/META-INF/MANIFEST.MF	2010-07-29 06:03:23 UTC (rev 34278)
+++ labs/jbossrules/trunk/osgi-bundles/jxls/org.drools.osgi.wrapper.jxls-reader/META-INF/MANIFEST.MF	2010-07-29 06:33:49 UTC (rev 34279)
@@ -10,10 +10,10 @@
 Export-Package: 
  net.sf.jxls.reader
 Require-Bundle: com.springsource.org.apache.commons.collections;bundle-version="3.2.0",
- com.springsource.org.apache.commons.logging;bundle-version="1.1.1",
- com.springsource.org.apache.log4j;bundle-version="1.2.15",
  com.springsource.org.apache.poi;bundle-version="3.0.2",
  com.springsource.org.apache.commons.beanutils;bundle-version="1.8.0",
  com.springsource.org.apache.commons.digester;bundle-version="1.8.1"
+Import-Package: org.apache.commons.logging,
+ org.apache.log4j 
 DynamicImport-Package: *
 



More information about the jboss-svn-commits mailing list