Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Refactor - rename (notice)
Refactor - rename (notice) [message #24564] Thu, 15 May 2003 12:16 Go to next message
Eclipse UserFriend
Hello,
I see Stanislav's sugestions for refactor - rename and try :
1) <javac target="1.1" and refactor -> rename don't work
2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor -> rename work

Conclusion :
refactor -> rename don't work with java > 1.3.1 (and other things, maybe)

regards
Haris Peco
Re: Refactor - rename (notice) [message #24688 is a reply to message #24564] Thu, 15 May 2003 11:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vkyr.nospam-ision.net

Well, at home I compile the "jdt.ui" sources with the Eclipse build in
compiler and Eclipse itself here runs with the Java Standard Edition (build
1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed mode). I have
NO problems with this way of compiling and afterwards using the compiled
"jdt.ui" from inside a runtime-workspace.

However, at the University computers I use the same approach, e.g. importing
the "jdt.ui" plugin into the workspace as an Eclipse project, recompiling it
and then using it inside an Eclipse runtime-workspace. There it doesn't work
and I always have the same behaviour that none of the Rename refactorings
works... STRANGE isn't it...

Valentino

"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:ba0630$83a$1@rogue.oti.com...
> Hello,
> I see Stanislav's sugestions for refactor - rename and try :
> 1) <javac target="1.1" and refactor -> rename don't work
> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor -> rename
work
>
> Conclusion :
> refactor -> rename don't work with java > 1.3.1 (and other things, maybe)
>
> regards
> Haris Peco
Re: Refactor - rename (notice) [message #24728 is a reply to message #24688] Thu, 15 May 2003 13:58 Go to previous messageGo to next message
Eclipse UserFriend
What java build is on University ?
I think that eclipse recompile don't really recompile all stuff or
that dependent from java version.
Valentino Kyriakides wrote:

> Well, at home I compile the "jdt.ui" sources with the Eclipse build in
> compiler and Eclipse itself here runs with the Java Standard Edition
> (build 1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed
> mode). I have NO problems with this way of compiling and afterwards using
> the compiled "jdt.ui" from inside a runtime-workspace.
>
> However, at the University computers I use the same approach, e.g.
> importing the "jdt.ui" plugin into the workspace as an Eclipse project,
> recompiling it and then using it inside an Eclipse runtime-workspace.
> There it doesn't work and I always have the same behaviour that none of
> the Rename refactorings works... STRANGE isn't it...
>
> Valentino
>
> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> news:ba0630$83a$1@rogue.oti.com...
>> Hello,
>> I see Stanislav's sugestions for refactor - rename and try :
>> 1) <javac target="1.1" and refactor -> rename don't work
>> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor -> rename
> work
>>
>> Conclusion :
>> refactor -> rename don't work with java > 1.3.1 (and other things, maybe)
>>
>> regards
>> Haris Peco
Re: Refactor - rename (notice) [message #24840 is a reply to message #24728] Thu, 15 May 2003 12:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vkyr.nospam-ision.net

AFAIK, it's also Java 1.4, but maybe there is also some other older JDK
installed, which Java is first found on the execution path. - Since I'am not
before next monday again in the University, I can't say for sure which
concrete Java version there is used. - I can tell you this for sure on
monday.

Valentino

"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:ba0c2s$ejv$1@rogue.oti.com...
> What java build is on University ?
> I think that eclipse recompile don't really recompile all stuff or
> that dependent from java version.
> Valentino Kyriakides wrote:
>
> > Well, at home I compile the "jdt.ui" sources with the Eclipse build in
> > compiler and Eclipse itself here runs with the Java Standard Edition
> > (build 1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed
> > mode). I have NO problems with this way of compiling and afterwards
using
> > the compiled "jdt.ui" from inside a runtime-workspace.
> >
> > However, at the University computers I use the same approach, e.g.
> > importing the "jdt.ui" plugin into the workspace as an Eclipse project,
> > recompiling it and then using it inside an Eclipse runtime-workspace.
> > There it doesn't work and I always have the same behaviour that none of
> > the Rename refactorings works... STRANGE isn't it...
> >
> > Valentino
> >
> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> > news:ba0630$83a$1@rogue.oti.com...
> >> Hello,
> >> I see Stanislav's sugestions for refactor - rename and try :
> >> 1) <javac target="1.1" and refactor -> rename don't work
> >> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor -> rename
> > work
> >>
> >> Conclusion :
> >> refactor -> rename don't work with java > 1.3.1 (and other things,
maybe)
> >>
> >> regards
> >> Haris Peco
>
Re: Refactor - rename (notice) [message #25152 is a reply to message #24840] Thu, 15 May 2003 16:53 Go to previous messageGo to next message
Eclipse UserFriend
It is important which VM is ant (from ant documentation)
If ant is <= 1.3 then <javac> tag in ant is default 1.1
Please check ant, too

regards
Haris Peco
Valentino Kyriakides wrote:

> AFAIK, it's also Java 1.4, but maybe there is also some other older JDK
> installed, which Java is first found on the execution path. - Since I'am
> not before next monday again in the University, I can't say for sure which
> concrete Java version there is used. - I can tell you this for sure on
> monday.
>
> Valentino
>
> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> news:ba0c2s$ejv$1@rogue.oti.com...
>> What java build is on University ?
>> I think that eclipse recompile don't really recompile all stuff or
>> that dependent from java version.
>> Valentino Kyriakides wrote:
>>
>> > Well, at home I compile the "jdt.ui" sources with the Eclipse build in
>> > compiler and Eclipse itself here runs with the Java Standard Edition
>> > (build 1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed
>> > mode). I have NO problems with this way of compiling and afterwards
> using
>> > the compiled "jdt.ui" from inside a runtime-workspace.
>> >
>> > However, at the University computers I use the same approach, e.g.
>> > importing the "jdt.ui" plugin into the workspace as an Eclipse project,
>> > recompiling it and then using it inside an Eclipse runtime-workspace.
>> > There it doesn't work and I always have the same behaviour that none of
>> > the Rename refactorings works... STRANGE isn't it...
>> >
>> > Valentino
>> >
>> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>> > news:ba0630$83a$1@rogue.oti.com...
>> >> Hello,
>> >> I see Stanislav's sugestions for refactor - rename and try :
>> >> 1) <javac target="1.1" and refactor -> rename don't work
>> >> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor -> rename
>> > work
>> >>
>> >> Conclusion :
>> >> refactor -> rename don't work with java > 1.3.1 (and other things,
> maybe)
>> >>
>> >> regards
>> >> Haris Peco
>>
Re: Refactor - rename (notice) [message #25274 is a reply to message #25152] Thu, 15 May 2003 17:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vkyr.nospam-ision.net

I don't think it has something todo with ant in my case. Don't forget, I
only use the imported "jdt.ui" which comes along with Eclipse 2.1 itself and
not any cvs server version with build.xml files like you seem to use. -
Beside that, the procedure I use (as I explained before...) is always the
same on the home and University computers, with the same Eclipse version,
but the rename refactorings behave absolute different on these machines.

AFAI can see, there is nothing which can be substancially changed related to
compile settings for an imported "jdt.ui" plugin under it's project
properties. But maybe I have overseen something here...?

Valentino

"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:ba0mae$o87$1@rogue.oti.com...
> It is important which VM is ant (from ant documentation)
> If ant is <= 1.3 then <javac> tag in ant is default 1.1
> Please check ant, too
>
> regards
> Haris Peco
> Valentino Kyriakides wrote:
>
> > AFAIK, it's also Java 1.4, but maybe there is also some other older JDK
> > installed, which Java is first found on the execution path. - Since I'am
> > not before next monday again in the University, I can't say for sure
which
> > concrete Java version there is used. - I can tell you this for sure on
> > monday.
> >
> > Valentino
> >
> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> > news:ba0c2s$ejv$1@rogue.oti.com...
> >> What java build is on University ?
> >> I think that eclipse recompile don't really recompile all stuff or
> >> that dependent from java version.
> >> Valentino Kyriakides wrote:
> >>
> >> > Well, at home I compile the "jdt.ui" sources with the Eclipse build
in
> >> > compiler and Eclipse itself here runs with the Java Standard Edition
> >> > (build 1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed
> >> > mode). I have NO problems with this way of compiling and afterwards
> > using
> >> > the compiled "jdt.ui" from inside a runtime-workspace.
> >> >
> >> > However, at the University computers I use the same approach, e.g.
> >> > importing the "jdt.ui" plugin into the workspace as an Eclipse
project,
> >> > recompiling it and then using it inside an Eclipse runtime-workspace.
> >> > There it doesn't work and I always have the same behaviour that none
of
> >> > the Rename refactorings works... STRANGE isn't it...
> >> >
> >> > Valentino
> >> >
> >> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> >> > news:ba0630$83a$1@rogue.oti.com...
> >> >> Hello,
> >> >> I see Stanislav's sugestions for refactor - rename and try :
> >> >> 1) <javac target="1.1" and refactor -> rename don't work
> >> >> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor ->
rename
> >> > work
> >> >>
> >> >> Conclusion :
> >> >> refactor -> rename don't work with java > 1.3.1 (and other things,
> > maybe)
> >> >>
> >> >> regards
> >> >> Haris Peco
> >>
>
Re: Refactor - rename (notice) [message #25315 is a reply to message #25274] Thu, 15 May 2003 20:36 Go to previous messageGo to next message
Eclipse UserFriend
If you compile jdt.ui then it is important jdk and ant if compile with ant
regards
Valentino Kyriakides wrote:

> I don't think it has something todo with ant in my case. Don't forget, I
> only use the imported "jdt.ui" which comes along with Eclipse 2.1 itself
> and not any cvs server version with build.xml files like you seem to use.
> - Beside that, the procedure I use (as I explained before...) is always
> the same on the home and University computers, with the same Eclipse
> version, but the rename refactorings behave absolute different on these
> machines.
>
> AFAI can see, there is nothing which can be substancially changed related
> to compile settings for an imported "jdt.ui" plugin under it's project
> properties. But maybe I have overseen something here...?
>
> Valentino
>
> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> news:ba0mae$o87$1@rogue.oti.com...
>> It is important which VM is ant (from ant documentation)
>> If ant is <= 1.3 then <javac> tag in ant is default 1.1
>> Please check ant, too
>>
>> regards
>> Haris Peco
>> Valentino Kyriakides wrote:
>>
>> > AFAIK, it's also Java 1.4, but maybe there is also some other older JDK
>> > installed, which Java is first found on the execution path. - Since
>> > I'am not before next monday again in the University, I can't say for
>> > sure
> which
>> > concrete Java version there is used. - I can tell you this for sure on
>> > monday.
>> >
>> > Valentino
>> >
>> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>> > news:ba0c2s$ejv$1@rogue.oti.com...
>> >> What java build is on University ?
>> >> I think that eclipse recompile don't really recompile all stuff or
>> >> that dependent from java version.
>> >> Valentino Kyriakides wrote:
>> >>
>> >> > Well, at home I compile the "jdt.ui" sources with the Eclipse build
> in
>> >> > compiler and Eclipse itself here runs with the Java Standard Edition
>> >> > (build 1.4.1-b21) RFE (Java HotSpot Client VM build 1.4.1-b21, mixed
>> >> > mode). I have NO problems with this way of compiling and afterwards
>> > using
>> >> > the compiled "jdt.ui" from inside a runtime-workspace.
>> >> >
>> >> > However, at the University computers I use the same approach, e.g.
>> >> > importing the "jdt.ui" plugin into the workspace as an Eclipse
> project,
>> >> > recompiling it and then using it inside an Eclipse
>> >> > runtime-workspace. There it doesn't work and I always have the same
>> >> > behaviour that none
> of
>> >> > the Rename refactorings works... STRANGE isn't it...
>> >> >
>> >> > Valentino
>> >> >
>> >> > "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>> >> > news:ba0630$83a$1@rogue.oti.com...
>> >> >> Hello,
>> >> >> I see Stanislav's sugestions for refactor - rename and try :
>> >> >> 1) <javac target="1.1" and refactor -> rename don't work
>> >> >> 2) recompile all with jdk 1.3.1 (and ant 1.5.3) and refactor ->
> rename
>> >> > work
>> >> >>
>> >> >> Conclusion :
>> >> >> refactor -> rename don't work with java > 1.3.1 (and other things,
>> > maybe)
>> >> >>
>> >> >> regards
>> >> >> Haris Peco
>> >>
>>
Re: Refactor - rename (notice) [message #25726 is a reply to message #24564] Fri, 16 May 2003 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sbernatsky.ukr.net

Hello.
snpe wrote:
> Conclusion :
> refactor -> rename don't work with java > 1.3.1 (and other things, maybe)

I think that I've found the cause of 'refactor -> rename' problem.
1) My version of eclipse and j2sdk's:
Eclipse Platform: Version: 2.1.1; Build id: 200304301350
J2sdk: a) sun j2sdk build 1.3.1_07-b02;
b) sun j2sdk build 1.4.1_02-b06.

