Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 276848

Summary: [open type] Open Type -> sees Compare window as input equal (doesnt open java editor)
Product: [Eclipse Project] JDT Reporter: Johan Compagner <jcompagner>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, david.balazic
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Johan Compagner CLA 2009-05-19 05:41:57 EDT
in the latest 3.5 eclipse, currently using I20090430-2300, if i have a compare window open of Class X and then i quickly want to show the java editor of that class through open type dialog (to see a bit more of the code i am now looking through a synchronize/compare window at). But nothing happens, the open type dialog sees this Compare window as input equal now (or the general open editor command). And doesnt open a java editor anymore.

i dont think i have ever had this in 3.3 and so on

This is quite annoying behavior if you ask me, if you open the Open Type dialog then i dont expect to "open" a compare window. I want that type in its type editor..

Strange thing is that Open Resource does work fine.. That will open the java editor, i even dont have to do Open With-> xxxx. Just te default action works.
Comment 1 Dani Megert CLA 2009-05-19 05:47:44 EDT
This works as designed because during 3.5 the Java compare editor got enhanced with the most common Java features (code assist, ctrl+click, Ctrl+O etc.).

What are you still missing that requires you to open the real Java editor?

Also note that this only happens if the compare editor has the focus. In all other cases (e.g. just quickly switch to another editor) we will still open (or activate) the real Java editor.
Comment 2 Johan Compagner CLA 2009-05-19 06:36:56 EDT
The compare windows gives me a real small edit area.
It is nice for stuff like quick things. But it happens quite a lot that i want to just open it in a real editor.
And that it has different behavior depending on if it is selected is very weird.
Why should i open the type dialog, open the same file, if the file is selected in the compare window? What would be the usecase of that?
Why is not selected different in this area?

I would expect if you want this behavior to be completely reversed...

If it is the selected editor open the java editor (because the user really triggered for it even if it was the selected)
And if it is not the selected but the compare editor is open, Jump to it. Because it is already open and maybe the user just wanted to jump that that editor.

And also why does Open Resource work differently then?

So all in all the  current behavior is just weird in my eyes, totally not what you expect.
Comment 3 Dani Megert CLA 2009-05-19 07:00:03 EDT
>The compare windows gives me a real small edit area.
In case you are currently in compare and you need a bigger area you can make the editor are bigger.

> totally not what you expect.
I guess you wanted to say "what I expect" ;-)

>And also why does Open Resource work differently then?
Because the resource layer is not aware of Java / Java compare.

We'll see how it feels for others. If we get more bug reports about this we can reconsider to reopen but for now no action planned at this point.
Comment 4 Johan Compagner CLA 2009-05-19 07:14:34 EDT
we will see then

But for me (yes me :) ) it is strange that when i really ask to open a specific java class, when that class is shown in the selected editor compare window then i really dont want that just nothing happens.. I am really the only one that find that strange? Why would i do that action in the first place? If everything is just a no operation what ever i do?

for now i just have to get used to use open resource then

No making the compare window bigger really doesnt help. Yes i already have 1900x1200 pixels but that is still way to little. I have structure compare and so all configured in the compare so even a full screen editor will not help much.

Besides that all the popup menu's or the menu bar menu's are not really telling users anything.. Yes i know Call Hierarchy does work in the compare editor but only through the key combo, there is no (popup)menu that tells me that that action is there. And there are more stuff like that. It is just not that easy to use if you really want to navigate and check the current workspace java file when i have incomming changes from my co worker in the compare window of that file.
Comment 5 Dani Megert CLA 2009-05-25 10:22:24 EDT
It's actually more than just open type that's confusing users. We'll have a look into this for 3.6, see bug 277697.
Comment 6 David Balažic CLA 2011-03-30 06:44:15 EDT
(In reply to comment #1)
> What are you still missing that requires you to open the real Java editor?

 - larger edit area
 - Outline view
 - left bar for breakpoints
 - mark occurrences (can not be set, but shows highlight when set in real editor - which I found as a bad thing, but is a different topic)
 - do I really need to finish the list? It is obvious that the compare editor is no substitute for the real editor.