Developing SDI applications in Netbeans

View: New views
6 Messages — Rating Filter:   Alert me  

Developing SDI applications in Netbeans

by Dexter Riley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.  I'm starting work on a new project, and would like to use Netbeans as the RCP framework. The problem is, our customer prefers a single document interface for our application, which Netbeans no longer officially supports.  My question is, has anyone out there recently developed an SDI application using the Netbeans RCP framework, and if so, how did you re-enable or replace the now-missing SDI functionality?

Thanks,

Ed





Re: Developing SDI applications in Netbeans

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't think it supports it specifically. Though have a look at these. Might help:


Quintin Beukes


On Fri, Oct 30, 2009 at 6:05 PM, edbeaty <edbeaty@...> wrote:
Hello.  I'm starting work on a new project, and would like to use Netbeans as the RCP framework. The problem is, our customer prefers a single document interface for our application, which Netbeans no longer officially supports.  My question is, has anyone out there recently developed an SDI application using the Netbeans RCP framework, and if so, how did you re-enable or replace the now-missing SDI functionality?

Thanks,

Ed






Re: Developing SDI applications in Netbeans

by tomwheel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Support for it was removed a few releases ago, so it's not built in.
That said, it's possible to replace NetBeans' own Window System with
your own implementation that has the behavior you want.  I wrote an
FAQ entry about it:

    http://wiki.netbeans.org/DevFaqReplaceWindowSystem

The part about DummyWindowManager will probably be of special interest
to you since it opens each TopComponent in its own window.

Feel free to update the FAQ based on what you learn.

On Fri, Oct 30, 2009 at 11:05 AM, edbeaty <edbeaty@...> wrote:

> Hello.  I'm starting work on a new project, and would like to use Netbeans as the RCP framework. The problem is, our customer prefers a single document interface for our application, which Netbeans no longer officially supports.  My question is, has anyone out there recently developed an SDI application using the Netbeans RCP framework, and if so, how did you re-enable or replace the now-missing SDI functionality?
>
> Thanks,
>
> Ed
>
>
>
>
>



--
Tom Wheeler
http://www.tomwheeler.com/

Re: Developing SDI applications in Netbeans

by Gregg Wonderly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom Wheeler wrote:

> Support for it was removed a few releases ago, so it's not built in.
> That said, it's possible to replace NetBeans' own Window System with
> your own implementation that has the behavior you want.  I wrote an
> FAQ entry about it:
>
>     http://wiki.netbeans.org/DevFaqReplaceWindowSystem
>
> The part about DummyWindowManager will probably be of special interest
> to you since it opens each TopComponent in its own window.
>
> Feel free to update the FAQ based on what you learn.

Tom, is there an @ServiceProvider annotation use that will do the same thing as
the #- prefix to remove the old one?  Does the position value take care of this
if you know the other position value, or is there a way to make sure yours is
the one used if you use the annotation?

Gregg Wonderly

Re: Developing SDI applications in Netbeans

by tomwheel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm just now switching to the 6.7.1 platform and so I haven't yet used
the annotations much.  That said, the @ServiceProvider annotation's
javadoc:

   http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/lookup/ServiceProvider.html

indicates that you could set the position and/or specify a list of
implementations which your own implementation supersedes.  If you
manage to get it working, it would be great if you could put a quick
example in this FAQ entry:

    http://wiki.netbeans.org/DevFaqLookupHowToOverride

On Fri, Oct 30, 2009 at 1:30 PM, Gregg Wonderly <gregg@...> wrote:
> Tom, is there an @ServiceProvider annotation use that will do the same thing
> as the #- prefix to remove the old one?  Does the position value take care
> of this if you know the other position value, or is there a way to make sure
> yours is the one used if you use the annotation?



--
Tom Wheeler
http://www.tomwheeler.com/

Re: Developing SDI applications in Netbeans

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gregg Wonderly wrote:
> is there an @ServiceProvider annotation use that will do the same
> thing as the #- prefix to remove the old one?  Does the position value
> take care of this if you know the other position value, or is there a
> way to make sure yours is the one used if you use the annotation?

You can do either. Since the standard decl is (*)

package org.netbeans.core.windows;
@ServiceProvider(service=WindowManager.class)
public class WindowManagerImpl extends WindowManager {...}

and any declared position trumps no declared position, you could write

@ServiceProvider(service=WindowManager.class, position=/*RIPJSB*/1750)
public class MyWindowManager extends WindowManager {...}

to make yours be loaded preferentially (WM.getDefault just uses the first instance it finds); or

@ServiceProvider(service=WindowManager.class, supersedes="org.netbeans.core.windows.WindowManagerImpl")
public class MyWindowManager extends WindowManager {...}

to hide the original and thus have the same effect.

(*) You don't need source code or even binaries to find this out; just peek at the summary produced by dev builds:

http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/build/generated/services.txt