2) When I compiled eclipse sources with javac from j2sdk 1.3.1_07-b02 I
FORTUNATELY received this lines in .log file:
!SESSION may 16, 2003 12:30:17.252
---------------------------------------------
java.version=1.3.1_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Command-line arguments: -os win32 -ws win32 -arch x86 -install
file:R:/eclipse-build/feature-zips/1/
!ENTRY org.eclipse.ui 4 4 may 16, 2003 12:30:17.252
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 may 16, 2003 12:30:17.262
!MESSAGE try to access method
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaEl ementAction.run(Lorg/eclipse/jface/viewers/IStructuredSelect ion;)V
from class org.eclipse.jdt.ui.actions.RenameAction
!STACK 0
java.lang.IllegalAccessError: try to access method
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaEl ementAction.run(Lorg/eclipse/jface/viewers/IStructuredSelect ion;)V
from class org.eclipse.jdt.ui.actions.RenameAction
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.jav a:116)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:191)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:169)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:456)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionContributionItem.java:403)
at
org.eclipse.jface.action.ActionContributionItem.access$000(A ctionContributionItem.java:44)
at
org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(ActionContributionItem.java:72)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1838)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1545)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:845)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
------------------------------------------------------------ --------------------

3) Then I start exploring eclipse sources and found following:
public interface org.eclipse.jface.viewers.ISelection {...}
public interface org.eclipse.jface.viewers.IStructuredSelection extends
org.eclipse.jface.viewers.ISelection {...}

