ZeServeur

The knowledge acquired through experience, everything else is just information ...

Displaying items marked Plugin

This is a small problem that happens from time to time with Eclipse and its classloaders:

Suppose A has declared a plugin dependency to a plugin B.

Question: how do you that B of A still visible?

There, you'll say: it is a bit twisted though ... is that your division of plugins is lousy! And no, it can happen for example when using configuration files that are reported in A, which are used by B.

Solution:

It suffices to state mechanism in MANIFEST.MF files:

  • shared in the plugin that needs access to external classes (B):
      Eclipse-BuddyPolicy: registered 
  • in (or) plugin (s) which use (s) B (A in our case):
      Eclipse-RegisterBuddy: name> plugin <share 

It implicitly (which is called the "Buddy Class Loading") to declare the relationship in the other direction.

Existential question when writing posts with the code: "How I put it in color?"
Because we must admit that it's still much more pleasant to read ...

Example:

  public class MyClass (
     public void doSomething () throws MyException (
         / / Something
     )
 ) 

makes it much better like this:

  1. public class MyClass (
  2. doSomething ( ) throws MyException { public void doSomething () throws MyException (
  3. / / Something
  4. )
  5. )

Having toured some plugins, I found one that fits perfectly to my needs ... and most importantly, compatible with version 2.7 of wordpress:
http://wordpress.org/extend/plugins/highlight-source-pro/

continue reading ...