Quellcode durchsuchen

fixed a stupid bug regarding PlayList parsing, Editor able to read and
display the lists now

LH vor 10 Jahren
Ursprung
Commit
b41004c809
19 geänderte Dateien mit 957 neuen und 367 gelöschten Zeilen
  1. 0 1
      build.gradle
  2. 2 1
      iZpl/build.gradle
  3. 1 1
      iZpl/src/main/java/de/nplusc/izc/iZpl/API/IZPLApi.java
  4. 21 23
      iZpl/src/main/java/de/nplusc/izc/iZpl/Main.java
  5. 89 80
      iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/PLReader2.java
  6. 1 1
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/DupeAddException.java
  7. 59 2
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/Editor.java
  8. 38 2
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUICommon.form
  9. 84 5
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUICommon.java
  10. 232 127
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUIFileWise.form
  11. 248 97
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUIFileWise.java
  12. 16 0
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/GraphException.java
  13. 1 1
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/InvalidGraphReferenceException.java
  14. 55 4
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/ListIncludeGraph.java
  15. 33 0
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/PLIWrapper.java
  16. 52 4
      iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/PlayListFile.java
  17. 12 14
      iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioConfig.form
  18. 6 1
      iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioConfig.java
  19. 7 3
      iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioManager.java

+ 0 - 1
build.gradle

@@ -18,7 +18,6 @@ allprojects {
 			url "http://4thline.org/m2"
 		}
 		
-		mavenLocal()
 		maven { url "http://repo.gradle.org/gradle/libs-releases-local" }
 	}
 }

+ 2 - 1
iZpl/build.gradle

@@ -69,7 +69,7 @@ dependencies{
     compile 'org.apache.commons:commons-exec:1.3'
     compile "org.yaml:snakeyaml:1.14"
     compile "commons-net:commons-net:3.3"
-    compile 'uk.co.caprica:vlcj:3.3.0-SNAPSHOT'
+    compile 'uk.co.caprica:vlcj:3.3.0'
     compile 'com.googlecode.mp4parser:isoparser:1.0-RC-1'
     compile 'de.schlichtherle.truezip:truezip-file:7.7.7'
     compile 'de.schlichtherle.truezip:truezip-driver-zip:7.7.7'
@@ -83,6 +83,7 @@ dependencies{
 	compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
 	compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.1'
 	compile group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.1'
+    compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.1'
     compile 'org.fusesource.jansi:jansi:1.11'
     compile(project(':ToolKit')) {
         transitive = false

+ 1 - 1
iZpl/src/main/java/de/nplusc/izc/iZpl/API/IZPLApi.java

@@ -154,7 +154,7 @@ public class IZPLApi
         return System.console()!=null;
     }
    
-    public List<SinglePlayListItem> readPlayList(String path) throws InvalidPlayListFileException
+    public static List<SinglePlayListItem> readPlayList(String path) throws InvalidPlayListFileException
     {
         return PLReader2.readSingleList(path);
     }

+ 21 - 23
iZpl/src/main/java/de/nplusc/izc/iZpl/Main.java

@@ -294,9 +294,6 @@ public class Main extends javax.swing.JFrame
         l=LogManager.getLogger(Main.class.getName());
         LoggerContext cx = (LoggerContext) LogManager.getContext(false);
         org.apache.logging.log4j.core.config.Configuration config = cx.getConfiguration();
-        uk.co.caprica.vlcj.logger.Logger.setLevel(uk.co.caprica.vlcj.logger.Logger.Level.INFO);
-        uk.co.caprica.vlcj.logger.Logger.outputTo(IoBuilder.forLogger("External.VLCJ").setLevel(Level.TRACE).buildOutputStream());
-        
         LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME); 
         LoggerConfig externalloggerConfig = config.getLoggerConfig("External"); 
 
@@ -373,20 +370,12 @@ public class Main extends javax.swing.JFrame
                 l.trace("Listmode disabled due to e param=\""+featurePluginID+"\"");
             }
                                         //handling für den ListPluginMode
-            if((filemode||statefile||listmode))
-            {
-                pluginParameter="";
-                featurePluginMode=true;
-                if(listmode)
-                {
-                    featurePluginID="";
-                    l.trace("\"\"");
-                }
-            }
-            else
+            pluginParameter="";
+            featurePluginMode=true;
+            if(listmode)
             {
-                l.error("Error: FeaturePlugins need either a file or a statefile to resume");
-                System.exit(9263);
+                featurePluginID="";
+                l.trace("\"\"");
             }
             l.trace("Parameter of e is now:\""+pluginParameter+"\"");
         }
