You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.nl> on 2004/01/10 21:58:08 UTC
Compile error in HEAD
Hi,
The code that I checked out this evening from CVS HEAD generates
compile errors, for example,
[javac] /fsd/source/xml-fop/build/gensrc/org/apache/fop/fo/properties/BorderBottomStyleMaker.java:21: cannot resolve symbol
[javac] symbol : variable PR_BORDER_AFTER_STYLE
[javac] location: interface org.apache.fop.fo.properties.Constants
[javac] p= propertyList.getExplicitOrShorthand(propertyList.wmMap(Constants.PR_BORDER_AFTER_STYLE, Constants.PR_BORDER_AFTER_STYLE, Constants.PR_BORDER_END_STYLE));
[javac] ^
The cause is that the import section is not sufficient:
package org.apache.fop.fo.properties;
import org.apache.fop.fo.*;
import org.apache.fop.apps.FOPException;
With these import statements the compiler applies interface
org.apache.fop.fo.properties.Constants instead of interface
org.apache.fop.fo.Constants. An explicit statement
import org.apache.fop.fo.Constants;
should be added. I did it as follows:
--- properties.xsl.~1.30.~ Sat Jan 10 20:02:04 2004
+++ properties.xsl Sat Jan 10 21:53:43 2004
@@ -329,7 +329,8 @@
import org.apache.fop.datatypes.*;</xsl:text>
</xsl:if>
<xsl:text>
-import org.apache.fop.fo.*;</xsl:text>
+import org.apache.fop.fo.*;
+import org.apache.fop.fo.Constants;</xsl:text>
<xsl:if test="not(
(./datatype and ./datatype[. ='List'])
or ./class-name[.='GenericCondPadding']
@@ -338,10 +339,6 @@
<xsl:text>
import org.apache.fop.apps.FOPException;</xsl:text>
</xsl:if>
- <xsl:if test=".//enumeration and @type='generic'">
- <xsl:text>
-import org.apache.fop.fo.Constants;</xsl:text>
-</xsl:if>
<xsl:text>
public class </xsl:text>
The old code applies a precise test for the inclusion of the import
statement. My change includes the import statement in all property
makers. Not sure what a more precise test would look like, and if
there can be any.
Regards, Simon
--
Simon Pepping
email: spepping@leverkruid.nl
home page: http://www.leverkruid.nl
public key: http://www.leverkruid.nl/personal/sp.asc
fingerprint: E3BF 7295 9AA8 8B8A C01A 219D FAAC 088C 6B28 F549
Re: Compile error in HEAD
Posted by Simon Pepping <sp...@leverkruid.nl>.
Glen,
On Sat, Jan 10, 2004 at 01:54:35PM -0800, Glen Mazza wrote:
> Simon,
>
> I can't duplicate the problem on my machine but I
> think I see the issue: there is *no* more
> org.apache.fop.fo.properties.Constants interface
> anymore, it's been gone for a month or so. I think
> you just need to clear it out (delete the file), and
> make sure you have the newest build.xml--it is the
> script that formerly created that properties.Constants
> interface (but doesn't anymore).
>
> What I do before a full build is delete the BUILD
> directory, then type "ant"--this forces everything to
> be created from scratch.
That solves the problem. I usually do an incremental build with 'ant
compile'. This is the second time I have been bitten by the fact that
that is not always sufficient. What seems to have happened is this:
The incremental build does not remove the files
fo.Constants.java/class and fo.properties.Constants.java/class as
previously generated from codegen. The former of these causes ant not
to rebuild the class fo.Constants from the corresponding new code in
src, thus leaving out the new constants that were declared in the
latter.
Thanks, Simon
--
Simon Pepping
email: spepping@leverkruid.nl
home page: http://www.leverkruid.nl
public key: http://www.leverkruid.nl/personal/sp.asc
fingerprint: E3BF 7295 9AA8 8B8A C01A 219D FAAC 088C 6B28 F549
Re: Compile error in HEAD
Posted by Glen Mazza <gr...@yahoo.com>.
--- Glen Mazza <gr...@yahoo.com> wrote:
>
> Yes, but the Eclipse warnings of "unneeded imports"
> drives Peter West and a few others crazy. If the
> above does not work, our only other solution would
> be
> a fully qualified import statement.
>
oops...I mean "fully qualifying the Constants
variables".
Glen
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
Re: Compile error in HEAD
Posted by Glen Mazza <gr...@yahoo.com>.
--- Simon Pepping <sp...@leverkruid.nl> wrote:
>
> The cause is that the import section is not
> sufficient:
>
> package org.apache.fop.fo.properties;
>
> import org.apache.fop.fo.*;
> import org.apache.fop.apps.FOPException;
>
> With these import statements the compiler applies
> interface
> org.apache.fop.fo.properties.Constants instead of
> interface
> org.apache.fop.fo.Constants.
Simon,
I can't duplicate the problem on my machine but I
think I see the issue: there is *no* more
org.apache.fop.fo.properties.Constants interface
anymore, it's been gone for a month or so. I think
you just need to clear it out (delete the file), and
make sure you have the newest build.xml--it is the
script that formerly created that properties.Constants
interface (but doesn't anymore).
What I do before a full build is delete the BUILD
directory, then type "ant"--this forces everything to
be created from scratch.
Another note: cvs update -dPC will overwrite and
replace your work (actually, moves them to other
files), but should remove unneeded files and also get
you in sync with HEAD completely.
> An explicit statement
>
> import org.apache.fop.fo.Constants;
>
> should be added. I did it as follows:
>
Yes, but the Eclipse warnings of "unneeded imports"
drives Peter West and a few others crazy. If the
above does not work, our only other solution would be
a fully qualified import statement.
Thanks always!
Glen
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus