BeanShell - Textdatei auslesen
Re: BeanShell - Textdatei auslesen
Der Vorteil mit Entwicklungsumgebung ist, dass du das einmal einrichtest und dann immer bei Bedarf direkt etwas ändern kannst.
Es hört sich vielleicht zu Anfang schwierig an, aber das ist viel leichter als man denkt.
Es hört sich vielleicht zu Anfang schwierig an, aber das ist viel leichter als man denkt.
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Das ist schon klar. Ich kann die Umgebung ja dann auch bei Gelegenheit mal einrichten.
in dem aktuellen Fall wäre es aber lieb, wenn Du das übernhemen könntest. Geht das?
in dem aktuellen Fall wäre es aber lieb, wenn Du das übernhemen könntest. Geht das?
Re: BeanShell - Textdatei auslesen
Ja, kann ich machen, wenn ich die fehlenden Dateien noch bekomme.
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Super! Danke!
Hier sind die Property-Files.
csvfilefiltercomponent.properties
csvfilefiltercomponent_de.properties
Hier sind die Property-Files.
csvfilefiltercomponent.properties
Code: Alles auswählen
FilterFilterComponent.compName = CSV Filter
FilterFilterComponent.description = Allows to build filter components reading filter information from a CSV file.
FilterFilterComponent.name = CSVFileFilterComponent
FilterFilterComponent.settings.info = Please provide the CSV file path:
Code: Alles auswählen
FilterFilterComponent.compName = CSV-Datei
FilterFilterComponent.description = Ermöglicht die Erstellung von Filterkomponenten deren Filterinformationen aus einer CSV-Datei gelesen werden.
FilterFilterComponent.name = CSV-Datei-Filterkomponente
FilterFilterComponent.settings.info = Bitte geben Sie den Pfad zur CSV-Datei an:
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Bitte sende mir den korrigierten Code, falls da noch Bugs drin sind.
Re: BeanShell - Textdatei auslesen
Der Quellcode ist in der Plugin-Datei enthalten.
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Danke!
Das JAR kopiere ich dann in das Plugin-Verzeichnis! Richtig?
Ich mache dann mal einen Performance-Test.
Das JAR kopiere ich dann in das Plugin-Verzeichnis! Richtig?
Ich mache dann mal einen Performance-Test.
Re: BeanShell - Textdatei auslesen
Ja, oder du ziehst die Datei in das TV-Browser Fenster, dann wird die Installation angeboten.
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Oh jeh! Wenn ich für den Filter mit der neuen Komponente ein Filter-Info Icon anlege, erhalte ich vom Filter-Info-Icon Plugin eine Exception
Code: Alles auswählen
Das Plugin "Filter-Info-Icons" hat einen Fehler verursacht. Soll es deaktiviert werden?
----- Start of stacktrace -----
java.lang.NullPointerException
at csvfilefiltercomponent.CSVFileFilterComp.accept(CSVFileFilterComp.java:53)
at tvbrowser.core.filters.ItemNode.accept(UserFilter.java:581)
at tvbrowser.core.filters.AndNode.accept(UserFilter.java:542)
at tvbrowser.core.filters.UserFilter.accept(UserFilter.java:407)
at filterinfoicon.FilterEntry.accepts(FilterEntry.java:262)
at filterinfoicon.FilterInfoIcon.getProgramTableIcons(FilterInfoIcon.java:192)
at tvbrowser.core.plugin.JavaPluginProxy.doGetProgramTableIcons(JavaPluginProxy.java:473)
at tvbrowser.core.plugin.AbstractPluginProxy.getProgramTableIcons(AbstractPluginProxy.java:409)
at util.ui.ProgramPanel.getPluginIcons(ProgramPanel.java:686)
at util.ui.ProgramPanel.paintComponent(ProgramPanel.java:711)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.CellRendererPane.paintComponent(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paintImpl(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1100(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at util.ui.textcomponentpopup.TextComponentPopupEventQueue.dispatchEvent(TextComponentPopupEventQueue.java:55)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at filterinfoicon.FilterInfoIcon$1.actionPerformed(FilterInfoIcon.java:129)
at devplugin.ContextMenuAction.actionPerformed(ContextMenuAction.java:70)
at tvbrowser.core.plugin.ActionProxy.actionPerformed(ActionProxy.java:83)
at tvbrowser.ui.mainframe.toolbar.ToolBar$11.actionPerformed(ToolBar.java:617)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at util.ui.PopupButton.fireActionPerformed(PopupButton.java:53)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at util.ui.textcomponentpopup.TextComponentPopupEventQueue.dispatchEvent(TextComponentPopupEventQueue.java:55)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
----- End of stacktrace -----
Zuletzt geändert von Sheldon2012 am 02 Mär 2015, 21:45, insgesamt 1-mal geändert.
Re: BeanShell - Textdatei auslesen
Dann lösche den Filter nochmal und probiere es hiermit:
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Das Filter-Info-Icon Plugin mag unsere Filterkomponente nicht!
Die exception ist zu lang.
Code: Alles auswählen
Das Plugin "Filter-Info-Icons" hat einen Fehler verursacht. Soll es deaktiviert werden?
----- Start of stacktrace -----
java.lang.NullPointerException
at csvfilefiltercomponent.CSVFileFilterComp.prepareForComparison(CSVFileFilterComp.java:195)
at csvfilefiltercomponent.CSVFileFilterComp.accept(CSVFileFilterComp.java:64)
at tvbrowser.core.filters.ItemNode.accept(UserFilter.java:581)
at tvbrowser.core.filters.AndNode.accept(UserFilter.java:542)
at tvbrowser.core.filters.UserFilter.accept(UserFilter.java:407)
at filterinfoicon.FilterEntry.accepts(FilterEntry.java:262)
at filterinfoicon.FilterInfoIcon.getProgramTableIcons(FilterInfoIcon.java:192)
at tvbrowser.core.plugin.JavaPluginProxy.doGetProgramTableIcons(JavaPluginProxy.java:473)
at tvbrowser.core.plugin.AbstractPluginProxy.getProgramTableIcons(AbstractPluginProxy.java:409)
at util.ui.ProgramPanel.getPluginIcons(ProgramPanel.java:686)
at util.ui.ProgramPanel.paintComponent(ProgramPanel.java:711)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.CellRendererPane.paintComponent(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paintImpl(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JSplitPane.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JSplitPane.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1100(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at
....
Re: BeanShell - Textdatei auslesen
Das zeigt nur, wie viel einfacher es wäre, wenn du eine Entwicklungsumgebung hättest:
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Hurra, Jetzt sind die Exceptions weg! Danke!
Und das Plugin funktioniert sogar! Kaum zu glauben!
Prinzipiell hast Du ja recht! Aber wenn die Fehler, so wie jetzt, aus einer ganz anderen Ecke kommen, benötige ich mit dem aktuellen Wissensstand bzgl. des Quellcodes bis Weihnachten, um den Fehler zu finden. Wann soll ich denn dann noch Geschenke kaufen?
Aberjetzt habe ich ja ein aktuelles Beispiel, von dem ich weiss, das es funktioniert, an dem ich das ganze mal durchspielen kann.
Und das Plugin funktioniert sogar! Kaum zu glauben!
Prinzipiell hast Du ja recht! Aber wenn die Fehler, so wie jetzt, aus einer ganz anderen Ecke kommen, benötige ich mit dem aktuellen Wissensstand bzgl. des Quellcodes bis Weihnachten, um den Fehler zu finden. Wann soll ich denn dann noch Geschenke kaufen?
Aberjetzt habe ich ja ein aktuelles Beispiel, von dem ich weiss, das es funktioniert, an dem ich das ganze mal durchspielen kann.
Re: BeanShell - Textdatei auslesen
Das denke ich nicht. Java-Fehlermeldungen sind sehr spezfisch:Sheldon2012 hat geschrieben:Aber wenn die Fehler, so wie jetzt, aus einer ganz anderen Ecke kommen, benötige ich mit dem aktuellen Wissensstand bzgl. des Quellcodes bis Weihnachten, um den Fehler zu finden.
Code: Alles auswählen
java.lang.NullPointerException
at csvfilefiltercomponent.CSVFileFilterComp.prepareForComparison(CSVFileFilterComp.java:195)
Code: Alles auswählen
...
23 String name;
24
25 if(name.length() > 0) {
26 System.out.println(name);
27 }
...
Code: Alles auswählen
...
23 String name = "";
24
25 if(name.length() > 0) {
26 System.out.println(name);
27 }
...
"First they ignore you, then they ridicule you, then they fight you, then you win." - Mahatma Gandhi
Unterstütze die Weiterentwicklung von TV-Browser
Unterstütze die Weiterentwicklung von TV-Browser
-
- Plugin-Developer
- Beiträge: 1206
- Registriert: 25 Dez 2012, 07:35
Re: BeanShell - Textdatei auslesen
Die Performance ist jedoch katastrophal. Das habe ich befürchtet.
Bei 10.000 Einträgen in der Datei geht im TV-Browser fast nichts mehr.
Das ist natürlich irgendwo klar, wenn permanent abgefragt wird.
Womit wir wieder bei der Option wären.
Bei 10.000 Einträgen in der Datei geht im TV-Browser fast nichts mehr.
Das ist natürlich irgendwo klar, wenn permanent abgefragt wird.
Womit wir wieder bei der Option wären.