Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Open Type & keep position within file
Open Type & keep position within file [message #803305] Tue, 21 February 2012 01:52 Go to next message
Eclipse UserFriend
Hello,

I would like to know, if there is any solution to the following problem:

1) I just edit let's say file Foo.java, scrolling to the very bottom of the file and making changes there.

2) Afterwards I edit several other files.

3) Then I want to go back to file Foo.java. I press Ctrl+Shift+T (Open Type) to open it, but the previous cursor position is lost and the file is opened at the beginning, although I didn't close the editor view. Thus I must search through the file for my last changed lines.

The position is resetted only for JAva files. XML, Resourcebundles etc. are OK...

Is there any way how to stop resetting cursor position within Java files ?

Thanks
Mike
Re: Open Type & keep position within file [message #803326 is a reply to message #803305] Tue, 21 February 2012 02:34 Go to previous messageGo to next message
Eclipse UserFriend
On 21.02.2012 07:52, Mike Dundee wrote:
> Hello,
>
> I would like to know, if there is any solution to the following problem:
>
> 1) I just edit let's say file Foo.java, scrolling to the very bottom
> of the file and making changes there.
>
> 2) Afterwards I edit several other files.
>
> 3) Then I want to go back to file Foo.java. I press Ctrl+Shift+T (Open
> Type) to open it, but the previous cursor position is lost and the
> file is opened at the beginning, although I didn't close the editor
> view. Thus I must search through the file for my last changed lines.
>
> The position is resetted only for JAva files. XML, Resourcebundles
> etc. are OK...
'Open Type' goes to the selected type. There can be many in one actual
file/editor, hence we always select the type declaration.
>
> Is there any way how to stop resetting cursor position within Java
> files ?
No, but there are other ways to get what you want
- use 'Open Resource' instead of 'Open Type'
- use the Navigation history
- use Next/Previous Editor
- use Switch to Editor

Dani
>
> Thanks
> Mike
Re: Open Type & keep position within file [message #803449 is a reply to message #803326] Tue, 21 February 2012 06:12 Go to previous message
Eclipse UserFriend
yes, I could use it, but it is always best to have one universal shortcut to open type for which I know the name.
Otherwise I would have to think which shortcut I should use, which is very inconvenient.

- 'Switch to Editor' => it must already be open, if not - I have to 'Open Type'
- 'Open Resource' => lists many unwanted files, resources etc. I need only Types
- Navigation History => takes longer to go through the list than simply finding it via 'Open Type'

Anyway I use 'Next/Previous Editor' quite a lot, but again when the file I am looking for is deeper in history, it is slow...

So that's why I use one simple shortcut 'Open Type'. The only drawback is resetting the position.

[Updated on: Tue, 21 February 2012 06:56] by Moderator

Previous Topic:how to run an external tool in a view?
Next Topic:Getting sources for a (bundle) JarPackageFragmentRoot
Goto Forum:
  


Current Time: Sat May 24 13:04:11 EDT 2025

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

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

Back to the top