/** * A connection has occured - initialize all resources if it is the first * activation. */ public static void connect() { if (++fgRefCount == 1) { createVelocityParser(); fgColorProvider = new VelocityColorProvider(); fgCodeScanner = new VelocityCodeScanner(fgColorProvider); fgStringScanner = new VelocityStringScanner(fgColorProvider); fgDoubleClickStrategy = new DefaultTextDoubleClickStrategy(); } }