Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Project switch action

1 view
Skip to first unread message

FooMan

unread,
Jul 23, 2005, 10:04:41 AM7/23/05
to
Hi,
I would like to show dialog that will have some informations related to
current project. Is there any way to do something like that? How can i
bind to such action?
thanks for any tips.

Bill Joy

unread,
Jul 23, 2005, 11:36:41 AM7/23/05
to
People on this forum can help you if you provided more information about
what your want to do.

How do you want people to launch your dialog? From the application menu or
perhaps from a context action in the Project pane when right-clicking on the
project node?

Or should this be a property page that gets added to Project | Project
Properties?

There are a lot of examples in the samples/OpenToolsAPI directory plus you
can find more information in Help | Help Topics. There are also some
OpenTools that include source in places like:

http://codecentral.borland.com/codecentral/ccweb.exe/prodcat?prodid=3&catid=11

http://jbuilder-opentools.dev.java.net/

"FooMan" <joker...@wp.pl> wrote in message
news:42e24e74$1...@newsgroups.borland.com...

FooMan

unread,
Jul 23, 2005, 12:18:37 PM7/23/05
to
Sorry for inaccurate description.
1st i want to make dialog that will be opened from menu
(Project|MyOption). This dialog should be linked with project.
So if someone open my dialog in projectA and switch to projectB dialog
should refresh or hide.
Also i would like to remember if my dialog was opened in project and
store and read this information from project file.

Bill Joy

unread,
Jul 23, 2005, 2:06:36 PM7/23/05
to
Look at the project in samples/OpenToolsAPI/actions. It puts an action on
the Tools menu instead of Project, but that it is an easy change to use
another menu. It also demonstrates adding the action to the Project pane
context menu.

Defining a new project property is simple, there are interfaces for string,
string array, boolean, and integer data types.

public static NodeBooleanProperty MY_PROPERTY =
new NodeBooleanProperty("mycategory", "mypropertyname", false);

boolean b = MY_PROPERTY.getBoolean(project);
MY_PROPERTY.setBoolean(project, b);

Sounds like this has to be a modeless dialog that updates when the active
project changes. You will want to do something like this to know when the
project changes:

Browser.addStaticBrowserListener(new BrowserAdapter() {
public void browserProjectActivated(Browser browser, Project project)
{
updateDialog(project);
}
});


"FooMan" <joker...@wp.pl> wrote in message

news:42e26dd7$1...@newsgroups.borland.com...

FooMan

unread,
Jul 23, 2005, 4:51:10 PM7/23/05
to
Thanks a lot for this informations. Its everything that i need. Thanks a
lot.
0 new messages