/** @see ITomcatVersionHandler#verifyInstallPath(IPath) */ public IStatus verifyInstallPath(IPath installPath) { IStatus result = TomcatVersionHelper.checkCatalinaVersion(installPath, TomcatPlugin.TOMCAT_80); // If check was canceled, use folder check if (result.getSeverity() == IStatus.CANCEL) { result = TomcatPlugin.verifyInstallPathWithFolderCheck(installPath, TomcatPlugin.TOMCAT_80); } return result; }
/** * Trace the given message and exception. * * @param level the trace level * @param s a message * @param t a throwable */ public static void trace(byte level, String s, Throwable t) { if (!TomcatPlugin.getInstance().isDebugging()) return; /*System.out.println(TomcatPlugin.PLUGIN_ID + " " + s); if (t != null) t.printStackTrace();*/ trace(TomcatPlugin.PLUGIN_ID, level, s, t); }
/** * Trace the given message and exception. * * @param level a trace level * @param s a message * @param t a throwable */ private static void trace(String pluginId, int level, String s, Throwable t) { if (pluginId == null || s == null) return; if (!TomcatPlugin.getInstance().isDebugging()) return; StringBuffer sb = new StringBuffer(pluginId); if (pluginId.length() > pluginLength) pluginLength = pluginId.length(); else if (pluginId.length() < pluginLength) sb.append(spacer.substring(0, pluginLength - pluginId.length())); sb.append(" "); sb.append(levelNames[level]); sb.append(" "); sb.append(sdf.format(new Date())); sb.append(" "); sb.append(s); // Platform.getDebugOption(ServerCore.PLUGIN_ID + "/" + "resources"); System.out.println(sb.toString()); if (t != null) t.printStackTrace(); }
/** * Gets state of debug flag for the plug-in. * * @return true if tracing is enabled */ public static boolean isTraceEnabled() { return TomcatPlugin.getInstance().isDebugging(); }