1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

added new error parser block to project preferences/properties and wizard

This commit is contained in:
David Inglis 2003-09-04 03:06:11 +00:00
parent 08eb89846c
commit ebf52677b8
2 changed files with 48 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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());
}