View unanswered posts | View active topics



Reply to topic  [ 3 posts ] 
Plugin Questions 
Author Message
Member

Joined: Mon Sep 27, 2010 8:30 pm
Posts: 38
Hello,
I'm playing around with plugins and have a few questions. So far I downloaded the source for FD and made a new plugin project copied the source from the Sample Plugin and have my dll, which worked fine in FD4 and displayed a dialog when I launch FD. Here are my questions :

1. How can I make the plugin only display it's dialog when a toolbar button is clicked? I don't want it to be visible when you launch the application.
2. How can I get the projects folder paths in my plugin? I need to get the root of the project so I can go through and parse the as mxml files etc.

Thank you!


Wed Feb 29, 2012 6:32 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
The sample plugin creates a panel, which can be docked or floating by default. Panels are listed in View menu.

You can add new toolbar buttons programmatically - I suggest you look in ASCompletion plugin's PluginMain.cs to see how it creates buttons, menus and even associated user-modifiable shortcuts.

The project data are globally accessible as: PluginCore.PluginBase.Project

To track active project changes, see in the sample plugin how it listens to file-switch event. Likewise you can listen to ProjectManager plugin events "ProjectManager.Project":
http://code.google.com/p/flashdevelop/s ... Main.cs#44

Note:
Plugin devs often get into FD by "sniffing" all the commands exchanged by the plugins that way.


Wed Feb 29, 2012 10:12 pm
Profile WWW
Member

Joined: Mon Sep 27, 2010 8:30 pm
Posts: 38
Thanks Phillippe!


Thu Mar 01, 2012 1:00 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.