Re: How to force rebuild of DataObjects within a Project

Todd Stevenson <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Thank you for your help.

I have attempted to set up the project to listen for the configuration changes but have run into an interesting problem.

·         I added a PropertyChangeSupport class to the panel that updates the compiler settings.  When it is updated, it fires an firePropertyChange() method.

·         I added a PropertyChangeListener to the Root of DataNode that handle the display in the project explorer.

·         The root node is instantiated in the createLogicalView method of the logicalViewProvider that is attached to my Project class.

·         As per instructions in the documentation, createLogicalView creates a new Root Node each time it is called.

·         For some reason, createLogicalView is called twice as the application is instantiated.  Because it is called twice, 2 propertyChangeListeners are added.

·         Because there are 2 propertyChangeListeners, the update to the project tree happens twice.

·         I can’t figure out why creatLogicalView is called twice.  It is being called from within the internals of the netbeans code.

Any ideas?

Todd Stevenson
Sr Clinical Modeling Engineer
Clinical Modeling
3930 Parkway Blvd |Salt Lake City, UT 84120
Office: 801-442-5112 | Cell: 801-589-1115
[email protected]<mailto:[email protected]>
[cid:[email protected]]

From: Tim Boudreau [mailto:[email protected]]
Sent: Thursday, January 28, 2016 11:05 PM
To: [email protected]
Subject: [platform-dev] Re: How to force rebuild of DataObjects within a Project

If it's your project type, that ought to be pretty easy - just get the project's ActionProvider and look up the build action and invoke it.  You could get the list of open projects from the Project UI API.  Just make sure the projects you do that to are really your project type (say, put some object type known to both the settings code and your project in your projects' lookups) - it wouldn't be polite to rebuild a bunch of Java projects just because they're open too.

It would be cleaner for your projects to listen on the settings and build themselves.  But that's a way to do it from the outside.

-Tim


On Thu, Jan 28, 2016 at 5:35 PM, Todd Stevenson <[email protected]<mailto:[email protected]>> wrote:
I have built a DSL IDE using Netbeans.  I have added global options to the app that sets compile options for the members of the project.  After the user changes these options, I have set up a propertyChangeListener handler to notify the Project that the change has been made.

Unfortunately,  I don’t know how to force the project to re-compile all the members of my project.  I would like it work like it does when the project is first opened.  The apps builds all the members of the project and notifies the user of compilation results.

Any ideas?

Todd Stevenson
Sr Clinical Modeling Engineer
Clinical Modeling
3930 Parkway Blvd |Salt Lake City, UT 84120
Office: 801-442-5112<tel:801-442-5112> | Cell: 801-589-1115<tel:801-589-1115>
[email protected]<mailto:[email protected]>
[cid:[email protected]]




--
http://timboudreau.com
image004.jpg (image/jpeg, 2.9 KB) - not displayed
image002.jpg (image/jpeg, 2.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.