if (text != null && text.startsWith("com.webobjects.foundation.NSForwardException [com.webobjects.appserver._private.WODeclarationFormatException] <WOHTMLTemplateParser> no declaration for dynamic element (or component) named")) { int startIndex = text.indexOf('\'', 0); int endIndex = text.indexOf('\'', startIndex + 1); final String pathString = text.substring(startIndex + 6, endIndex); IPath path = Path.fromOSString(pathString); path = path.makeRelative(); path = path.append(path.lastSegment() + "d"); path = new Path("/Foo/Main.wo/Main.wod"); final String errorMessage = text.substring(133, startIndex - 99); final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); Display.getDefault().asyncExec(new Runnable() { public void run() { WorkbenchUtilitiesPlugin.open(file); IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, errorMessage, null); ErrorDialog.openError(null, "Buggy WOComponent", "", status);
if (text != null) { String exception = "com.webobjects.foundation.NSForwardException [com.webobjects.appserver._private.WODeclarationFormatException] <WOHTMLTemplateParser> no declaration for dynamic element (or component) named"; int exceptionIndex = text.indexOf(exception); if (exceptionIndex >= 0) { int startIndex = text.indexOf('\'', exceptionIndex + exception.length()); int endIndex = text.indexOf('\'', startIndex + 1); final String pathString = text.substring(startIndex + 6, endIndex); IPath path = Path.fromOSString(pathString); IPath wodpath = path.append(path.lastSegment() + "d"); final String errorMessage = text.substring(133 + exceptionIndex, startIndex - 99 + exceptionIndex); final String declared = text.substring(189 + exceptionIndex, startIndex - 99 + exceptionIndex); final IFile wodfile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(wodpath); this.blockNextLines(); LaunchingPlugin.getDefault().selectAndReveal(wodfile, declared, IEditorTarget.TARGET_HTML); Display.getDefault().asyncExec(new Runnable() { public void run() { IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, errorMessage, null); ErrorDialog.openError(null, "Buggy WOComponent", "", status); } }); } } if (text != null) { String exception = "com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [<"; int exceptionIndex = text.indexOf(exception); if (exceptionIndex >= 0) { int startIndex = exceptionIndex + exception.length(); int endIndex = text.indexOf(' ', startIndex + 1); final String fileName = text.substring(startIndex, endIndex); IJavaProject javaProject = null; try { javaProject = JavaRuntime.getJavaProject(this.currentConsole.getProcess().getLaunch().getLaunchConfiguration()); } catch (CoreException e) { LaunchingPlugin.getDefault().log(e);
	public void lineAppended(IRegion line) {		int offset = line.getOffset();		int length = line.getLength();		String text = null;		try {			text = currentConsole.getDocument().get(offset, length);		} catch (BadLocationException e) {			e.printStackTrace();		}		if (text != null && text.startsWith("com.webobjects.foundation.NSForwardException [com.webobjects.appserver._private.WODeclarationFormatException] <WOHTMLTemplateParser> no declaration for dynamic element (or component) named")) {			int startIndex = text.indexOf('\'', 0);			int endIndex = text.indexOf('\'', startIndex + 1);			final String pathString = text.substring(startIndex + 6, endIndex);			IPath path = Path.fromOSString(pathString);			path = path.makeRelative();			path = path.append(path.lastSegment() + "d");			path = new Path("/Foo/Main.wo/Main.wod");			final String errorMessage = text.substring(133, startIndex - 99);			final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);			Display.getDefault().asyncExec(new Runnable() {				public void run() {					WorkbenchUtilitiesPlugin.open(file);					IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.PLUGIN_ID, IStatus.ERROR, errorMessage, null);					ErrorDialog.openError(null, "Buggy WOComponent", "", status);				}			});		}	}