public class org.eclipse.jdt.ui.actions.SelectionDispatchAction ... {
...
protected void run(IStructuredSelection selection) {
run((ISelection)selection); // line 127
}
protected void run(ISelection selection) {
}
}
public class org.eclipse.jdt.ui.actions.RenameAction extends
org.eclipse.jdt.ui.actions.SelectionDispatchAction ... {
...
protected void run(IStructuredSelection selection) {
fRenameJavaElement.run(selection); // line 116
}
}
public class
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaEl ementAction
extends org.eclipse.jdt.ui.actions.SelectionDispatchAction ... {
...
protected void run(IStructuredSelection selection) {...}
}

4) When I wrote a simple test program which emulates this behaviour:
//-- eclipse/a/Parent.java -------------------------------------
package eclipse.a;

public class Parent {
public Parent() {}

protected void doSmth(Object obj) {
System.err.println("Parent.doSmth(Object '" + obj + "')");
}

protected void doSmth(String str) {
System.err.println("Parent.doSmth(String '" + str + "')");
doSmth((Object)str);
}
}
//---------------------------------------------------------- ----
//-- eclipse/a/DerivedA.java -----------------------------------
package eclipse.a;

import eclipse.b.DerivedB;

public class DerivedA extends Parent {
private final DerivedB derivedB;

public DerivedA(DerivedB derivedB) {
super();
this.derivedB = derivedB;
}

protected void doSmth(String str) {
System.err.println("DerivedA.doSmth(String '" + str + "')");
derivedB.doSmth((String)str);
}

public static void main(String[] args) {
DerivedB b = new DerivedB();
DerivedA a = new DerivedA(b);
a.doSmth("TEST");
}
}
//---------------------------------------------------------- ----
//-- eclipse/b/DerivedB.java -----------------------------------
package eclipse.b;

