felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1079728 - in /felix/trunk/scrplugin: annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/ generator/src/main/java/org/apache/felix/scrp...
Date Wed, 09 Mar 2011 10:17:59 GMT
Author: cziegeler
Date: Wed Mar  9 10:17:58 2011
New Revision: 1079728

URL: http://svn.apache.org/viewvc?rev=1079728&view=rev
Log:
FELIX-2863 : Warnings and error messages contain @scr.* if annotations are used 

Modified:
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ReferenceTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterComponentTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterServiceTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletComponentTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletPropertyTag.java
    felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletServiceTag.java
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/AbstractObject.java
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/JavaTag.java
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/AbstractTag.java
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/qdox/QDoxJavaTag.java

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
Wed Mar  9 10:17:58 2011
@@ -121,6 +121,11 @@ public class ComponentTag extends Abstra
     }
 
     @Override
+    public String getSourceName() {
+        return "Component";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final Map<String, String> map = new HashMap<String, String>();
 

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/PropertyTag.java
Wed Mar  9 10:17:58 2011
@@ -145,6 +145,11 @@ public class PropertyTag extends Abstrac
     }
 
     @Override
+    public String getSourceName() {
+        return "Property";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final Map<String, String> map = new LinkedHashMap<String, String>();
 

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ReferenceTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ReferenceTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ReferenceTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ReferenceTag.java
Wed Mar  9 10:17:58 2011
@@ -94,6 +94,11 @@ public class ReferenceTag extends Abstra
     }
 
     @Override
+    public String getSourceName() {
+        return "Reference";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final Map<String, String> map = new HashMap<String, String>();
 

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ServiceTag.java
Wed Mar  9 10:17:58 2011
@@ -57,6 +57,11 @@ public class ServiceTag extends Abstract
     }
 
     @Override
+    public String getSourceName() {
+        return "Service";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final Map<String, String> map = new HashMap<String, String>();
 

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterComponentTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterComponentTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterComponentTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterComponentTag.java
Wed Mar  9 10:17:58 2011
@@ -59,6 +59,11 @@ public class SlingFilterComponentTag ext
     }
 
     @Override
+    public String getSourceName() {
+        return "SlingFilter";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final Map<String, String> params = new HashMap<String, String>();
         if ( this.name != null ) {

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterServiceTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterServiceTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterServiceTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingFilterServiceTag.java
Wed Mar  9 10:17:58 2011
@@ -48,6 +48,11 @@ public class SlingFilterServiceTag exten
     }
 
     @Override
+    public String getSourceName() {
+        return "SlingFilter";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         return INTERFACE_MAP;
     }

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletComponentTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletComponentTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletComponentTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletComponentTag.java
Wed Mar  9 10:17:58 2011
@@ -45,6 +45,11 @@ public class SlingServletComponentTag ex
     }
 
     @Override
+    public String getSourceName() {
+        return "SlingServlet";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         return Collections.emptyMap();
     }

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletPropertyTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletPropertyTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletPropertyTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletPropertyTag.java
Wed Mar  9 10:17:58 2011
@@ -74,6 +74,11 @@ public class SlingServletPropertyTag ext
     }
 
     @Override
+    public String getSourceName() {
+        return "SlingServlet";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         final SortedMap<String, String> map = new TreeMap<String, String>();
 

Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletServiceTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletServiceTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletServiceTag.java
(original)
+++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/tags/annotation/sling/SlingServletServiceTag.java
Wed Mar  9 10:17:58 2011
@@ -48,6 +48,11 @@ public class SlingServletServiceTag exte
     }
 
     @Override
+    public String getSourceName() {
+        return "SlingServlet";
+    }
+
+    @Override
     public Map<String, String> createNamedParameterMap() {
         return INTERFACE_MAP;
     }

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/AbstractObject.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/AbstractObject.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/AbstractObject.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/om/AbstractObject.java
Wed Mar  9 10:17:58 2011
@@ -34,11 +34,11 @@ public abstract class AbstractObject {
     }
 
     protected void logWarn(IssueLog iLog, String message) {
-        iLog.addWarning( "@" + this.tag.getName() + ": " + message, tag.getSourceLocation(),
tag.getLineNumber() );
+        iLog.addWarning( "@" + this.tag.getSourceName() + ": " + message, tag.getSourceLocation(),
tag.getLineNumber() );
     }
 
     protected void logError(IssueLog iLog, String message) {
-        iLog.addError( "@" + this.tag.getName() + ": " + message, tag.getSourceLocation(),
tag.getLineNumber() );
+        iLog.addError( "@" + this.tag.getSourceName() + ": " + message, tag.getSourceLocation(),
tag.getLineNumber() );
     }
 
     public JavaTag getJavaTag() {

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/JavaTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/JavaTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/JavaTag.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/JavaTag.java
Wed Mar  9 10:17:58 2011
@@ -26,8 +26,17 @@ import java.util.Map;
  */
 public interface JavaTag {
 
+    /**
+     * The name of the tag, e.g. scr.component etc.
+     */
     String getName();
 
+    /**
+     * The name of the tag as used in the source code.
+     * For javadoc tags this is like {@link #getName()}, for annoations this is different.
+     */
+    String getSourceName();
+
     String[] getParameters();
 
     String getNamedParameter(String arg0);

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/AbstractTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/AbstractTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/AbstractTag.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/annotation/AbstractTag.java
Wed Mar  9 10:17:58 2011
@@ -115,6 +115,11 @@ public abstract class AbstractTag implem
     public abstract String getName();
 
     /**
+     * @see JavaTag#getSourceName()
+     */
+    public abstract String getSourceName();
+
+    /**
      * @see org.apache.felix.scrplugin.tags.JavaTag#getNamedParameterMap()
      */
     public Map<String, String> getNamedParameterMap() {

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/cl/ClassLoaderJavaTag.java
Wed Mar  9 10:17:58 2011
@@ -89,6 +89,13 @@ public class ClassLoaderJavaTag implemen
     }
 
     /**
+     * @see org.apache.felix.scrplugin.tags.JavaTag#getSourceName()
+     */
+    public String getSourceName() {
+        return this.getName();
+    }
+
+    /**
      * @see org.apache.felix.scrplugin.tags.JavaTag#getNamedParameter(java.lang.String)
      */
     public String getNamedParameter(String name) {

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/qdox/QDoxJavaTag.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/qdox/QDoxJavaTag.java?rev=1079728&r1=1079727&r2=1079728&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/qdox/QDoxJavaTag.java
(original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/tags/qdox/QDoxJavaTag.java
Wed Mar  9 10:17:58 2011
@@ -54,6 +54,13 @@ public class QDoxJavaTag implements Java
     }
 
     /**
+     * @see org.apache.felix.scrplugin.tags.JavaTag#getSourceName()
+     */
+    public String getSourceName() {
+        return this.getName();
+    }
+
+    /**
      * @see org.apache.felix.scrplugin.tags.JavaTag#getNamedParameter(java.lang.String)
      */
     public String getNamedParameter(String arg0) {



Mime
View raw message