diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/ErrorParserBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/ErrorParserBlock.java new file mode 100644 index 00000000000..82a8814ef66 --- /dev/null +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/ErrorParserBlock.java @@ -0,0 +1,47 @@ +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * QNX Software Systems - Move to Make plugin +***********************************************************************/ +package org.eclipse.cdt.make.internal.ui; + +import org.eclipse.cdt.make.core.IMakeBuilderInfo; +import org.eclipse.cdt.make.core.MakeBuilder; +import org.eclipse.cdt.make.core.MakeCorePlugin; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Preferences; + +public class ErrorParserBlock extends org.eclipse.cdt.ui.dialogs.ErrorParserBlock { + + public ErrorParserBlock(Preferences prefs) { + super(prefs); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.dialogs.ErrorParserBlock#getErrorParserIDs(org.eclipse.core.resources.IProject) + */ + protected String[] getErrorParserIDs(IProject project) { + IMakeBuilderInfo info; + try { + info = MakeCorePlugin.createBuildInfo(project, MakeBuilder.BUILDER_ID); + } catch (CoreException e) { + return new String[0]; + } + return info.getErrorParsers(); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.dialogs.ErrorParserBlock#saveErrorParsers(org.eclipse.core.resources.IProject, java.lang.String[]) + */ + public void saveErrorParsers(IProject project, String[] parserIDs) throws CoreException { + IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(project, MakeBuilder.BUILDER_ID); + info.setErrorParsers(parserIDs); + } + +} diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java index d960aba5622..4233532526d 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java @@ -24,6 +24,7 @@ public class MakeProjectOptionBlock extends TabFolderOptionBlock { protected void addTabs() { addTab(new SettingsBlock(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID)); + addTab(new ErrorParserBlock(MakeCorePlugin.getDefault().getPluginPreferences())); addTab(new BinaryParserBlock(MakeCorePlugin.getDefault().getPluginPreferences())); addTab(new BuildPathInfoBlock()); }