import eclipse.a.Parent;

public class DerivedB extends Parent {

public DerivedB() {
super();
}

protected void doSmth(String str) {
System.err.println("DerivedB.doSmth(String '" + str + "')");
}

}
//---------------------------------------------------------- ----

5) I used eclipse to compile sources and sun j2sdk 1.3.1_07-b02 to
runtime. And for different compile options I got different output:
a) eclipse compiler; complience level=1.3; .class compat.=1.1
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>DerivedB.doSmth(String 'TEST')

b) eclipse compiler; complience level=1.3; .class compat.=1.2
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>DerivedB.doSmth(String 'TEST')

c) eclipse compiler; complience level=1.3; .class compat.=1.3
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>DerivedB.doSmth(String 'TEST')

d) eclipse compiler; complience level=1.4; .class compat.=1.1
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>Parent.doSmth(Object 'TEST')

e) eclipse compiler; complience level=1.4; .class compat.=1.2
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>Parent.doSmth(Object 'TEST')

f) eclipse compiler; complience level=1.4; .class compat.=1.3
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>Parent.doSmth(Object 'TEST')

g) sun j2sdk 1.3.1_07-b02 compiler; '-target 1.1'
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>DerivedB.doSmth(String 'TEST')

h) sun j2sdk 1.3.1_07-b02 compiler; '-target 1.3'
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>DerivedB.doSmth(String 'TEST')

i) sun j2sdk 1.4.1_02-b06 compiler; '-target 1.1'
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>Parent.doSmth(Object 'TEST')

i) sun j2sdk 1.4.1_02-b06 compiler; '-target 1.3'
>java eclipse.a.DerivedA
>DerivedA.doSmth(String 'TEST')
>Parent.doSmth(Object 'TEST')

