Sort FilterNode's in a Project view

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

Sort FilterNode's in a Project view

by Pavel Kotlov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Greetings,

 

I am supporting a my own project logical view based on FilterNode for my Project. This is done by many Nodes extending FilterNode and FilterNode.Children. I don’t really know if this is the right way but it works for now. The functionality is done by copyNode() and createNode() Methods. But I am running in Problems when I am trying to sort my nodes overriding addNotify() must solve some problems but it ends up in an (for me) absolute unpredictable behavior.

 

What I am doing:

        @Override

        protected void addNotify() {

            Node[] tNodes = this.original.getChildren().getNodes(true); //.getNodes() won’t work too

                //sorting, adding things

setKeys(tNodes);

}

 

But for some reason the method setKeys() is called from someone else so all my changes are gone. One more thing if I am running this code in the debugger this works so perhaps some other thread is involved. Well but it ends up in doing some other things in a strange way.  I can add Nodes in the createNodes() Method but there is no way to sort Nodes.

 

Seeking for help,

 

Pavel Kotlov


AW: Sort FilterNode's in a Project view

by Pavel Kotlov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Greetings,

 

So am i right, there is no possibility to sort Filter Nodes?

Well seems like I am forced do do it in the createNodes() method.

 

Best regards,

 

Pavel Kotlov

 

Von: Pavel Kotlov [mailto:pkotlov@...]
Gesendet: Freitag, 11. Juli 2008 21:46
An: dev@...
Betreff: [openide-dev] Sort FilterNode's in a Project view

 

Greetings,

 

I am supporting a my own project logical view based on FilterNode for my Project. This is done by many Nodes extending FilterNode and FilterNode.Children. I don’t really know if this is the right way but it works for now. The functionality is done by copyNode() and createNode() Methods. But I am running in Problems when I am trying to sort my nodes overriding addNotify() must solve some problems but it ends up in an (for me) absolute unpredictable behavior.

 

What I am doing:

        @Override

        protected void addNotify() {

            Node[] tNodes = this.original.getChildren().getNodes(true); //.getNodes() won’t work too

                //sorting, adding things

setKeys(tNodes);

}

 

But for some reason the method setKeys() is called from someone else so all my changes are gone. One more thing if I am running this code in the debugger this works so perhaps some other thread is involved. Well but it ends up in doing some other things in a strange way.  I can add Nodes in the createNodes() Method but there is no way to sort Nodes.

 

Seeking for help,

 

Pavel Kotlov

LightInTheBox - Buy quality products at wholesale price