You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Philip Ogren (JIRA)" <de...@uima.apache.org> on 2010/12/31 18:18:46 UTC

[jira] Created: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

JCasGen prouces source files with name shadowing/conflicts
----------------------------------------------------------

                 Key: UIMA-1983
                 URL: https://issues.apache.org/jira/browse/UIMA-1983
             Project: UIMA
          Issue Type: Improvement
          Components: Core Java Framework
            Reporter: Philip Ogren
            Priority: Minor


When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  

I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  

Thanks,
Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor resolved UIMA-1983.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.2SDK
         Assignee: Marshall Schor

> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.3.2SDK
>
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Marshall Schor (Closed) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-1983.
--------------------------------

    
> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.4.0SDK
>
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977401#action_12977401 ] 

Marshall Schor commented on UIMA-1983:
--------------------------------------

Are there two name shadowing instances: ..._Type.featOkTst and ..._Type.typeIndexID ?

If the problem is just the warning messages, we can fix that by changing the generator to generate
@SuppressWarnings("hidden") to those two fields.

Are there other fields giving problems, or just those two?

> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Philip Ogren (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977607#action_12977607 ] 

Philip Ogren commented on UIMA-1983:
------------------------------------

If I define a type called MyAnnotation in a type system descriptor file, then MyAnnotation.java and MyAnnotation_Type.java can be generated.  

The following can be compiler warnings in Java 1.5:

MyAnnotation.java: 

- The field MyAnnotation.typeIndexID is hiding a field from type Annotation
- The field MyAnnotation.type is hiding a field from type Annotation

Both of these can be ignored with "@SuppressWarnings("hiding")"

MyAnnotation_Type.java:

- The field MyAnnotation_Type.featOkTst is hiding a field from type Annotation_Type
- The field MyAnnotation_Type.typeIndexID is hiding a field from type Annotation_Type

Both of these can be ignored with "@SuppressWarnings("hiding")"

When compiling with Java 1.6, I get the following additional warnings:


org.uimafit.type.MyAnnotation.readObject() - Empty block should be documented

This one can be fixed by simply adding a comment to the code block such as "/*generated code */"

org.uimafit.type.AnalyzedText.getTypeIndexID() - The method getTypeIndexID() of type AnalyzedText should be tagged with @Override since it actually overrides a superclass method

This one can be fixed by adding the "@Override" annotation.

org.uimafit.type.AnalyzedText_Type.getFSGenerator() - The method getFSGenerator() of type AnalyzedText_Type should be tagged with @Override since it actually overrides a superclass method

This one can be fixed by adding the "@Override" annotation.

It may be possible that there are other compiler warnings - but this is what I see with my current configuration which is fairly standard, I think.

Thanks.


> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Philip Ogren (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977869#action_12977869 ] 

Philip Ogren commented on UIMA-1983:
------------------------------------

I just noticed that the project I thought was targetting 1.6 is not - so the results I gave above are all using java 1.5.  The two different projects must have different compiler warning settings.  Sorry!  

> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977982#action_12977982 ] 

Marshall Schor commented on UIMA-1983:
--------------------------------------

I've implemented all of the suggested changes, above.  Before committing this, it would be good if you (Philip) could test it.  What would need in the way of updated Jars to do this test?

> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1983) JCasGen prouces source files with name shadowing/conflicts

Posted by "Philip Ogren (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977608#action_12977608 ] 

Philip Ogren commented on UIMA-1983:
------------------------------------

oops.  missed one.

org.uimafit.type.MyAnnotation.MyAnnotationt() - Empty block should be documented

Also, replace "AnalyzedText" with "MyAnnotation" in the previous comment.  

> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
>                 Key: UIMA-1983
>                 URL: https://issues.apache.org/jira/browse/UIMA-1983
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Philip Ogren
>            Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name conflicts exist, then the source files produced by JCasGen contain many warnings.  It sure would be nice if these files came out pristine rather than having compiler warnings.  Eclipse does not seem to allow for fine grained compiler warning configuration (i.e. to ignore certain warnings for certain source folders or packages) but only works at the project level.    Therefore, I must either turn these warnings off for the entire project or must ignore the warnings in the type system java files.  
> I'm guessing that this is a side effect of an intentional design decision (re eg typeIndexID) and so I am not that hopeful that this can be fixed but thought I would ask anyways.  
> Thanks,
> Philip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.