Best regards,
Stanislav Bernatsky.
Re: Refactor - rename (notice) [message #26096 is a reply to message #25726] Fri, 16 May 2003 10:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sbernatsky.ukr.net

Hello again.
Seems to be working for build with sun j2sdk 1.4.1_02-b06 javac; target
"1.3"
--begin-------------------------------------------
---
org.eclipse.jdt.ui\ui\org\eclipse\jdt\ui\actions\RenameActio n.java.orig Thu
May 15 08:42:35 2003
+++ org.eclipse.jdt.ui\ui\org\eclipse\jdt\ui\actions\RenameActio n.java Fri
May 16 12:16:17 2003
@@ -113,7 +113,7 @@

protected void run(IStructuredSelection selection) {
if (fRenameJavaElement.isEnabled())
- fRenameJavaElement.run(selection);
+ ((SelectionDispatchAction)fRenameJavaElement).run((IStructur edSelection)selection);
if (fRenameResource != null && fRenameResource.isEnabled())
fRenameResource.run(selection);
}
--end---------------------------------------------

Best regards,
Stanislav Bernatsky.

PS. Using this patch with sun j2sdk 1.3.1_07-b02 javac; target "1.3" ends
with other errors during runtime.
Re: Refactor - rename (notice) [message #26178 is a reply to message #26096] Fri, 16 May 2003 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

Stanislav,
if there's something that we can fix,
can you enter your findings in a bug report against jdt ui?
thanks

a.
--
eclipse.org
Re: Refactor - rename (notice) [message #26518 is a reply to message #26096] Fri, 16 May 2003 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Hello Stanislav,
I try this with java 1.4.1-b21 (linux).Refactor -> rename work (I cast
second fRenameJavaElement.run(selection),too ).
I try Parent,DerivedA i DerivedB, too
In eclipse with compliance 1.4 I get 'Parent.doSmth ...' (this is
bug,probably),
but from command line this is fine and print : DerivedB.doSmth ... for every
combination -source and -target (and every combination in jdk 1.3.1)
My question :
What is compliance in eclipse / (options source, target ??) ?
What options use You from commnad line with j2sdk 1.4.1 ?
What compiler use eclipse - I can change JRE, but I don't know change
compiler ?

Thanks
Haris Peco

Stanislav Bernatsky wrote:

> Hello again.
> Seems to be working for build with sun j2sdk 1.4.1_02-b06 javac; target
> "1.3"
> --begin-------------------------------------------
> ---
> org.eclipse.jdt.ui\ui\org\eclipse\jdt\ui\actions\RenameActio n.java.orig
> Thu May 15 08:42:35 2003
> +++ org.eclipse.jdt.ui\ui\org\eclipse\jdt\ui\actions\RenameActio n.java Fri
> May 16 12:16:17 2003
> @@ -113,7 +113,7 @@
>
> protected void run(IStructuredSelection selection) {
> if (fRenameJavaElement.isEnabled())
> - fRenameJavaElement.run(selection);
> +
>
((SelectionDispatchAction)fRenameJavaElement).run((IStructur edSelection)selection);
> if (fRenameResource != null && fRenameResource.isEnabled())
> fRenameResource.run(selection);
> }
> --end---------------------------------------------
>
> Best regards,
> Stanislav Bernatsky.
>
> PS. Using this patch with sun j2sdk 1.3.1_07-b02 javac; target "1.3" ends
> with other errors during runtime.
Re: Refactor - rename (notice) [message #28239 is a reply to message #26518] Mon, 19 May 2003 04:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sbernatsky.ukr.net

Hello.

snpe wrote:
> I try this with java 1.4.1-b21 (linux).Refactor -> rename work (I cast
> second fRenameJavaElement.run(selection),too ).
If I compile eclipse with j2sdk 1.3.1_07-b02 javac with target "1.3" I get
some errors on '.log' file but 'refactor->rename' works. For more see
below.
I'm going to add 'Thread.dumpStack()' line to
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(ISele ction
selection) method (which is empty now) to find if call from
RenameJavaElementAction.run() dispatches there. I'll post result later and
if it will appear to be true then I'll fill a bugreport.

> I try Parent,DerivedA i DerivedB, too
> In eclipse with compliance 1.4 I get 'Parent.doSmth ...' (this is
> bug,probably),
> but from command line this is fine and print : DerivedB.doSmth ... for every
> combination -source and -target (and every combination in jdk 1.3.1)
> My question :
> What is compliance in eclipse / (options source, target ??) ?
> What options use You from commnad line with j2sdk 1.4.1 ?
> What compiler use eclipse - I can change JRE, but I don't know change
> compiler ?
I also think that a call to the 'Parent.doSmth ...' is a bug, but I don't
know whose (eclipse or compiler). ;)
As I wrote earlier I used different compilers (eclipse running on sun
j2sdk 1.3.1_07-b02 for windows, sun j2sdk 1.3.1_07-b02 for windows and sun
j2sdk 1.4.1_02-b06 for windows) with different options (for exact options
see my previous posts) and sun j2sdk 1.3.1_07-b02 for windows to run
example. In short I've got 'Parent.doSmth ...' in these cases:
a) eclipse compiler with complience level set to '1.4' and any class
compatibility option;
b) sun j2sdk 1.4.1_02-b06 compiler with any target (command line is 'javac
-target "1.3" ...' or 'javac -target "1.1" ...' no -source option).

I've used posted patch to compile eclipse with different javac's with
different options. Then I ran obtained code in different jvm's and got
results shown below in table.
buildtime jvm javac target runtime jvm result comment
1,3 1,1 1,3 ok
1,3 1,1 1,4 ok
1,3 1,3 1,3 fail some errors in '.log'
file
1,3 1,3 1,4 fail some errors in '.log'
file
1,4 1,1 1,3 ok
1,4 1,1 1,4 ok
1,4 1,3 1,3 ok
1,4 1,3 1,4 ok
1,4 1,4 1,4 ok

Best regards,
Stanislav Bernatsky.
Re: Refactor - rename (notice) [message #28315 is a reply to message #26178] Mon, 19 May 2003 04:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sbernatsky.ukr.net

Hello, Adam.

Adam Kiezun wrote:
> Stanislav,
> if there's something that we can fix,
> can you enter your findings in a bug report against jdt ui?
> thanks
Adam, please correct me if I'm wrong. I think that there should be a:
org.eclipse.jdt.ui.actions.RenameAction.run(IStructuredSelec tion
selection) ->
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaEl ementAction.run(IStructuredSelection
selection)
call sequence rather then:
org.eclipse.jdt.ui.actions.RenameAction.run(IStructuredSelec tion
selection) ->
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(IStru cturedSelection
selection) ->
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(ISele ction
selection)
call sequence.

Best regards,
Stanislav Bernatsky.
Re: Refactor - rename (notice) [message #29083 is a reply to message #28239] Mon, 19 May 2003 08:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
Stanislav Bernatsky wrote:
> Hello.
>
> snpe wrote:
>> I try this with java 1.4.1-b21 (linux).Refactor -> rename work (I cast
>> second fRenameJavaElement.run(selection),too ).
> If I compile eclipse with j2sdk 1.3.1_07-b02 javac with target "1.3" I get
> some errors on '.log' file but 'refactor->rename' works. For more see
> below.
> I'm going to add 'Thread.dumpStack()' line to
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(ISele ction
> selection) method (which is empty now) to find if call from
> RenameJavaElementAction.run() dispatches there. I'll post result later and
> if it will appear to be true then I'll fill a bugreport.
>
>> I try Parent,DerivedA i DerivedB, too
>> In eclipse with compliance 1.4 I get 'Parent.doSmth ...' (this is
>> bug,probably),
>> but from command line this is fine and print : DerivedB.doSmth ... for
>> every combination -source and -target (and every combination in jdk
>> 1.3.1) My question :
>> What is compliance in eclipse / (options source, target ??) ?
>> What options use You from commnad line with j2sdk 1.4.1 ?
>> What compiler use eclipse - I can change JRE, but I don't know change
>> compiler ?
> I also think that a call to the 'Parent.doSmth ...' is a bug, but I don't
> know whose (eclipse or compiler). ;)
> As I wrote earlier I used different compilers (eclipse running on sun
> j2sdk 1.3.1_07-b02 for windows, sun j2sdk 1.3.1_07-b02 for windows and sun
> j2sdk 1.4.1_02-b06 for windows) with different options (for exact options
> see my previous posts) and sun j2sdk 1.3.1_07-b02 for windows to run
> example. In short I've got 'Parent.doSmth ...' in these cases:
> a) eclipse compiler with complience level set to '1.4' and any class
> compatibility option;
> b) sun j2sdk 1.4.1_02-b06 compiler with any target (command line is 'javac
> -target "1.3" ...' or 'javac -target "1.1" ...' no -source option).
>
> I've used posted patch to compile eclipse with different javac's with
> different options. Then I ran obtained code in different jvm's and got
> results shown below in table.
> buildtime jvm javac target runtime jvm result comment
> 1,3 1,1 1,3 ok
> 1,3 1,1 1,4 ok
> 1,3 1,3 1,3 fail some errors in '.log'
> file
> 1,3 1,3 1,4 fail some errors in '.log'
> file
> 1,4 1,1 1,3 ok
> 1,4 1,1 1,4 ok
> 1,4 1,3 1,3 ok
> 1,4 1,3 1,4 ok
> 1,4 1,4 1,4 ok
>
> Best regards,
> Stanislav Bernatsky.
I see.Eclipse have internal compiler and we can't use external compiler in
eclipse, but behavior is same with eclipse compliance 1.3-jdk 1.3.1 and
eclipse complinace 1.4- jdk 1.4.
What is correct ?
I think that eclipse's choice that use protected method in different package
is a problem.
DerivedA don't see protected method in DerivedB and maybe that is correct
Parent.doSmth("String ...) and jdk 1.3 and jdk 1.4 aren't correct, but I
don't know.

regards
Haris Peco
Re: Refactor - rename (notice) [message #31604 is a reply to message #28239] Tue, 20 May 2003 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vkyr.nospam-ision.net

I believe Stanislav is right here! - Even I use another "jdt.ui" import
plugin project approach, I always have to setup under the
"Compiler->Compliance and Classfiles" preferences seetings for the "jdt.ui"
project a compiler compliance level of "1.3". If I set the compiler
compliance level to "1,4" for the jdt.ui project the "rename" refactorings
don't work after a compilation and run in the runtime-workspace (the used
jvm is 1.4.1_02).

So in sum up the rename refactorings from the jdt.ui don't work for me with
a compiler compliance level of "1.4" and thus only with compliance level
"1.3".

Valentino



"Stanislav Bernatsky" <sbernatsky@ukr.net> schrieb im Newsbeitrag
news:baa4ab$lot$1@rogue.oti.com...
> Hello.
>
> snpe wrote:
> > I try this with java 1.4.1-b21 (linux).Refactor -> rename work (I
cast
> > second fRenameJavaElement.run(selection),too ).
> If I compile eclipse with j2sdk 1.3.1_07-b02 javac with target "1.3" I get
> some errors on '.log' file but 'refactor->rename' works. For more see
> below.
> I'm going to add 'Thread.dumpStack()' line to
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(ISele ction
> selection) method (which is empty now) to find if call from
> RenameJavaElementAction.run() dispatches there. I'll post result later and
> if it will appear to be true then I'll fill a bugreport.
>
> > I try Parent,DerivedA i DerivedB, too
> > In eclipse with compliance 1.4 I get 'Parent.doSmth ...' (this is
> > bug,probably),
> > but from command line this is fine and print : DerivedB.doSmth ... for
every
> > combination -source and -target (and every combination in jdk 1.3.1)
> > My question :
> > What is compliance in eclipse / (options source, target ??) ?
> > What options use You from commnad line with j2sdk 1.4.1 ?
> > What compiler use eclipse - I can change JRE, but I don't know change
> > compiler ?
> I also think that a call to the 'Parent.doSmth ...' is a bug, but I don't
> know whose (eclipse or compiler). ;)
> As I wrote earlier I used different compilers (eclipse running on sun
> j2sdk 1.3.1_07-b02 for windows, sun j2sdk 1.3.1_07-b02 for windows and sun
> j2sdk 1.4.1_02-b06 for windows) with different options (for exact options
> see my previous posts) and sun j2sdk 1.3.1_07-b02 for windows to run
> example. In short I've got 'Parent.doSmth ...' in these cases:
> a) eclipse compiler with complience level set to '1.4' and any class
> compatibility option;
> b) sun j2sdk 1.4.1_02-b06 compiler with any target (command line is 'javac
> -target "1.3" ...' or 'javac -target "1.1" ...' no -source option).
>
> I've used posted patch to compile eclipse with different javac's with
> different options. Then I ran obtained code in different jvm's and got
> results shown below in table.
> buildtime jvm javac target runtime jvm result comment
> 1,3 1,1 1,3 ok
> 1,3 1,1 1,4 ok
> 1,3 1,3 1,3 fail some errors in '.log'
> file
> 1,3 1,3 1,4 fail some errors in '.log'
> file
> 1,4 1,1 1,3 ok
> 1,4 1,1 1,4 ok
> 1,4 1,3 1,3 ok
> 1,4 1,3 1,4 ok
> 1,4 1,4 1,4 ok
>
> Best regards,
> Stanislav Bernatsky.
>
Re: Refactor - rename (notice) [message #31913 is a reply to message #31604] Tue, 20 May 2003 13:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Tue, 20 May 2003 17:29:14 +0200, "Valentino Kyriakides"
<vkyr@nospam-ision.net> wrote:
>I believe Stanislav is right here! - Even I use another "jdt.ui" import
>plugin project approach, I always have to setup under the
>"Compiler->Compliance and Classfiles" preferences seetings for the "jdt.ui"
>project a compiler compliance level of "1.3". If I set the compiler
>compliance level to "1,4" for the jdt.ui project the "rename" refactorings
>don't work after a compilation and run in the runtime-workspace (the used
>jvm is 1.4.1_02).
>
>So in sum up the rename refactorings from the jdt.ui don't work for me with
>a compiler compliance level of "1.4" and thus only with compliance level
>"1.3".
Look at bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37846.
This is a bug in the JDT/UI refactoring code.
--
Olivier
Re: Refactor - rename (notice) [message #32157 is a reply to message #25726] Tue, 20 May 2003 17:45 Go to previous message
Eclipse UserFriend
Hello,

....
> 5) I used eclipse to compile sources and sun j2sdk 1.3.1_07-b02 to
> runtime. And for different compile options I got different output:
> a) eclipse compiler; complience level=1.3; .class compat.=1.1
>>java eclipse.a.DerivedA
>>DerivedA.doSmth(String 'TEST')
>>DerivedB.doSmth(String 'TEST')
>
> b) eclipse compiler; complience level=1.3; .class compat.=1.2
>>java eclipse.a.DerivedA
>>DerivedA.doSmth(String 'TEST')
>>DerivedB.doSmth(String 'TEST')
>
> c) eclipse compiler; complience level=1.3; .class compat.=1.3
>>java eclipse.a.DerivedA
>>DerivedA.doSmth(String 'TEST')
>>DerivedB.doSmth(String 'TEST')
>
> d) eclipse compiler; complience level=1.4; .class compat.=1.1
>>java eclipse.a.DerivedA
>>DerivedA.doSmth(String 'TEST')
>>Parent.doSmth(Object 'TEST')
>
> e) eclipse compiler; complience level=1.4; .class compat.=1.2
>>java eclipse.a.DerivedA
>>DerivedA.doSmth(String 'TEST')
>>Parent.doSmth(Object 'TEST')
>