@@ -512,7 +501,7 @@ public class Main extends javax.swing.JFrame
         /* go to Stage 2 of the loading */
         java.awt.EventQueue.invokeLater(() ->
         {
-            if ((filemode || statefile) && !(firstrunmode || loadConfigMode))
+            if ((filemode || statefile||featurePluginMode) && !(firstrunmode || loadConfigMode))
             {
                 final Main b = new Main();
                 pload.setIndeterminate(true);
@@ -748,6 +737,15 @@ public class Main extends javax.swing.JFrame
             l.error("NO valid FeaturePlugin given");
             quickQuit();
         }
+        if(featurePluginMode)
+        {
+            if(selectedFeaturePlugin.requiresLoadedPlayList()&&!(filemode||statefile))
+            {
+                l.error("The selected FeaturePlugin requires a Playlist to be loaded");
+                System.out.println("The selected FeaturePlugin requires a Playlist to be loaded");
+                quickQuit();
+            }
+        }
         if(!firstrunmode&&!updateInit&&!featurePluginMode)
         {       
             if (selectedPlaybackPlugin != null)
@@ -881,7 +879,9 @@ public class Main extends javax.swing.JFrame
         {
 
             l.trace("fpl|" + forcePregen + "|shitmp|" + isShittyPlayer + "|a1|" + file_path + "|vp|" + vlcpath);
-            if ((filemode && !(forcePregen || isShittyPlayer))||featurePluginMode)
+            if (
+                    (filemode && !(forcePregen || isShittyPlayer))                      ||
+                    (featurePluginMode&&selectedFeaturePlugin.requiresLoadedPlayList()))
             {
                 l.trace("usegui=" + useGUI);
                 l.trace("featurePlugin=" + featurePluginMode);
@@ -894,7 +894,8 @@ public class Main extends javax.swing.JFrame
             }
             else//RELOADER
             {
-                if (!(forcePregen || isShittyPlayer))
+                if (!(forcePregen || isShittyPlayer||
+                        (featurePluginMode&&!selectedFeaturePlugin.requiresLoadedPlayList())))
                 {
                     reload();
                 }
@@ -952,10 +953,7 @@ public class Main extends javax.swing.JFrame
                 {
                     if(featurePluginMode)
                     {
-                        EventQueue.invokeLater(() ->
-                        {
-                            selectedFeaturePlugin.parseParameter(pluginParameter);
-                        });
+                        selectedFeaturePlugin.parseParameter(pluginParameter);
                     loadedVLC = true;
                     }
                     else

+ 89 - 80
iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/PLReader2.java

@@ -48,6 +48,8 @@ public class PLReader2
     private static final Logger l = LogManager.getLogger();
     public static List<SinglePlayListItem> readSingleList(String path) throws InvalidPlayListFileException
     {
+        
+        String plbd = FileTK.getFilePath(path)+File.separator;
         l.trace("Location:{}",new File(path).getAbsolutePath());
         try
         {
@@ -70,116 +72,123 @@ public class PLReader2
             SinglePlayListItem itm = new SinglePlayListItem();
             while(ln!=null)
             {
-                l.trace(ln);
-                if(ln.startsWith("#IZPL"))
+                if(!ln.trim().equals(""))
                 {
-                    String[] meta = ln.split(":")[1].split("\\|");
-                    if(meta[0].equalsIgnoreCase("include"))
+                    l.trace(ln);
+                    if(ln.startsWith("#IZPL"))
                     {
-                        if(meta.length==3)
+                        String[] meta = ln.split(":")[1].split("\\|");
+                        if(meta[0].equalsIgnoreCase("include"))
                         {
-                            if(meta[2].equalsIgnoreCase("expand"))
+                            if(meta.length==3)
                             {
-                                itm.setIncludeElements(true, false);
-                            }
-                            else
-                            {
-                                if(meta[2].equalsIgnoreCase("noexpand"))
+                                if(meta[2].equalsIgnoreCase("expand"))
                                 {
-                                     itm.setIncludeElements(true, true);
+                                    itm.setIncludeElements(true, false);
                                 }
                                 else
                                 {
-                                    syntaxError=true;
-                                    l.error("Syntax error on line {} of file {}: {}",lne,path,"Include-Block haben nur Expand oder NoExpand als dritten block");
-                                    continue;
+                                    if(meta[2].equalsIgnoreCase("noexpand"))
+                                    {
+                                         itm.setIncludeElements(true, true);
+                                    }
+                                    else
+                                    {
+                                        syntaxError=true;
+                                        l.error("Syntax error on line {} of file {}: {}",lne,path,"Include-Block haben nur Expand oder NoExpand als dritten block");
+                                        continue;
+                                    }
                                 }
-                            }
-                            try
-                            {
-                                int pr = Integer.valueOf(meta[1]);
-                                if(pr<1)
+                                try
                                 {
-                                    throw new NumberFormatException();
+                                    int pr = Integer.valueOf(meta[1]);
+                                    if(pr<1)
+                                    {
+                                        throw new NumberFormatException();
+                                    }
+                                    itm.setTargetPlaycount(pr);
+                                }
+                                catch(NumberFormatException x)
+                                {
+                                    syntaxError=true;
+                                    l.error("Syntax error on line {} of file {}: {}",lne,path,"der 2. block bei Include muss eine positive Ganzzahl sein");
+                                    itm.setTargetPlaycount(1);
                                 }
-                                itm.setTargetPlaycount(pr);
                             }
-                            catch(NumberFormatException x)
+                            else
                             {
                                 syntaxError=true;
-                                l.error("Syntax error on line {} of file {}: {}",lne,path,"der 2. block bei Include muss eine positive Ganzzahl sein");
-                                itm.setTargetPlaycount(1);
+                                l.error("Syntax error on line {} of file {}: {}",lne,path,"Include-Block braucht 2 weitere blöcke um korrekt zu sein");
                             }
                         }
                         else
                         {
-                            syntaxError=true;
-                            l.error("Syntax error on line {} of file {}: {}",lne,path,"Include-Block braucht 2 weitere blöcke um korrekt zu sein");
-                        }
-                    }
-                    else
-                    {
-                        if(meta.length==2)
-                        {
-                            try
+                            if(meta.length==2)
                             {
-                                int pr = Integer.valueOf(meta[0]);
-                                if (pr < 1)
+                                try
                                 {
-                                    throw new NumberFormatException();
+                                    int pr = Integer.valueOf(meta[0]);
+                                    if (pr < 1)
+                                    {
+                                        throw new NumberFormatException();
+                                    }
+                                    itm.setTargetPlaycount(pr);
                                 }
-                                itm.setTargetPlaycount(pr);
-                            }
-                            catch (NumberFormatException x)
-                            {
-                                syntaxError = true;
-                                l.error("Syntax error on line {} of file {}: {}", lne, path, "Block1 muss eine Ganzzahl > 0 sein");
-                                itm.setTargetPlaycount(1);
-                            }
-                            try
-                            {
-                                l.trace(meta[1]);
-                                int gid = Integer.valueOf(meta[1].trim());
-                                if (gid < 0)
+                                catch (NumberFormatException x)
+                                {
+                                    syntaxError = true;
+                                    l.error("Syntax error on line {} of file {}: {}", lne, path, "Block1 muss eine Ganzzahl > 0 sein");
+                                    itm.setTargetPlaycount(1);
+                                }
+                                try
+                                {
+                                    l.trace(meta[1]);
+                                    int gid = Integer.valueOf(meta[1].trim());
+                                    if (gid < 0)
+                                    {
+                                        l.trace("NULL0");
+                                        throw new NumberFormatException();
+                                    }
+                                    itm.setGID(gid); 
+                                }
+                                catch (NumberFormatException x)
                                 {
-                                    l.trace("NULL0");
-                                    throw new NumberFormatException();
+                                    syntaxError = true;
+                                    l.error("Syntax error on line {} of file {}: {}", lne, path, "Block2 muss eine Ganzzahl >=0 sein");
+                                    itm.setGID(0);
                                 }
-                                itm.setGID(gid); 
                             }
-                            catch (NumberFormatException x)
+                            else
                             {
-                                syntaxError = true;
-                                l.error("Syntax error on line {} of file {}: {}", lne, path, "Block2 muss eine Ganzzahl >=0 sein");
-                                itm.setGID(0);
+                                syntaxError=true;
+                                l.error("Syntax error on line {} of file {}: {}",lne,path,"Could not determine Metadata block type");
                             }
                         }
-                        else
-                        {
-                            syntaxError=true;
-                            l.error("Syntax error on line {} of file {}: {}",lne,path,"Could not determine Metadata block type");
-                        }
-                    }
-                }
-                else
-                {
-                    if(ln.startsWith("#EXTINF"))
-                    {
-                        extinf=true;
-                        itm.setTitle(ln);
                     }
                     else
                     {
-                        if(!ln.startsWith("#"))
+                        if(ln.startsWith("#EXTINF"))
+                        {
+                            extinf=true;
+                            itm.setTitle(ln);
+                        }
+                        else
                         {
-                            if(!extinf)
+                            if(!ln.startsWith("#"))
                             {
-                                itm.setTitle("#EXTINF,0,"+FileTK.getFileName(ln));
+                                if(!extinf)
+                                {
+                                    itm.setTitle("#EXTINF,0,"+FileTK.getFileName(ln));
+                                }
+                                if(!(ln.substring(1).startsWith(":")||ln.startsWith(File.separator)))
+                                {
+                                    ln=plbd+ln;//relative pfade absolutisieren
+                                }
+                                itm.setPath(ln);
+                                returndata.add(itm);
+                                itm=new SinglePlayListItem();
+                                extinf=false;
                             }
-                            itm.setPath(ln);
-                            returndata.add(itm);
-                            itm=new SinglePlayListItem();
-                            extinf=false;
                         }
                     }
                 }
@@ -206,7 +215,7 @@ public class PLReader2
     
     public static List<PlayListItem> parseFullList(String path,int rd)
     {
-        String plbd = FileTK.getFilePath(path);
+        
         HashMap<Integer,MultiPlayListItem> groups = new HashMap<>();
         List<PlayListItem> result = new ArrayList<>();
         try
@@ -219,7 +228,7 @@ public class PLReader2
                 {
                     if(re.noexpandoninclude())
                     {
-                        MultiPlayListItem m = processNoExpandInclude(plbd+File.separator+re.getPath(),rd);
+                        MultiPlayListItem m = processNoExpandInclude(re.getPath(),rd);
                         if(m!=null)
                         {
                             m.setTargetPlaycount(re.getTargetPlaycount());
@@ -228,7 +237,7 @@ public class PLReader2
                     }
                     else
                     {
-                        List<PlayListItem> temp = parseFullList(plbd+File.separator+re.getPath(),rd-1);
+                        List<PlayListItem> temp = parseFullList(re.getPath(),rd-1);
                         temp.forEach((ple)->ple.setTargetPlaycount(ple.getTargetPlaycount()*re.getTargetPlaycount()));
                         result.addAll(temp);
                     }

+ 1 - 1
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/DupeAddException.java

@@ -10,7 +10,7 @@ package de.nplusc.izc.izpl.plugins.editor;
  *
  * @author iZc <nplusc.de>
  */
-public class DupeAddException extends RuntimeException
+public class DupeAddException extends GraphException
 {
     
 }

+ 59 - 2
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/Editor.java

@@ -7,9 +7,16 @@
 package de.nplusc.izc.izpl.plugins.editor;
 
 import de.nplusc.izc.iZpl.API.FeaturePlugin;
+import de.nplusc.izc.iZpl.API.IZPLApi;
+import de.nplusc.izc.iZpl.API.InvalidPlayListFileException;
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
 import de.schlichtherle.truezip.file.TFile;
+import java.awt.EventQueue;
+import java.util.List;
+import javax.swing.JOptionPane;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.yaml.snakeyaml.Yaml;
 
 /**
  *
@@ -17,6 +24,10 @@ import org.apache.logging.log4j.Logger;
  */
 public class Editor implements FeaturePlugin
 {
+    private ListIncludeGraph parseGraph = new ListIncludeGraph();
+    
+    private PlayListFile rootFile=null;
+    
     private static final Logger l = LogManager.getLogger();
     @Override
     public void parseParameter(String param)
@@ -35,7 +46,7 @@ public class Editor implements FeaturePlugin
             {
                 l.error("Keine gültige r00tPlayList");
             }
-                
+            openUserInterface();
         }
     }
 
@@ -48,7 +59,10 @@ public class Editor implements FeaturePlugin
     @Override
     public void openUserInterface()
     {
-        
+        EventQueue.invokeLater(()->
+        {
+            new EditorUICommon(rootFile,parseGraph).setVisible(true);
+        });
     }
 
     @Override
@@ -78,5 +92,48 @@ public class Editor implements FeaturePlugin
     private void loadPlayListIntoGraph(String path)
     {
         
+        try
+        {
+            loadPlayListIntoGraph(path, 40,null);
+            l.trace(new Yaml().dump(parseGraph));
+            
+        }
+        catch (InvalidPlayListFileException ex)
+        {
+            JOptionPane.showMessageDialog(null, "Ungültige Datei, siehe in izpl.log", "Parsing error", JOptionPane.ERROR_MESSAGE);
+            //ex.printStackTrace();
+        }
+    }
+    private void loadPlayListIntoGraph(String path,int rd,PlayListFile fromFile) throws InvalidPlayListFileException
+    {
+        List<SinglePlayListItem> data = IZPLApi.readPlayList(path);
+        PlayListFile f = new PlayListFile();
+        f.setPath(path);
+        f.setEntries(data);
+        try
+        {
+            parseGraph.addListLink(fromFile, f);
+        }
+        catch(GraphException x)
+        {
+            
+        }
+        if(fromFile==null)
+        {
+            rootFile=f;
+            
+        }
+        for (SinglePlayListItem spi : data)
+        {
+            if(spi.isIncludeElement())
+            {                               //Do not use path here or nice O(includecount^rd) loop
+                loadPlayListIntoGraph(spi.getPath(),rd-1,f);
+            }
+        }
+        if(fromFile==null)
+        {
+            parseGraph.recalcPriorities(rootFile);
+        }
     }
+    
 }

+ 38 - 2
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUICommon.form

@@ -23,13 +23,49 @@
   <Layout>
     <DimensionLayout dim="0">
       <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
+          <Group type="102" attributes="0">
+              <EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
+              <Component id="btnSave" min="-2" pref="115" max="-2" attributes="0"/>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Component id="btnLoad" min="-2" pref="113" max="-2" attributes="0"/>
+              <EmptySpace pref="703" max="32767" attributes="0"/>
+          </Group>
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="tpMain" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
       </Group>
     </DimensionLayout>
     <DimensionLayout dim="1">
       <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="tpMain" pref="612" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="1" max="-2" attributes="0">
+                  <Component id="btnLoad" pref="41" max="32767" attributes="0"/>
+                  <Component id="btnSave" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
       </Group>
     </DimensionLayout>
   </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JButton" name="btnSave">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Save"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="btnLoad">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Load"/>
+      </Properties>
+    </Component>
+    <Container class="javax.swing.JTabbedPane" name="tpMain">
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+    </Container>
+  </SubComponents>
 </Form>

+ 84 - 5
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUICommon.java

@@ -6,21 +6,70 @@
 
 package de.nplusc.izc.izpl.plugins.editor;
 
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.util.HashMap;
+
 /**
  *
  * @author iZc <nplusc.de>
  */
 public class EditorUICommon extends javax.swing.JFrame
 {
-
+    private HashMap<PlayListFile,EditorUIFileWise> tabRemapping = new HashMap<>();
+    private HashMap<String,PlayListFile> lookupCache = new HashMap<>();
+    ListIncludeGraph parseGraph;
     /**
      * Creates new form EditorUICommon
+     * @param r00t
+     * @param pParseGraph
      */
-    public EditorUICommon()
+    public EditorUICommon(PlayListFile r00t,ListIncludeGraph pParseGraph)
     {
+        parseGraph = pParseGraph;
+        lookupCache = parseGraph.generateLookupCache();
         initComponents();
+        openFileTab(r00t);
     }
 
+    
+    public void openFileTab(SinglePlayListItem i)
+    {
+        openFileTab(lookupCache.get(i.getPath()));
+    }
+    
+    public void openFileTab(PlayListFile f)
+    {
+        
+        
+        int tc = tpMain.getTabCount();
+        //tpMain.setSelectedIndex(tc);
+        if(tabRemapping.containsKey(f))
+        {
+            tpMain.setSelectedComponent(tabRemapping.get(f));
+        }
+        else
+        {
+            
+            EditorUIFileWise efw = new EditorUIFileWise(f, this);
+            tabRemapping.put(f,efw);
+            tpMain.add(FileTK.getFileName(f.getPath()), efw);
+            pack();
+        }
+    }
+    
+    public void registerPlayListFile(SinglePlayListItem i)
+    {
+        
+    }
+    
+    
+    public void recalculatePriorities(PlayListFile f)
+    {
+        parseGraph.recalcPriorities(f);
+    }
+    
+    
     /**
      * This method is called from within the constructor to
      * initialize the form.
@@ -32,23 +81,53 @@ public class EditorUICommon extends javax.swing.JFrame
     private void initComponents()
     {
 
+        btnSave = new javax.swing.JButton();
+        btnLoad = new javax.swing.JButton();
+        tpMain = new javax.swing.JTabbedPane();
+
         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 
+        btnSave.setText("Save");
+
+        btnLoad.setText("Load");
+
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 400, Short.MAX_VALUE)
+            .addGroup(layout.createSequentialGroup()
+                .addGap(41, 41, 41)
+                .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addComponent(btnLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(703, Short.MAX_VALUE))
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(tpMain)
+                .addContainerGap())
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 300, Short.MAX_VALUE)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(tpMain, javax.swing.GroupLayout.DEFAULT_SIZE, 612, Short.MAX_VALUE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+                    .addComponent(btnLoad, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
+                    .addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
         );
 
         pack();
     }// </editor-fold>//GEN-END:initComponents
 
-
+    
+    
+    
+    
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnLoad;
+    private javax.swing.JButton btnSave;
+    private javax.swing.JTabbedPane tpMain;
     // End of variables declaration//GEN-END:variables
 }

+ 232 - 127
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUIFileWise.form

@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <NonVisualComponents>
+    <Component class="javax.swing.ButtonGroup" name="bGInclude">
+    </Component>
+  </NonVisualComponents>
   <AuxValues>
     <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
     <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@@ -24,67 +28,50 @@
               <Group type="103" groupAlignment="0" attributes="0">
                   <Group type="102" attributes="0">
                       <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" alignment="1" attributes="0">
+                              <EmptySpace pref="223" max="32767" attributes="0"/>
+                              <Component id="jSeparator1" min="-2" pref="749" max="-2" attributes="0"/>
+                          </Group>
                           <Group type="102" attributes="0">
                               <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
+                              <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace type="separate" max="-2" attributes="0"/>
+                              <Component id="iPath" max="32767" attributes="0"/>
+                              <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
+                              <Component id="pathSelect" min="-2" pref="182" max="-2" attributes="0"/>
+                          </Group>
+                          <Group type="102" attributes="0">
                               <Group type="103" groupAlignment="0" attributes="0">
                                   <Group type="102" attributes="0">
-                                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
-                                          <Group type="102" attributes="0">
-                                              <Group type="103" groupAlignment="0" attributes="0">
-                                                  <Component id="jLabel1" min="-2" pref="42" max="-2" attributes="0"/>
-                                                  <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
-                                              </Group>
-                                              <EmptySpace max="-2" attributes="0"/>
+                                      <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
+                                      <Component id="btnApply" min="-2" max="-2" attributes="0"/>
+                                  </Group>
+                                  <Group type="102" alignment="0" attributes="0">
+                                      <EmptySpace type="separate" max="-2" attributes="0"/>
+                                      <Group type="103" groupAlignment="0" attributes="0">
+                                          <Group type="103" alignment="0" groupAlignment="1" attributes="0">
+                                              <Component id="pnlPrio" min="-2" max="-2" attributes="0"/>
                                               <Group type="103" groupAlignment="0" attributes="0">
-                                                  <Group type="102" attributes="0">
-                                                      <EmptySpace min="-2" pref="175" max="-2" attributes="0"/>
-                                                      <Component id="oCalculatedPriority" min="-2" max="-2" attributes="0"/>
+                                                  <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
+                                                      <Component id="jButton2" pref="139" max="32767" attributes="0"/>
+                                                      <Component id="jButton3" max="32767" attributes="0"/>
+                                                      <Component id="jButton4" max="32767" attributes="0"/>
                                                   </Group>
-                                                  <Component id="iTitle" min="-2" pref="338" max="-2" attributes="0"/>
+                                                  <Component id="pnlInclude" alignment="0" min="-2" max="-2" attributes="0"/>
                                               </Group>
                                           </Group>
-                                          <Group type="102" attributes="0">
-                                              <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
-                                              <EmptySpace type="separate" max="-2" attributes="0"/>
-                                              <Component id="iPath" max="32767" attributes="0"/>
-                                          </Group>
-                                          <Group type="102" alignment="0" attributes="0">
-                                              <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
-                                              <EmptySpace type="unrelated" max="-2" attributes="0"/>
-                                              <Group type="103" groupAlignment="0" attributes="0">
-                                                  <Component id="iGroupNumber" min="-2" pref="118" max="-2" attributes="0"/>
-                                                  <Component id="iPriority" min="-2" pref="118" max="-2" attributes="0"/>
-                                              </Group>
-                                          </Group>
-                                      </Group>
-                                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
-                                      <Component id="pathSelect" max="32767" attributes="0"/>
-                                  </Group>
-                                  <Group type="102" attributes="0">
-                                      <Group type="103" groupAlignment="0" attributes="0">
-                                          <Component id="jRadioButton1" min="-2" max="-2" attributes="0"/>
-                                          <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
-                                          <Component id="jRadioButton2" min="-2" max="-2" attributes="0"/>
-                                          <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+                                          <Component id="pnlGroup" alignment="0" min="-2" max="-2" attributes="0"/>
                                       </Group>
-                                      <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
                                   </Group>
                               </Group>
-                          </Group>
-                          <Group type="102" attributes="0">
-                              <EmptySpace max="32767" attributes="0"/>
-                              <Component id="jSeparator1" min="-2" pref="509" max="-2" attributes="0"/>
+                              <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
                           </Group>
                       </Group>
-                      <EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
                   </Group>
                   <Group type="102" alignment="0" attributes="0">
                       <EmptySpace type="separate" max="-2" attributes="0"/>
-                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
-                          <Component id="jButton2" pref="139" max="32767" attributes="0"/>
-                          <Component id="jButton3" max="32767" attributes="0"/>
-                          <Component id="jButton4" max="32767" attributes="0"/>
-                      </Group>
+                      <Component id="pnlTitel" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="32767" attributes="0"/>
                   </Group>
               </Group>
@@ -94,40 +81,31 @@
     <DimensionLayout dim="1">
       <Group type="103" groupAlignment="0" attributes="0">
           <Group type="102" attributes="0">
-              <EmptySpace max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
                   <Group type="102" attributes="0">
-                      <Group type="103" groupAlignment="3" attributes="0">
-                          <Component id="iTitle" alignment="3" min="-2" max="-2" attributes="0"/>
-                          <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
+                          <Component id="jSeparator2" alignment="0" max="32767" attributes="0"/>
                       </Group>
-                      <EmptySpace type="separate" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" attributes="0">
+                      <Component id="pnlTitel" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
                       <Group type="103" groupAlignment="3" attributes="0">
                           <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
                           <Component id="iPath" alignment="3" min="-2" max="-2" attributes="0"/>
                           <Component id="pathSelect" alignment="3" min="-2" max="-2" attributes="0"/>
                       </Group>
-                      <EmptySpace min="-2" pref="71" max="-2" attributes="0"/>
-                      <Group type="103" groupAlignment="3" attributes="0">
-                          <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
-                          <Component id="oCalculatedPriority" alignment="3" min="-2" max="-2" attributes="0"/>
-                          <Component id="iPriority" alignment="3" min="-2" max="-2" attributes="0"/>
-                      </Group>
-                      <EmptySpace type="separate" max="-2" attributes="0"/>
-                      <Group type="103" groupAlignment="0" attributes="0">
-                          <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
-                          <Component id="iGroupNumber" min="-2" max="-2" attributes="0"/>
-                      </Group>
-                      <EmptySpace min="-2" pref="53" max="-2" attributes="0"/>
-                      <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
-                      <Component id="jRadioButton1" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="69" max="-2" attributes="0"/>
+                      <Component id="pnlPrio" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="pnlGroup" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
+                      <Component id="pnlInclude" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="72" max="-2" attributes="0"/>
+                      <Component id="btnApply" min="-2" max="-2" attributes="0"/>
                       <EmptySpace type="unrelated" max="-2" attributes="0"/>
-                      <Component id="jRadioButton2" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
-                      <Component id="jButton1" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
                       <Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/>
                       <EmptySpace type="separate" max="-2" attributes="0"/>
                       <Component id="jButton2" min="-2" max="-2" attributes="0"/>
@@ -135,9 +113,7 @@
                       <Component id="jButton3" min="-2" max="-2" attributes="0"/>
                       <EmptySpace max="-2" attributes="0"/>
                       <Component id="jButton4" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace pref="31" max="32767" attributes="0"/>
                   </Group>
-                  <Component id="jSeparator2" alignment="0" max="32767" attributes="0"/>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
@@ -154,31 +130,13 @@
       <SubComponents>
         <Component class="javax.swing.JList" name="lstElements">
           <Properties>
-            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
-              <StringArray count="5">
-                <StringItem index="0" value="Item 1"/>
-                <StringItem index="1" value="Item 2"/>
-                <StringItem index="2" value="Item 3"/>
-                <StringItem index="3" value="Item 4"/>
-                <StringItem index="4" value="Item 5"/>
-              </StringArray>
+            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+              <Connection code="lm" type="code"/>
             </Property>
           </Properties>
         </Component>
       </SubComponents>
     </Container>
-    <Component class="javax.swing.JTextField" name="iTitle">
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel1">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Titel"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel2">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Priorit&#xe4;t"/>
-      </Properties>
-    </Component>
     <Component class="javax.swing.JLabel" name="jLabel3">
       <Properties>
         <Property name="text" type="java.lang.String" value="Datei"/>
@@ -191,40 +149,6 @@
         <Property name="text" type="java.lang.String" value="Durchsuchen"/>
       </Properties>
     </Component>
-    <Component class="javax.swing.JLabel" name="oCalculatedPriority">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Berechnete Priorit&#xe4;t: 0"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JSpinner" name="iGroupNumber">
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel4">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Group Number"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JSpinner" name="iPriority">
-    </Component>
-    <Component class="javax.swing.JRadioButton" name="jRadioButton1">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Expandierend: Liste wirdin mischbare Elemente zerlegt"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel5">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Include-Modus"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JRadioButton" name="jRadioButton2">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Nicht expandierend: Liste wird als ein nicht mischbarer Block behandelt"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JButton" name="jButton1">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Liste zum Bearbeiten &#xf6;ffnen"/>
-      </Properties>
-    </Component>
     <Component class="javax.swing.JSeparator" name="jSeparator1">
     </Component>
     <Component class="javax.swing.JSeparator" name="jSeparator2">
@@ -244,8 +168,189 @@
     </Component>
     <Component class="javax.swing.JButton" name="jButton4">
       <Properties>
-        <Property name="text" type="java.lang.String" value="jButton4"/>
+        <Property name="text" type="java.lang.String" value="Element entfernen"/>
+      </Properties>
+    </Component>
+    <Container class="javax.swing.JPanel" name="pnlInclude">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
+                      <Component id="rbtnIExpand" alignment="0" min="-2" max="-2" attributes="0"/>
+                      <Component id="rbtnINoexpand" alignment="0" min="-2" max="-2" attributes="0"/>
+                      <Component id="btnLoadForEdit" alignment="0" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                  <Component id="rbtnIExpand" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                  <Component id="rbtnINoexpand" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="btnLoadForEdit" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace pref="26" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JLabel" name="jLabel5">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Include-Modus"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JRadioButton" name="rbtnIExpand">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Expandierend: Liste wirdin mischbare Elemente zerlegt"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JRadioButton" name="rbtnINoexpand">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Nicht expandierend: Liste wird als ein nicht mischbarer Block behandelt"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JButton" name="btnLoadForEdit">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Liste zum Bearbeiten &#xf6;ffnen"/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoadForEditActionPerformed"/>
+          </Events>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Component class="javax.swing.JButton" name="btnApply">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="&#xdc;bernehmen"/>
       </Properties>
     </Component>
+    <Container class="javax.swing.JPanel" name="pnlGroup">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="iGroupNumber" min="-2" pref="118" max="-2" attributes="0"/>
+                  <EmptySpace pref="42" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <EmptySpace min="0" pref="11" max="32767" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="iGroupNumber" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JSpinner" name="iGroupNumber">
+        </Component>
+        <Component class="javax.swing.JLabel" name="jLabel4">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Group Number"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JPanel" name="pnlPrio">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
+                  <Component id="iPriority" min="-2" pref="118" max="-2" attributes="0"/>
+                  <EmptySpace pref="38" max="32767" attributes="0"/>
+                  <Component id="oCalculatedPriority" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="oCalculatedPriority" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="iPriority" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace pref="21" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JLabel" name="oCalculatedPriority">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Berechnete Priorit&#xe4;t: 0"/>
+          </Properties>
+        </Component>
+        <Component class="javax.swing.JSpinner" name="iPriority">
+        </Component>
+        <Component class="javax.swing.JLabel" name="jLabel2">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Priorit&#xe4;t"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JPanel" name="pnlTitel">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <Component id="jLabel1" min="-2" pref="42" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="iTitle" min="-2" pref="439" max="-2" attributes="0"/>
+                  <EmptySpace pref="41" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <EmptySpace pref="21" max="32767" attributes="0"/>
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="iTitle" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JTextField" name="iTitle">
+        </Component>
+        <Component class="javax.swing.JLabel" name="jLabel1">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Titel"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
   </SubComponents>
 </Form>

+ 248 - 97
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/EditorUIFileWise.java

@@ -6,21 +6,79 @@
 
 package de.nplusc.izc.izpl.plugins.editor;
 
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
+import java.util.List;
+import javax.swing.DefaultListModel;
+import javax.swing.event.ListSelectionEvent;
+
 /**
  *
  * @author iZc <nplusc.de>
  */
 public class EditorUIFileWise extends javax.swing.JPanel
 {
-
+    private final PlayListFile backingFile;
+    private final EditorUICommon paremtUI;
+    private DefaultListModel<PLIWrapper> lm = new DefaultListModel<>();
     /**
      * Creates new form EditorUIFileWise
+     * @param f
+     * @param ec
      */
-    public EditorUIFileWise()
+    public EditorUIFileWise(PlayListFile f, EditorUICommon ec)
     {
+        backingFile=f;
+        paremtUI=ec;
         initComponents();
+        List<SinglePlayListItem> pld = backingFile.getEntries();
+        for (SinglePlayListItem spli : pld)
+        {
+            lm.addElement(new PLIWrapper(spli));
+        } 
+        lstElements.addListSelectionListener((ListSelectionEvent e) ->
+        {
+           SinglePlayListItem itm =  ((PLIWrapper)lstElements.getSelectedValue()).pli;
+           select(itm);
+           
+        });
+    }
+
+    private void select(SinglePlayListItem i)
+    {
+        pnlInclude.setVisible(false);
+        pnlTitel.setVisible(false);
+        pnlGroup.setVisible(false);
+        iPath.setText(i.getPath());
+        iPriority.setValue(i.getTargetPlaycount());
+        oCalculatedPriority.setText("Berechnete Priorität: "+backingFile.getCalculatedBasePriority()*i.getTargetPlaycount());
+        if(i.isIncludeElement())
+        {
+            pnlInclude.setVisible(true);
+            if(i.noexpandoninclude())
+            {
+                rbtnINoexpand.setSelected(true);
+            }
+            else
+            {
+                rbtnIExpand.setSelected(true);
+            }
+        }
+        else
+        {
+            pnlTitel.setVisible(true);
+            iTitle.setText(i.getTitle().split(",")[1]);
+            pnlGroup.setVisible(true);
+            iGroupNumber.setValue(i.getGID());
+        }
     }
+    
+    public void resyncPriority()
+    {
 
+    }
+    
+    
+    
     /**
      * This method is called from within the constructor to
      * initialize the form.
@@ -32,63 +90,164 @@ public class EditorUIFileWise extends javax.swing.JPanel
     private void initComponents()
     {
 
+        bGInclude = new javax.swing.ButtonGroup();
         jScrollPane1 = new javax.swing.JScrollPane();
         lstElements = new javax.swing.JList();
-        iTitle = new javax.swing.JTextField();
-        jLabel1 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
         jLabel3 = new javax.swing.JLabel();
         iPath = new javax.swing.JTextField();
         pathSelect = new javax.swing.JButton();
-        oCalculatedPriority = new javax.swing.JLabel();
-        iGroupNumber = new javax.swing.JSpinner();
-        jLabel4 = new javax.swing.JLabel();
-        iPriority = new javax.swing.JSpinner();
-        jRadioButton1 = new javax.swing.JRadioButton();
-        jLabel5 = new javax.swing.JLabel();
-        jRadioButton2 = new javax.swing.JRadioButton();
-        jButton1 = new javax.swing.JButton();
         jSeparator1 = new javax.swing.JSeparator();
         jSeparator2 = new javax.swing.JSeparator();
         jButton2 = new javax.swing.JButton();
         jButton3 = new javax.swing.JButton();
         jButton4 = new javax.swing.JButton();
+        pnlInclude = new javax.swing.JPanel();
+        jLabel5 = new javax.swing.JLabel();
+        rbtnIExpand = new javax.swing.JRadioButton();
+        rbtnINoexpand = new javax.swing.JRadioButton();
+        btnLoadForEdit = new javax.swing.JButton();
+        btnApply = new javax.swing.JButton();
+        pnlGroup = new javax.swing.JPanel();
+        iGroupNumber = new javax.swing.JSpinner();
+        jLabel4 = new javax.swing.JLabel();
+        pnlPrio = new javax.swing.JPanel();
+        oCalculatedPriority = new javax.swing.JLabel();
+        iPriority = new javax.swing.JSpinner();
+        jLabel2 = new javax.swing.JLabel();
+        pnlTitel = new javax.swing.JPanel();
+        iTitle = new javax.swing.JTextField();
+        jLabel1 = new javax.swing.JLabel();
 
-        lstElements.setModel(new javax.swing.AbstractListModel()
-        {
-            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
-            public int getSize() { return strings.length; }
-            public Object getElementAt(int i) { return strings[i]; }
-        });
+        lstElements.setModel(lm);
         jScrollPane1.setViewportView(lstElements);
 
-        jLabel1.setText("Titel");
-
-        jLabel2.setText("Priorität");
-
         jLabel3.setText("Datei");
 
         pathSelect.setText("Durchsuchen");
 
-        oCalculatedPriority.setText("Berechnete Priorität: 0");
+        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
 
-        jLabel4.setText("Group Number");
+        jButton2.setText("Neue Sub-Liste");
+
+        jButton3.setText("Neues Element");
 
-        jRadioButton1.setText("Expandierend: Liste wirdin mischbare Elemente zerlegt");
+        jButton4.setText("Element entfernen");
 
         jLabel5.setText("Include-Modus");
 
-        jRadioButton2.setText("Nicht expandierend: Liste wird als ein nicht mischbarer Block behandelt");
+        rbtnIExpand.setText("Expandierend: Liste wirdin mischbare Elemente zerlegt");
 
-        jButton1.setText("Liste zum Bearbeiten öffnen");
+        rbtnINoexpand.setText("Nicht expandierend: Liste wird als ein nicht mischbarer Block behandelt");
 
-        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
+        btnLoadForEdit.setText("Liste zum Bearbeiten öffnen");
+        btnLoadForEdit.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnLoadForEditActionPerformed(evt);
+            }
+        });
 
-        jButton2.setText("Neue Sub-Liste");
+        javax.swing.GroupLayout pnlIncludeLayout = new javax.swing.GroupLayout(pnlInclude);
+        pnlInclude.setLayout(pnlIncludeLayout);
+        pnlIncludeLayout.setHorizontalGroup(
+            pnlIncludeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(pnlIncludeLayout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(pnlIncludeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(jLabel5)
+                    .addComponent(rbtnIExpand)
+                    .addComponent(rbtnINoexpand)
+                    .addComponent(btnLoadForEdit))
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+        pnlIncludeLayout.setVerticalGroup(
+            pnlIncludeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(pnlIncludeLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel5)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addComponent(rbtnIExpand)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addComponent(rbtnINoexpand)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(btnLoadForEdit)
+                .addContainerGap(26, Short.MAX_VALUE))
+        );
 
-        jButton3.setText("Neues Element");
+        btnApply.setText("Übernehmen");
+
+        jLabel4.setText("Group Number");
+
+        javax.swing.GroupLayout pnlGroupLayout = new javax.swing.GroupLayout(pnlGroup);
+        pnlGroup.setLayout(pnlGroupLayout);
+        pnlGroupLayout.setHorizontalGroup(
+            pnlGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlGroupLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel4)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(iGroupNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(42, Short.MAX_VALUE))
+        );
+        pnlGroupLayout.setVerticalGroup(
+            pnlGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlGroupLayout.createSequentialGroup()
+                .addGap(0, 11, Short.MAX_VALUE)
+                .addGroup(pnlGroupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(iGroupNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jLabel4)))
+        );
+
+        oCalculatedPriority.setText("Berechnete Priorität: 0");
+
+        jLabel2.setText("Priorität");
+
+        javax.swing.GroupLayout pnlPrioLayout = new javax.swing.GroupLayout(pnlPrio);
+        pnlPrio.setLayout(pnlPrioLayout);
+        pnlPrioLayout.setHorizontalGroup(
+            pnlPrioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPrioLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel2)
+                .addGap(30, 30, 30)
+                .addComponent(iPriority, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)
+                .addComponent(oCalculatedPriority)
+                .addGap(32, 32, 32))
+        );
+        pnlPrioLayout.setVerticalGroup(
+            pnlPrioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(pnlPrioLayout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(pnlPrioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(oCalculatedPriority)
+                    .addComponent(iPriority, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jLabel2))
+                .addContainerGap(21, Short.MAX_VALUE))
+        );
+
+        jLabel1.setText("Titel");
 
-        jButton4.setText("jButton4");
+        javax.swing.GroupLayout pnlTitelLayout = new javax.swing.GroupLayout(pnlTitel);
+        pnlTitel.setLayout(pnlTitelLayout);
+        pnlTitelLayout.setHorizontalGroup(
+            pnlTitelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTitelLayout.createSequentialGroup()
+                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(iTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(41, Short.MAX_VALUE))
+        );
+        pnlTitelLayout.setVerticalGroup(
+            pnlTitelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTitelLayout.createSequentialGroup()
+                .addContainerGap(21, Short.MAX_VALUE)
+                .addGroup(pnlTitelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel1)
+                    .addComponent(iTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
 
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         this.setLayout(layout);
@@ -102,105 +261,93 @@ public class EditorUIFileWise extends javax.swing.JPanel
                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 223, Short.MAX_VALUE)
+                                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 749, javax.swing.GroupLayout.PREFERRED_SIZE))
                             .addGroup(layout.createSequentialGroup()
                                 .addGap(21, 21, 21)
+                                .addComponent(jLabel3)
+                                .addGap(18, 18, 18)
+                                .addComponent(iPath)
+                                .addGap(12, 12, 12)
+                                .addComponent(pathSelect, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))
+                            .addGroup(layout.createSequentialGroup()
                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                     .addGroup(layout.createSequentialGroup()
-                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                                            .addGroup(layout.createSequentialGroup()
-                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                                    .addComponent(jLabel2))
-                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                                    .addGroup(layout.createSequentialGroup()
-                                                        .addGap(175, 175, 175)
-                                                        .addComponent(oCalculatedPriority))
-                                                    .addComponent(iTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                                            .addGroup(layout.createSequentialGroup()
-                                                .addComponent(jLabel3)
-                                                .addGap(18, 18, 18)
-                                                .addComponent(iPath))
-                                            .addGroup(layout.createSequentialGroup()
-                                                .addComponent(jLabel4)
-                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                                    .addComponent(iGroupNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                                    .addComponent(iPriority, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))))
-                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                                        .addComponent(pathSelect, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                        .addGap(31, 31, 31)
+                                        .addComponent(btnApply))
                                     .addGroup(layout.createSequentialGroup()
+                                        .addGap(18, 18, 18)
                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                            .addComponent(jRadioButton1)
-                                            .addComponent(jLabel5)
-                                            .addComponent(jRadioButton2)
-                                            .addComponent(jButton1))
-                                        .addGap(0, 0, Short.MAX_VALUE))))
-                            .addGroup(layout.createSequentialGroup()
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 509, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                        .addGap(24, 24, 24))
+                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                                .addComponent(pnlPrio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                                                        .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
+                                                        .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                        .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                                    .addComponent(pnlInclude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                                            .addComponent(pnlGroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+                                .addGap(0, 0, Short.MAX_VALUE)))
+                        .addContainerGap())
                     .addGroup(layout.createSequentialGroup()
                         .addGap(18, 18, 18)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
-                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                        .addComponent(pnlTitel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                         .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jScrollPane1)
                     .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                            .addComponent(iTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(jLabel1))
-                        .addGap(18, 18, 18)
+                        .addContainerGap()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jScrollPane1)
+                            .addComponent(jSeparator2)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(pnlTitel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(jLabel3)
                             .addComponent(iPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                             .addComponent(pathSelect))
-                        .addGap(71, 71, 71)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                            .addComponent(jLabel2)
-                            .addComponent(oCalculatedPriority)
-                            .addComponent(iPriority, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                        .addGap(18, 18, 18)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jLabel4)
-                            .addComponent(iGroupNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                        .addGap(53, 53, 53)
-                        .addComponent(jLabel5)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                        .addComponent(jRadioButton1)
+                        .addGap(69, 69, 69)
+                        .addComponent(pnlPrio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(pnlGroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(23, 23, 23)
+                        .addComponent(pnlInclude, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(72, 72, 72)
+                        .addComponent(btnApply)
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                        .addComponent(jRadioButton2)
-                        .addGap(29, 29, 29)
-                        .addComponent(jButton1)
-                        .addGap(31, 31, 31)
                         .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                         .addGap(18, 18, 18)
                         .addComponent(jButton2)
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                         .addComponent(jButton3)
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jButton4)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE))
-                    .addComponent(jSeparator2))
+                        .addComponent(jButton4)))
                 .addContainerGap())
         );
     }// </editor-fold>//GEN-END:initComponents
 
+    private void btnLoadForEditActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnLoadForEditActionPerformed
+    {//GEN-HEADEREND:event_btnLoadForEditActionPerformed
+        SinglePlayListItem itm =  ((PLIWrapper)lstElements.getSelectedValue()).pli;
+        paremtUI.openFileTab(itm);
+    }//GEN-LAST:event_btnLoadForEditActionPerformed
+    
+  
+    
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.ButtonGroup bGInclude;
+    private javax.swing.JButton btnApply;
+    private javax.swing.JButton btnLoadForEdit;
     private javax.swing.JSpinner iGroupNumber;
     private javax.swing.JTextField iPath;
     private javax.swing.JSpinner iPriority;
     private javax.swing.JTextField iTitle;
-    private javax.swing.JButton jButton1;
     private javax.swing.JButton jButton2;
     private javax.swing.JButton jButton3;
     private javax.swing.JButton jButton4;
@@ -209,13 +356,17 @@ public class EditorUIFileWise extends javax.swing.JPanel
     private javax.swing.JLabel jLabel3;
     private javax.swing.JLabel jLabel4;
     private javax.swing.JLabel jLabel5;
-    private javax.swing.JRadioButton jRadioButton1;
-    private javax.swing.JRadioButton jRadioButton2;
     private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JSeparator jSeparator1;
     private javax.swing.JSeparator jSeparator2;
     private javax.swing.JList lstElements;
     private javax.swing.JLabel oCalculatedPriority;
     private javax.swing.JButton pathSelect;
+    private javax.swing.JPanel pnlGroup;
+    private javax.swing.JPanel pnlInclude;
+    private javax.swing.JPanel pnlPrio;
+    private javax.swing.JPanel pnlTitel;
+    private javax.swing.JRadioButton rbtnIExpand;
+    private javax.swing.JRadioButton rbtnINoexpand;
     // End of variables declaration//GEN-END:variables
 }

+ 16 - 0
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/GraphException.java

@@ -0,0 +1,16 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package de.nplusc.izc.izpl.plugins.editor;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class GraphException extends Exception
+{
+    
+}

+ 1 - 1
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/InvalidGraphReferenceException.java

@@ -10,7 +10,7 @@ package de.nplusc.izc.izpl.plugins.editor;
  *
  * @author iZc <nplusc.de>
  */
-public class InvalidGraphReferenceException extends RuntimeException
+public class InvalidGraphReferenceException extends GraphException
 {
     
 }

+ 55 - 4
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/ListIncludeGraph.java

@@ -6,6 +6,7 @@
 
 package de.nplusc.izc.izpl.plugins.editor;
 
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -16,9 +17,31 @@ import java.util.List;
  */
 public class ListIncludeGraph
 {
-    private final HashMap<PlayListFile,PlayListFile> upMap = new HashMap<>();
+    private HashMap<PlayListFile,PlayListFile> upMap = new HashMap<>();
+    private HashMap<PlayListFile,List<PlayListFile>> downMap = new HashMap<>();
+    HashMap<String, PlayListFile> lookupCCH;
+    public HashMap<PlayListFile, PlayListFile> getUpMap()
+    {
+        return upMap;
+    }
+    
+
+    public void setUpMap(HashMap<PlayListFile, PlayListFile> upMap)
+    {
+        this.upMap = upMap;
+    }
+
+    public HashMap<PlayListFile, List<PlayListFile>> getDownMap()
+    {
+        return downMap;
+    }
+
+    public void setDownMap(HashMap<PlayListFile, List<PlayListFile>> downMap)
+    {
+        this.downMap = downMap;
+    }
+    
     
-    private final HashMap<PlayListFile,List<PlayListFile>> downMap = new HashMap<>();
     
     
     public List<PlayListFile> getIncludedLists(PlayListFile reference)
@@ -29,6 +52,14 @@ public class ListIncludeGraph
         }
         return new ArrayList<>();
     }
+    public HashMap<String,PlayListFile> generateLookupCache()
+    {
+        HashMap<String, PlayListFile> cch = new HashMap<>();
+        upMap.forEach((f,g)->cch.put(f.getPath(), f));
+        lookupCCH=cch;
+        return cch;
+    }
+    
     
     public PlayListFile getParentList(PlayListFile reference)
     {
@@ -39,7 +70,7 @@ public class ListIncludeGraph
         return null;
     }
     
-    public void addListLink(PlayListFile parent,PlayListFile newList)
+    public void addListLink(PlayListFile parent,PlayListFile newList) throws InvalidGraphReferenceException, DupeAddException
     {
         //parent=null ist für die rootListe notwendig um die zu registrieren
         if(parent==null)
@@ -65,7 +96,7 @@ public class ListIncludeGraph
         }
     }
     
-    public void removeGraphLink(PlayListFile parent,PlayListFile linkChild)
+    public void removeGraphLink(PlayListFile parent,PlayListFile linkChild) throws InvalidGraphReferenceException
     {
         if(upMap.containsKey(linkChild)&&downMap.containsKey(parent))
         {
@@ -77,4 +108,24 @@ public class ListIncludeGraph
             throw new InvalidGraphReferenceException();
         }
     }
+    
+    
+    public void recalcPriorities(PlayListFile f)
+    {
+        int basePriority = f.getCalculatedBasePriority();
+        if(lookupCCH==null)
+        {
+            generateLookupCache();
+        }
+        for (SinglePlayListItem pi : f.getEntries())
+        {
+            if(pi.isIncludeElement())
+            {
+                int intPrio=pi.getTargetPlaycount()*basePriority;
+                lookupCCH.get(pi.getPath()).setCalculatedBasePriority(intPrio);
+                recalcPriorities(lookupCCH.get(pi.getPath()));
+            }
+        }
+        
+    }
 }

+ 33 - 0
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/PLIWrapper.java

@@ -0,0 +1,33 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package de.nplusc.izc.izpl.plugins.editor;
+
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
+import de.nplusc.izc.tools.IOtools.FileTK;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class PLIWrapper
+{
+    public final SinglePlayListItem pli;
+
+    public PLIWrapper(SinglePlayListItem pli)
+    {
+        this.pli = pli;
+    }
+
+    @Override
+    public String toString()
+    {
+        return FileTK.getFileName(pli.getPath());
+    }
+    
+    
+    
+}

+ 52 - 4
iZplPlugins/Editor/src/main/java/de/nplusc/izc/izpl/plugins/editor/PlayListFile.java

@@ -6,8 +6,10 @@
 
 package de.nplusc.izc.izpl.plugins.editor;
 
-import de.nplusc.izc.iZpl.API.PlayListItem;
+
+import de.nplusc.izc.iZpl.API.SinglePlayListItem;
 import java.util.List;
+import java.util.Objects;
 
 /**
  *
@@ -15,14 +17,28 @@ import java.util.List;
  */
 public class PlayListFile
 {
-    private List<PlayListItem> entries;
+    private List<SinglePlayListItem> entries;
+    
+    private int calculatedBasePriority=1;
+
+    public int getCalculatedBasePriority()
+    {
+        return calculatedBasePriority;
+    }
 
-    public List<PlayListItem> getEntries()
+    public void setCalculatedBasePriority(int calculatedBasePriority)
+    {
+        this.calculatedBasePriority = calculatedBasePriority;
+    }
+    
+    
+    
+    public List<SinglePlayListItem> getEntries()
     {
         return entries;
     }
 
-    public void setEntries(List<PlayListItem> entries)
+    public void setEntries(List<SinglePlayListItem> entries)
     {
         this.entries = entries;
     }
@@ -37,6 +53,38 @@ public class PlayListFile
         this.path = path;
     }
     private String path;
+
+    @Override
+    public int hashCode()
+    {
+        int hash = 3;
+        hash = 41 * hash + Objects.hashCode(this.entries);
+        hash = 41 * hash + Objects.hashCode(this.path);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (obj == null)
+        {
+            return false;
+        }
+        if (getClass() != obj.getClass())
+        {
+            return false;
+        }
+        final PlayListFile other = (PlayListFile) obj;
+        if (!Objects.equals(this.entries, other.entries))
+        {
+            return false;
+        }
+        if (!Objects.equals(this.path, other.path))
+        {
+            return false;
+        }
+        return true;
+    }
     
     
     

+ 12 - 14
iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioConfig.form

@@ -48,7 +48,7 @@
                   </Group>
                   <Group type="102" alignment="1" attributes="0">
                       <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
-                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                      <Group type="103" groupAlignment="0" attributes="0">
                           <Group type="102" attributes="0">
                               <Group type="103" groupAlignment="0" attributes="0">
                                   <Group type="102" alignment="0" attributes="0">
@@ -70,22 +70,20 @@
                           </Group>
                           <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/>
                           <Component id="jScrollPane1" min="-2" pref="333" max="-2" attributes="0"/>
-                          <Group type="102" attributes="0">
-                              <Group type="103" groupAlignment="1" max="-2" attributes="0">
-                                  <Group type="102" attributes="0">
-                                      <Component id="btnRadioize" min="-2" pref="138" max="-2" attributes="0"/>
-                                      <EmptySpace max="-2" attributes="0"/>
-                                      <Component id="btnGetConfig" min="-2" pref="179" max="-2" attributes="0"/>
-                                  </Group>
-                                  <Group type="102" alignment="1" attributes="0">
-                                      <Component id="txfBasePath" max="32767" attributes="0"/>
-                                      <EmptySpace max="-2" attributes="0"/>
-                                      <Component id="jButton1" min="-2" pref="119" max="-2" attributes="0"/>
-                                  </Group>
+                          <Group type="103" groupAlignment="1" max="-2" attributes="0">
+                              <Group type="102" attributes="0">
+                                  <Component id="btnRadioize" min="-2" pref="138" max="-2" attributes="0"/>
+                                  <EmptySpace max="-2" attributes="0"/>
+                                  <Component id="btnGetConfig" min="-2" pref="179" max="-2" attributes="0"/>
+                              </Group>
+                              <Group type="102" alignment="1" attributes="0">
+                                  <Component id="txfBasePath" max="32767" attributes="0"/>
+                                  <EmptySpace max="-2" attributes="0"/>
+                                  <Component id="jButton1" min="-2" pref="119" max="-2" attributes="0"/>
                               </Group>
-                              <EmptySpace pref="54" max="32767" attributes="0"/>
                           </Group>
                       </Group>
+                      <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
                   </Group>
                   <Group type="102" alignment="1" attributes="0">
                       <EmptySpace min="0" pref="15" max="32767" attributes="0"/>

+ 6 - 1
iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioConfig.java

@@ -363,7 +363,12 @@ public class RadioConfig extends javax.swing.JFrame
         
         if(radioize)
         {
-            mgr.parseParameter(commandString);
+            Thread t = new Thread(()->
+            {
+                mgr.parseParameter(commandString);
+            });
+            t.setName("Radioizer");
+            t.start();
         }
     }
     

+ 7 - 3
iZplPlugins/GameRadio/src/main/java/de/nplusc/izc/izpl/plugins/gameradio/RadioManager.java

@@ -16,6 +16,7 @@ import de.nplusc.izc.tools.WinToolz.Commands;
 import de.nplusc.izc.tools.baseTools.Detectors;
 import de.nplusc.izc.tools.baseTools.Tools;
 import de.schlichtherle.truezip.file.TFile;
+import java.awt.EventQueue;
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
@@ -262,9 +263,12 @@ public class RadioManager implements FeaturePlugin
     @Override
     public void openUserInterface()
     {
-        GUIOpen=true;
-        rc=new RadioConfig(this);
-        rc.setVisible(true);
+        EventQueue.invokeLater(()->
+        {
+            GUIOpen=true;
+            rc=new RadioConfig(this);
+            rc.setVisible(true);
+        });
     }
 
     @Override