| Is it a bug? Help me please [message #60084] | 
Wed, 18 June 2003 04:44   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hello, I've a little problem using Eclipse. If i create 2 file like these 
inside a package named "ptest": 
 
File1: 
------------------ 
package ptest; 
 
class Myclass1 { 
    public int testInt = 5; 
} 
 
class Myclass2 { 
    public String testString = "Hi"; 
} 
---------------------------------------- 
 
FileMain: 
------------------ 
package ptest; 
 
public class FileMain { 
    public static void main(String[] args) { 
        Myclass2 a = new Myclass2();  // Here Eclipse underlines Myclass2 
        System.out.println(a.testString); 
    } 
} 
---------------------------------------- 
 
Eclipse compiles correctly (the program runs), but underlines in red 
"Myclass2" FileMain. 
The code is perfectly legal since the first classes (Myclass1 and Myclass2) 
have package visibility and if i use for example JBuilder, it works 
correctly and doesn't underline nothing. The result is that i cannot work 
with Eclipse, since in my program i've a lot of classes (around 600) and i 
grouped some of them by functionality in various files, but Eclipse doesn't 
recognize the type of the variables i declared and all the advanced features 
don't work. 
Is this a bug? Is there some workaround for this? 
Thank you for your answers. 
 
Bitblaster
 |  
 |  
  | 
| Re: Is it a bug? Help me please [message #60183 is a reply to message #60084] | 
Wed, 18 June 2003 07:37    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
This is a multi-part message in MIME format. 
 
------=_NextPart_000_0238_01C335A7.21A0C220 
Content-Type: text/plain; 
	charset="windows-1251" 
Content-Transfer-Encoding: quoted-printable 
 
Hi=20 
 
I've reproduced your situation on Eclipse 2.1 (200303272130) and the = 
line is really marked as error. 
 
Funny thing is that the file FileMain isn't marked as "errorneus" in the = 
package explorer, the file gets compiled (I have a .class file) and even = 
I was able to run it.=20 
 
I tryed to compile the same source outside of eclipse and it compiled = 
fine with JDK 1.3+ 
 
however compilation with JDK 1.2.2 and 1.1.8 failed with: 
 
FileMain.java:20: class ptest.Myclass2 is defined in Myclass1.java. = 
Because it is used outside of its source file, it should be defined in a = 
file called "Myclass2.java". 
                System.out.println(a.testString); 
 
The default setting for eclispe is to maintain the .class files JDK 1.1 = 
compatible. Unfortunately setting the compatibility level to 1.4 shows = 
no effect - the line is still makred as error - so this looks like an = 
eclipse bug. 
 
Best regards=20 
 
Vasil 
 
 
"Bitblaster" <bitblasters@yahoo.it> wrote in message = 
news:bcp8p7$5eu$1@rogue.oti.com... 
> Hello, I've a little problem using Eclipse. If i create 2 file like = 
these 
> inside a package named "ptest": 
>=20 
> File1: 
> ------------------ 
> package ptest; 
>=20 
> class Myclass1 { 
>     public int testInt =3D 5; 
> } 
>=20 
> class Myclass2 { 
>     public String testString =3D "Hi"; 
> } 
> ---------------------------------------- 
>=20 
> FileMain: 
> ------------------ 
> package ptest; 
>=20 
> public class FileMain { 
>     public static void main(String[] args) { 
>         Myclass2 a =3D new Myclass2();  // Here Eclipse underlines = 
Myclass2 
>         System.out.println(a.testString); 
>     } 
> } 
> ---------------------------------------- 
>=20 
> Eclipse compiles correctly (the program runs), but underlines in red 
> "Myclass2" FileMain. 
> The code is perfectly legal since the first classes (Myclass1 and = 
Myclass2) 
> have package visibility and if i use for example JBuilder, it works 
> correctly and doesn't underline nothing. The result is that i cannot = 
work 
> with Eclipse, since in my program i've a lot of classes (around 600) = 
and i 
> grouped some of them by functionality in various files, but Eclipse = 
doesn't 
> recognize the type of the variables i declared and all the advanced = 
features 
> don't work. 
> Is this a bug? Is there some workaround for this? 
> Thank you for your answers. 
>=20 
> Bitblaster 
>=20 
>  
------=_NextPart_000_0238_01C335A7.21A0C220 
Content-Type: text/html; 
	charset="windows-1251" 
Content-Transfer-Encoding: quoted-printable 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML><HEAD> 
<META http-equiv=3DContent-Type content=3D"text/html; = 
charset=3Dwindows-1251"> 
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR> 
<STYLE></STYLE> 
</HEAD> 
<BODY bgColor=3D#c0c0c0 background=3D""> 
<DIV>Hi </DIV> 
<DIV><FONT size=3D2></FONT> </DIV> 
<DIV>I've reproduced your situation on Eclipse 2.1 (200303272130) and = 
the line=20 
is really marked as error.</DIV> 
<DIV><FONT size=3D2></FONT> </DIV> 
<DIV><FONT size=3D2><FONT size=3D3>Funny thing is that the = 
file FileMain isn't=20 
marked as "errorneus" in the package explorer, the file gets = 
compiled=20 
(I have a .class file) and even I was able to run it. = 
</FONT></FONT></DIV> 
<DIV><FONT size=3D2><FONT size=3D2></FONT></FONT> </DIV> 
<DIV><FONT size=3D2><FONT size=3D3>I tryed to compile the same source = 
outside of=20 
eclipse and it compiled fine with JDK 1.3+</FONT></FONT></DIV> 
<DIV><FONT size=3D2><FONT size=3D3></FONT></FONT> </DIV> 
<DIV><FONT size=3D2><FONT size=3D3>however compilation with JDK 1.2.2 = 
and 1.1.8=20 
failed with:</FONT></DIV> 
<DIV><BR>FileMain.java:20: class ptest.Myclass2 is defined in = 
Myclass1.java.=20 
Because it is used outside of its source file, it should be defined in a = 
file=20 
called=20 
"Myclass2.java".<BR>           = 
 ;       ;=20 
System.out.println(a.testString);</DIV> 
<DIV><BR><FONT size=3D3>The default setting for eclispe is to maintain = 
the .class=20 
files JDK 1.1 compatible. Unfortunately setting the compatibility level=20 
to 1.4 shows no effect - the line is still makred as error - so = 
this looks=20 
like an eclipse bug.</FONT></DIV> 
<DIV> </DIV> 
<DIV><FONT size=3D3>Best regards </FONT></DIV> 
<DIV> </DIV> 
<DIV><FONT size=3D3>Vasil</FONT></DIV> 
<DIV><BR><BR>"Bitblaster" <bitblasters@yahoo.it> wrote in message=20 
news:bcp8p7$5eu$1@rogue.oti.com...<BR>> Hello, I've a little problem = 
using=20 
Eclipse. If i create 2 file like these<BR>> inside a package named=20 
"ptest":<BR>> <BR>> File1:<BR>> ------------------<BR>> = 
package=20 
ptest;<BR>> <BR>> class Myclass1 {<BR>>     = 
public=20 
int testInt =3D 5;<BR>> }<BR>> <BR>> class Myclass2=20 
{<BR>>     public String testString =3D = 
"Hi";<BR>>=20 
}<BR>> ----------------------------------------<BR>> <BR>>=20 
FileMain:<BR>> ------------------<BR>> package ptest;<BR>> = 
<BR>>=20 
public class FileMain {<BR>>     public static = 
void=20 
main(String[] args) = 
{<BR> >     &a mp;nbsp;  =20 
Myclass2 a =3D new Myclass2();  // Here Eclipse underlines=20 
Myclass2<BR> >     &a mp;nbsp;  =20 
System.out.println(a.testString);<BR>>     = 
}<BR>>=20 
}<BR>> ----------------------------------------<BR>> <BR>> = 
Eclipse=20 
compiles correctly (the program runs), but underlines in red<BR>> = 
"Myclass2"=20 
FileMain.<BR>> The code is perfectly legal since the first classes = 
(Myclass1=20 
and Myclass2)<BR>> have package visibility and if i use for example = 
JBuilder,=20 
it works<BR>> correctly and doesn't underline nothing. The result is = 
that i=20 
cannot work<BR>> with Eclipse, since in my program i've a lot of = 
classes=20 
(around 600) and i<BR>> grouped some of them by functionality in = 
various=20 
files, but Eclipse doesn't<BR>> recognize the type of the variables i = 
 
declared and all the advanced features<BR>> don't work.<BR>> Is = 
this a=20 
bug? Is there some workaround for this?<BR>> Thank you for your=20 
answers.<BR>> <BR>> Bitblaster<BR>> <BR>>=20 
</FONT></DIV></BODY></HTML> 
 
------=_NextPart_000_0238_01C335A7.21A0C220--
 |  
 |  
  | 
 | 
 | 
| Re: Is it a bug? Help me please [message #60535 is a reply to message #60183] | 
Wed, 18 June 2003 10:00    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
This is a multi-part message in MIME format. 
 
------=_NextPart_000_0015_01C335B2.B93D02A0 
Content-Type: text/plain; 
	charset="windows-1251" 
Content-Transfer-Encoding: quoted-printable 
 
Ok, thank you very much for your time, i'll wait for the next version of = 
Eclipse, but it looks strange to me that i'm the only who asked for this = 
bug (i installed Eclipse for the first time only 2 days ago). 
Bye! 
 
Bit 
  "Vasil Panushev" <v_panushev@prosyst.bg> ha scritto nel messaggio = 
news:bcpitm$epo$1@rogue.oti.com... 
  Hi=20 
 
  I've reproduced your situation on Eclipse 2.1 (200303272130) and the = 
line is really marked as error. 
 
  Funny thing is that the file FileMain isn't marked as "errorneus" in = 
the package explorer, the file gets compiled (I have a .class file) and = 
even I was able to run it.=20 
 
  I tryed to compile the same source outside of eclipse and it compiled = 
fine with JDK 1.3+ 
 
  however compilation with JDK 1.2.2 and 1.1.8 failed with: 
 
  FileMain.java:20: class ptest.Myclass2 is defined in Myclass1.java. = 
Because it is used outside of its source file, it should be defined in a = 
file called "Myclass2.java". 
                  System.out.println(a.testString); 
 
  The default setting for eclispe is to maintain the .class files JDK = 
1.1 compatible. Unfortunately setting the compatibility level to 1.4 = 
shows no effect - the line is still makred as error - so this looks like = 
an eclipse bug. 
 
  Best regards=20 
 
  Vasil 
 
 
  "Bitblaster" <bitblasters@yahoo.it> wrote in message = 
news:bcp8p7$5eu$1@rogue.oti.com... 
  > Hello, I've a little problem using Eclipse. If i create 2 file like = 
these 
  > inside a package named "ptest": 
  >=20 
  > File1: 
  > ------------------ 
  > package ptest; 
  >=20 
  > class Myclass1 { 
  >     public int testInt =3D 5; 
  > } 
  >=20 
  > class Myclass2 { 
  >     public String testString =3D "Hi"; 
  > } 
  > ---------------------------------------- 
  >=20 
  > FileMain: 
  > ------------------ 
  > package ptest; 
  >=20 
  > public class FileMain { 
  >     public static void main(String[] args) { 
  >         Myclass2 a =3D new Myclass2();  // Here Eclipse underlines = 
Myclass2 
  >         System.out.println(a.testString); 
  >     } 
  > } 
  > ---------------------------------------- 
  >=20 
  > Eclipse compiles correctly (the program runs), but underlines in red 
  > "Myclass2" FileMain. 
  > The code is perfectly legal since the first classes (Myclass1 and = 
Myclass2) 
  > have package visibility and if i use for example JBuilder, it works 
  > correctly and doesn't underline nothing. The result is that i cannot = 
work 
  > with Eclipse, since in my program i've a lot of classes (around 600) = 
and i 
  > grouped some of them by functionality in various files, but Eclipse = 
doesn't 
  > recognize the type of the variables i declared and all the advanced = 
features 
  > don't work. 
  > Is this a bug? Is there some workaround for this? 
  > Thank you for your answers. 
  >=20 
  > Bitblaster 
  >=20 
  >  
------=_NextPart_000_0015_01C335B2.B93D02A0 
Content-Type: text/html; 
	charset="windows-1251" 
Content-Transfer-Encoding: quoted-printable 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML><HEAD> 
<META http-equiv=3DContent-Type content=3D"text/html; = 
charset=3Dwindows-1251"> 
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR> 
<STYLE></STYLE> 
</HEAD> 
<BODY bgColor=3D#c0c0c0 background=3D""> 
<DIV><FONT face=3DArial size=3D2>Ok, thank you very much for your time, = 
i'll wait=20 
for the next version of Eclipse, but it looks strange to me = 
that i'm=20 
the only who asked for this bug (i installed Eclipse for the = 
first=20 
time only 2 days ago).</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2>Bye!</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>Bit</FONT></DIV> 
<BLOCKQUOTE dir=3Dltr=20 
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = 
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> 
  <DIV>"Vasil Panushev" <<A=20 
  href=3D"mailto:v_panushev@prosyst.bg">v_panushev@prosyst.bg</A>> ha = 
scritto=20 
  nel messaggio <A=20 
  = 
href=3D"news:bcpitm$epo$1@rogue.oti.com">news:bcpitm$epo$1@rogue.oti.com<= 
/A>...</DIV> 
  <DIV>Hi </DIV> 
  <DIV><FONT size=3D2></FONT> </DIV> 
  <DIV>I've reproduced your situation on Eclipse 2.1 (200303272130) and = 
the line=20 
  is really marked as error.</DIV> 
  <DIV><FONT size=3D2></FONT> </DIV> 
  <DIV><FONT size=3D2><FONT size=3D3>Funny thing is that the = 
file FileMain=20 
  isn't marked as "errorneus" in the package explorer, the = 
file gets=20 
  compiled (I have a .class file) and even I was able to run it.=20 
  </FONT></FONT></DIV> 
  <DIV><FONT size=3D2><FONT size=3D2></FONT></FONT> </DIV> 
  <DIV><FONT size=3D2><FONT size=3D3>I tryed to compile the same source = 
outside of=20 
  eclipse and it compiled fine with JDK 1.3+</FONT></FONT></DIV> 
  <DIV><FONT size=3D2><FONT size=3D3></FONT></FONT> </DIV> 
  <DIV><FONT size=3D2><FONT size=3D3>however compilation with JDK 1.2.2 = 
and 1.1.8=20 
  failed with:</FONT></DIV> 
  <DIV><BR>FileMain.java:20: class ptest.Myclass2 is defined in = 
Myclass1.java.=20 
  Because it is used outside of its source file, it should be defined in = 
a file=20 
  called=20 
  = 
"Myclass2.java".<BR>           = 
 ;       ;=20 
  System.out.println(a.testString);</DIV> 
  <DIV><BR><FONT size=3D3>The default setting for eclispe is to maintain = 
the=20 
  .class files JDK 1.1 compatible. Unfortunately setting the = 
compatibility level=20 
  to 1.4 shows no effect - the line is still makred as error - so = 
this=20 
  looks like an eclipse bug.</FONT></DIV> 
  <DIV> </DIV> 
  <DIV><FONT size=3D3>Best regards </FONT></DIV> 
  <DIV> </DIV> 
  <DIV><FONT size=3D3>Vasil</FONT></DIV> 
  <DIV><BR><BR>"Bitblaster" <bitblasters@yahoo.it> wrote in = 
message=20 
  news:bcp8p7$5eu$1@rogue.oti.com...<BR>> Hello, I've a little = 
problem using=20 
  Eclipse. If i create 2 file like these<BR>> inside a package named=20 
  "ptest":<BR>> <BR>> File1:<BR>> ------------------<BR>> = 
package=20 
  ptest;<BR>> <BR>> class Myclass1 = 
{<BR>>    =20 
  public int testInt =3D 5;<BR>> }<BR>> <BR>> class Myclass2=20 
  {<BR>>     public String testString =3D = 
"Hi";<BR>>=20 
  }<BR>> ----------------------------------------<BR>> <BR>>=20 
  FileMain:<BR>> ------------------<BR>> package ptest;<BR>> = 
<BR>>=20 
  public class FileMain {<BR>>     public static = 
void=20 
  main(String[] args) = 
{<BR> >     &a mp;nbsp;  =20 
  Myclass2 a =3D new Myclass2();  // Here Eclipse underlines=20 
  Myclass2<BR> >     &a mp;nbsp;  =20 
  System.out.println(a.testString);<BR>>     = 
}<BR>>=20 
  }<BR>> ----------------------------------------<BR>> <BR>> = 
Eclipse=20 
  compiles correctly (the program runs), but underlines in red<BR>>=20 
  "Myclass2" FileMain.<BR>> The code is perfectly legal since the = 
first=20 
  classes (Myclass1 and Myclass2)<BR>> have package visibility and if = 
i use=20 
  for example JBuilder, it works<BR>> correctly and doesn't underline = 
 
  nothing. The result is that i cannot work<BR>> with Eclipse, since = 
in my=20 
  program i've a lot of classes (around 600) and i<BR>> grouped some = 
of them=20 
  by functionality in various files, but Eclipse doesn't<BR>> = 
recognize the=20 
  type of the variables i declared and all the advanced features<BR>> = 
don't=20 
  work.<BR>> Is this a bug? Is there some workaround for = 
this?<BR>> Thank=20 
  you for your answers.<BR>> <BR>> Bitblaster<BR>> <BR>>=20 
  </FONT></DIV></BLOCKQUOTE></BODY></HTML> 
 
------=_NextPart_000_0015_01C335B2.B93D02A0--
 |  
 |  
  | 
 | 
 | 
| Re: Workaround found [message #61540 is a reply to message #61505] | 
Thu, 19 June 2003 03:49   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
I wrote emule, i mean Eclipse obviously ;-) 
 
"Bitblaster" <bitblasters@yahoo.it> ha scritto nel messaggio 
news:bcrpss$7mf$1@rogue.oti.com... 
So i bypassed the problem by adding the output folder as a class folder in 
the libraries, so that emule (stupidly) sees that there there is one file 
for each class and no longer underlines the class names.
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.05448 seconds