Why not this (jdk 1.4) :

DerivedA.doSmth(String 'TEST')
Parent.doSmth(String 'TEST')
Parent.doSmth(Object 'TEST')

Is it bug in jdk 1.4, yet ?

regards
Haris Peco
Re: Refactor - rename (notice) [message #32610 is a reply to message #31913] Tue, 20 May 2003 17:30 Go to previous message
Eclipse UserFriend
Originally posted by: vkyr.nospam-ision.net

I already know, that it is a bug (see the other older rename refactoring
threads...). - Just wanted to point out (since Adam asked so before...) that
it effects you also, when you import and recompile workspace plugins from
the Eclipse SDK distribution instead of the CVS repository way via the 1.4
compiler compliance level.

Valentino

"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> schrieb im Newsbeitrag
news:dlpkcv4jkk02klu8v3iofb38ddnkk3jd71@4ax.com...
> On Tue, 20 May 2003 17:29:14 +0200, "Valentino Kyriakides"
> <vkyr@nospam-ision.net> wrote:
> >I believe Stanislav is right here! - Even I use another "jdt.ui" import
> >plugin project approach, I always have to setup under the
> >"Compiler->Compliance and Classfiles" preferences seetings for the
"jdt.ui"
> >project a compiler compliance level of "1.3". If I set the compiler
> >compliance level to "1,4" for the jdt.ui project the "rename"
refactorings
> >don't work after a compilation and run in the runtime-workspace (the used
> >jvm is 1.4.1_02).
> >
> >So in sum up the rename refactorings from the jdt.ui don't work for me
with
> >a compiler compliance level of "1.4" and thus only with compliance level
> >"1.3".
> Look at bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37846.
> This is a bug in the JDT/UI refactoring code.
> --
> Olivier
Re: Refactor - rename (notice) [message #32715 is a reply to message #32610] Tue, 20 May 2003 17:36 Go to previous message
Eclipse UserFriend
Originally posted by: adam.kiezun.gmx.net.remove

> when you import and recompile workspace plugins from
> the Eclipse SDK distribution instead of the CVS repository way via the 1.4
> compiler compliance level.

eclipse is currently at the jdk 1.3 level
so i would not be surprised if other things were broken as well

eclipse 3.0 will be jdk1.4 (we will switch soon - afaiRemember we're waitning
for
a decent 1.4 implementation on some platforms)


a.
--
eclipse.org
Previous Topic:Luanch configuration GUI and classpath
Next Topic:If I could launch Eclipse help as a web browser?
Goto Forum:
  


Current Time: Sun May 11 08:21:53 EDT 2025

Powered by FUDForum. Page generated in 0.06092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top