NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

"Output Window" location not working any longer

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Tue Jan 31, 2012 10:46 pm    Post subject: "Output Window" location not working any longer Reply with quote

Hello,

I have an application that runs fine and was started using NB 6.9, now I'm on 7.1

There is one problem though. I have two TopComponents that are registered to open in the "Output" Window location (i.e. below the editor).

But since I migrated to 7.1 these two windows no longer open below my TopComponents opened as mode Editor, but in the same place (so "hiding" the current editor).

The registration for the Window mode is done through the layer file.

How can I fix this, so that I the windows display below the current editor component when opened?

Could this be connected to the fact that apparently my project did was not "migrated" properly. See my question here: http://forums.netbeans.org/viewtopic.php?t=46275
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Wed Feb 01, 2012 2:14 pm    Post subject: Reply with quote

I have another problem with the new Window API:

I have a TopComponent that opens (should open) in the explorer "part". When this is opened during startup (because I have "openAtStartup = true") this works correctly.

However if I close the window and re-open it, it opens in the editor position not as an explorer window.

The component is annotated with

@TopComponent.Registration(mode = "explorer", openAtStartup = true)

What am I missing here?
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Thu Feb 02, 2012 10:02 pm    Post subject: Re: "Output Window" location not working any longer Reply with quote

tkellerer wrote:
But since I migrated to 7.1 these two windows no longer open below my TopComponents opened as mode Editor, but in the same place (so "hiding" the current editor).

The registration for the Window mode is done through the layer file.

How can I fix this, so that I the windows display below the current editor component when opened?
I'm still struggling to get my component opened at the correct position.

What I have tried so far was switching from layer registrion to annotation based registration (hoping that the "position" attribute would give me some control over where the component opens)

Then I tried to create my own Mode (inspired by http://blogs.oracle.com/geertjan/entry/creating_a_new_mode_in)

So my mode definition looks like this:
Code:

<mode version="2.4">
  <name unique="bottomeditor"  />
  <kind type="editor" />
  <state type="joined"  />
  <constraints>
    <path orientation="vertical" number="1" weight="0.2"/>
  </constraints>
  <bounds x="0" y="0" width="0" height="0" />
  <frame state="0"/>
    <empty-behavior permanent="false"/>
</mode>

I played around with the value for the "number" attribute because according to this page: http://core.netbeans.org/windowsystem/changes.html the number should control where in the layout the component opens.

But all to no avail.

The best I could do is to open my new component above the existing editor component, but I need it below the current one (and I don't want it sliding, it needs to be anchored (or fixed whatever the word is).

So how do I get the old behaviour back?
It seems that 7.1 has lost a major flexibility in the Window system compared to 6.9 Sad
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Thu Feb 02, 2012 10:17 pm    Post subject: Re: "Output Window" location not working any longer Reply with quote

tkellerer wrote:
The best I could do is to open my new component above the existing editor component, but I need it below the current one (and I don't want it sliding, it needs to be anchored (or fixed whatever the word is).
What I forgot to mention: even if I move the component to where it should be and the copy the contents of the generated .wsmode file into my own .wsmode file the component will still open above the existing one.
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Fri Feb 03, 2012 8:03 am    Post subject: Re: "Output Window" location not working any longer Reply with quote

tkellerer wrote:
The best I could do is to open my new component above the existing editor component, but I need it below the current one (and I don't want it sliding, it needs to be anchored (or fixed whatever the word is).
OK, I should have known that Geertjan would have something about this Wink

This blog explained what I was missing:

http://blogs.oracle.com/geertjan/entry/creating_a_new_split_in

In a nutshell: I had to "enable" splitting for the "editor" mode.

Now the only thing that is strange, is the behaviour of the "Explorer" mode.
Back to top
SheriffDerek



Joined: 15 Nov 2011
Posts: 3

PostPosted: Fri Feb 03, 2012 3:36 pm    Post subject: Reply with quote

The platform generates background files from your code the first time you build it, and the window position type is actually stored there.

Try doing a "Clean and Build All", and they should assume the proper behavior for their type.
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 475

PostPosted: Fri Feb 03, 2012 3:41 pm    Post subject: Reply with quote

SheriffDerek wrote:
The platform generates background files from your code the first time you build it, and the window position type is actually stored there.

Try doing a "Clean and Build All", and they should assume the proper behavior for their type.
I do a Clean and build between those tests.

The problem with the explorer is not between two runs, but while the application is running. The following happens:

- Clean & Builde
- Start application
- TopComponent is annotated with "mode = "explorer", openAtStartup = true" and thus is shown in the Explorer position
- I close the TopComponent
- I re-open the TopComponent using "Window -> MyComponent" (no restart of the application)
- Component opens in the editor position
Back to top
ikvaso



Joined: 05 Nov 2011
Posts: 14

PostPosted: Tue Feb 07, 2012 9:43 am    Post subject: Reply with quote

look at this: http://netbeans.org/bugzilla/show_bug.cgi?id=208059
maybe it helps
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo