java - Tree from tree paths -


I have a lot of data in my project, which can be structured in some way. To make it simpler, we show that the data path is a bunch of paths:

  / user /homefolder/folder1/file1.jpg /user/homefolder/folder1/file2.jpg / user / Homefolder / folder2 / file3.jpg / user / hover folder / folder2 / file4 JPG / User / Hoffler / Folter 3 / File 5 JPG   

So, I really have tree paths and I can group these paths if there are paths by the first three folders or more.

I have this value in array I and I do not want to create a duplicate tree model.

I use the SWT.VIRTUAL style and ILazyTreeContentProvider in JFAC tree weaver / P>

You can apply your own node

Example

Example

  Tree & lt; String & gt; Root = new tree & lt; String & gt; (); From tree to & lt; String & gt; folder1 = root.add ("Folder1"); Folder1.add ("file1.jpg"); folder1.add ("file2.jpg"); From tree to & lt; String & gt; Folder2 = root.add ("folder2"); folder2.add ("file3.jpg"); Folder2.add ("file4.jpg");   



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -