PreviousNextTracker indexSee it online !

(3/27) 307 - Patch to add pluginset command-line option

This patch allows users to choose which plugins jEdit loads at startup by specifying a PluginSet .xml file through the -pluginset command-line switch.

This is my first patch submission, so it may need a little more testing before being committed.

Submitted kog13 - 2010-01-05 09:45:58 Assigned
Priority 5 Labels
Status open Group None
Resolution remind

Comments

2010-01-05 09:46:55
kog13

This patch should be applied to jEdit.java.

2010-01-06 16:56:02
ezust

- **assigned_to**: nobody --> ezust

2010-01-07 02:17:33
ezust

I can't seem to get it to work for me.

\[ezust@cerberus\] /home/ezust/.jedit> jedit -pluginset=pluginset.xml
6:14:26 PM \[main\] \[error\] PluginJAR: Cannot load plugin /home/ezust/workspace/jedit/trunk/build/jars/JCalculator.jar
6:14:26 PM \[main\] \[error\] PluginJAR: java.util.zip.ZipException: error in opening zip file
6:14:26 PM \[main\] \[error\] PluginJAR: at java.util.zip.ZipFile.open(Native Method)
6:14:26 PM \[main\] \[error\] PluginJAR: at java.util.zip.ZipFile.<init>(ZipFile.java:114)
6:14:26 PM \[main\] \[error\] PluginJAR: at java.util.zip.ZipFile.<init>(ZipFile.java:75)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.PluginJAR.getZipFile(PluginJAR.java:369)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.PluginJAR.generateCache(PluginJAR.java:1227)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.PluginJAR.init(PluginJAR.java:1035)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.jEdit.addPluginJAR(jEdit.java:1148)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.jEdit.addPluginJARsFromDirectory(jEdit.java:1199)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.jEdit.initPlugins(jEdit.java:3545)
6:14:26 PM \[main\] \[error\] PluginJAR: at org.gjt.sp.jedit.jEdit.main(jEdit.java:456)
6:14:26 PM \[main\] \[error\] ErrorListDialog$ErrorEntry: /home/ezust/workspace/jedit/trunk/build/jars/JCalculator.jar:
6:14:26 PM \[main\] \[error\] ErrorListDialog$ErrorEntry: Cannot load: java.util.zip.ZipException: error in opening zip file
6:14:26 PM \[main\] \[error\] ErrorListDialog$ErrorEntry: The most likely reason is that the JAR file is corrupt; try
6:14:26 PM \[main\] \[error\] ErrorListDialog$ErrorEntry: reinstalling it. See Utilities->Troubleshooting->Activity Log
6:14:26 PM \[main\] \[error\] ErrorListDialog$ErrorEntry: for a full stack trace.
6:14:26 PM \[main\] \[error\] jEdit: Failed to generate cache while loading plugin JCalculator.jar
6:14:26 PM \[main\] \[error\] main: Exception in thread "main"
6:14:26 PM \[main\] \[error\] main: java.lang.NullPointerException
6:14:26 PM \[main\] \[error\] main: at org.gjt.sp.jedit.jEdit.addPluginJARsFromDirectory(jEdit.java:1212)
6:14:26 PM \[main\] \[error\] main: at org.gjt.sp.jedit.jEdit.initPlugins(jEdit.java:3545)
6:14:26 PM \[main\] \[error\] main: at org.gjt.sp.jedit.jEdit.main(jEdit.java:456)

2010-01-07 16:53:28
nobody

PluginSet test file.

Basic.xml (352B)

2010-01-07 16:54:52
kog13

PluginSet test file.

Full.xml (1.6Kio)

2010-01-07 16:56:48
kog13

What PluginSets are you using? It seems to work fine with mine (I uploaded the two that I tested with).

2010-01-07 17:11:18
ezust

alan's minimal pluginset.xml

minimal.xml (2.3Kio)

2010-01-07 17:11:49
ezust

alan's full pluginset.xml

pluginset.xml (3.0Kio)

2010-01-08 16:05:49
kog13

Fixed a bug that caused errors when a plugin defined in a PluginSet could not be found.

pluginset-v_0_2.patch (7.2Kio)

2010-01-08 16:06:52
kog13

Can you try it now? I know I fixed at least one bug, but I don't know if it's the one you were having. Your PluginSets now work on my machine, though, so hopefully it solved the problem.

2010-11-25 17:57:48
ezust

I am sorry, this totally fell off my stack. I just tried to apply it and now 1 of the hunks fails against jedit trunk.
If you revisit and resubmit, I will make a point of testing it faster this time. sorry about that\!
\[and there is still a chance of getting it into 4.4 if it works\]

2012-01-25 03:43:23
ezust

- **status**: open --> open-remind

2012-03-01 18:18:27
ezust

- **assigned_to**: ezust --> nobody