Re: How to remove a node from a project's logical view?

Peter Nabbefeld <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Hi Geertjan,

thank You for providing the code!

Using Arch Linux, there seem to be problems with the installed NetBeans 
package when starting a mavenized module project, so I just copied the 
sources into my ant project.

The sources work, and from my point of view there're two main mechanisms 
to provide the magic:

1. I've never been *really* aware, that NodeFactory provides a NodeList, 
which may or may not contain nodes.

2. The NodeList holds a reference to the project references and adds 
itself as a PreferenceChangeListener.

The latter, however, makes it impossible to use AuxilliaryConfiguration.
As I'd  prefer to use the XML hierarchy of project.xml: Is there any way 
to add some change listener to it?

Kind regards
Peter



Am 21.01.2016 um 20:30 schrieb geertjan wielenga:
>
>
> Yes, that's precisely what the code provides. Check it out and take a look:
>
> https://github.com/GeertjanWielenga/PeterProjectCustomizerNodeFactory
>
> Gj
>
> On 21-1-2016 18:55, Peter Nabbefeld wrote:
>> Hi Geertjan,
>>
>> thank You for Your support! But the point is: The configuration should
>> be "defensive", i.e. nothing should be changed, neither in project.xml
>> nor in project ui, if there's no configuration.
>>
>> Kind regards
>> Peter
>>
>>
>>
>> Am 21.01.2016 um 15:45 schrieb geertjan wielenga:
>>>
>>> Instead of showing/hiding the node, would it be acceptable if its
>>> display name was "Not Configured" if the checkbox has not been selected?
>>> That would have as a benefit that the user would have a hint that the
>>> functionality exists and that it needs to be configured.
>>>
>>> If the above is acceptable to you, I have all the code for this
>>> solution.
>>>
>>> Gj
>>>
>>> On 21-1-2016 12:19, Peter Nabbefeld wrote:
>>>> Hm, not yet - I'll try to put some files at the week-end.
>>>>
>>>> What I want to do is sth. like this:
>>>> 1. Project cutomizer:
>>>> +------------------+-----------------------------+
>>>> | 1. Sources       |                             |
>>>> | 2. *My Options*  |                             |
>>>> | 3. ...           |     [x] Show my node        |
>>>> |                  |                             |
>>>> |                  |                             |
>>>> +------------------+-----------------------------+
>>>>
>>>> 2. Project tab:
>>>> +-------------------------+
>>>> |   # My Project          |
>>>> |   |                     |
>>>> |   +--# My Node          |
>>>> |   |                     |
>>>> |   +--# Source Packages  |
>>>> |   |                     |
>>>> |   +--# Libraries        |
>>>> |                         |
>>>> +-------------------------+
>>>>
>>>> The Node "My Node" should only be shown, if the checkbox is set.
>>>>
>>>> The tricky part here is, that the node should be updated immediately
>>>> after
>>>> configuration change, so I think I will have to get the tab and to
>>>> repaint
>>>> the project tree.
>>>>
>>>> Kind regards
>>>> Peter
>>>>
>>>
>>>
>>
>
>
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.