mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
see change log
This commit is contained in:
parent
2a1f0dae78
commit
9e734a8588
10 changed files with 53 additions and 20 deletions
|
@ -1,3 +1,18 @@
|
||||||
|
2003-09-03 David Inglis
|
||||||
|
- src/org/eclipse/cdt/ui/TabFolderOptionBlock.java
|
||||||
|
- src/org/eclipse/cdt/ui/AbstractCOptionPage.java
|
||||||
|
- src/org/eclipse/cdt/ui/BinaryParserBlock.java
|
||||||
|
- src/org/eclipse/cdt/ui/ErrorParserBlock.java
|
||||||
|
- src/org/eclipse/cdt/ui/ICOptionContainer.java
|
||||||
|
- src/org/eclipse/cdt/ui/ICOptionPage.java
|
||||||
|
- src/org/eclipse/cdt/ui/IndexerBlock.java
|
||||||
|
- src/org/eclipse/cdt/ui/ReferenceBlock.java
|
||||||
|
- src/org/eclipse/cdt/ui/TabFolderOptionBlock.java
|
||||||
|
moved to org.eclipse.cdt.ui.dialogs package.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/ui/wizards/NewCProjectWizardOptionPage.java
|
||||||
|
change due to refactor
|
||||||
|
|
||||||
2003-09-03 Alain Magloire
|
2003-09-03 Alain Magloire
|
||||||
|
|
||||||
Change to abstract and let the client provides the saving algorithm.
|
Change to abstract and let the client provides the saving algorithm.
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
|
@ -8,12 +8,13 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.CheckedListDialogField;
|
import org.eclipse.cdt.internal.ui.wizards.dialogfields.CheckedListDialogField;
|
||||||
|
@ -39,6 +40,8 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$
|
private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$
|
||||||
private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$
|
private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$
|
||||||
|
|
||||||
|
private final static String PREF_ERROR_PARSER = "errorOutputParser"; // $NON-NLS-1$
|
||||||
|
|
||||||
private static String[] EMPTY = new String[0];
|
private static String[] EMPTY = new String[0];
|
||||||
private Preferences fPrefs;
|
private Preferences fPrefs;
|
||||||
private HashMap mapParsers = new HashMap();
|
private HashMap mapParsers = new HashMap();
|
||||||
|
@ -57,8 +60,6 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ErrorParserBlock(Preferences prefs) {
|
public ErrorParserBlock(Preferences prefs) {
|
||||||
//super(CUIPlugin.getResourceString(LABEL));
|
|
||||||
//setDescription(CUIPlugin.getResourceString(DESC));
|
|
||||||
super("Error Parsers");
|
super("Error Parsers");
|
||||||
setDescription("Set the error parser for this project");
|
setDescription("Set the error parser for this project");
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,17 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String[] getErrorParserIDs(Preferences prefs) {
|
protected String[] getErrorParserIDs(Preferences prefs) {
|
||||||
return CCorePlugin.getDefault().getPreferenceErrorParserIDs(prefs);
|
String parserIDs = prefs.getString(PREF_ERROR_PARSER);
|
||||||
|
String[] empty = new String[0];
|
||||||
|
if (parserIDs != null && parserIDs.length() > 0) {
|
||||||
|
StringTokenizer tok = new StringTokenizer(parserIDs, ";");
|
||||||
|
List list = new ArrayList(tok.countTokens());
|
||||||
|
while (tok.hasMoreElements()) {
|
||||||
|
list.add(tok.nextToken());
|
||||||
|
}
|
||||||
|
return (String[]) list.toArray(empty);
|
||||||
|
}
|
||||||
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,7 +110,11 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
public abstract void saveErrorParsers(IProject project, String[] parserIDs);
|
public abstract void saveErrorParsers(IProject project, String[] parserIDs);
|
||||||
|
|
||||||
public void saveErrorParsers(Preferences prefs, String[] parserIDs) {
|
public void saveErrorParsers(Preferences prefs, String[] parserIDs) {
|
||||||
CCorePlugin.getDefault().setPreferenceErrorParser(prefs, parserIDs);
|
StringBuffer buf = new StringBuffer();
|
||||||
|
for (int i = 0; i < parserIDs.length; i++) {
|
||||||
|
buf.append(parserIDs[i]).append(';');
|
||||||
|
}
|
||||||
|
prefs.setValue(PREF_ERROR_PARSER, buf.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initMapParsers() {
|
protected void initMapParsers() {
|
||||||
|
@ -149,15 +164,15 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
|
|
||||||
String[] buttonLabels = new String[] {
|
String[] buttonLabels = new String[] {
|
||||||
/* 0 */
|
/* 0 */
|
||||||
"up", //$NON-NLS-1$
|
"Up", //$NON-NLS-1$
|
||||||
/* 1 */
|
/* 1 */
|
||||||
"down", //$NON-NLS-1$
|
"Down", //$NON-NLS-1$
|
||||||
/* 2 */
|
/* 2 */
|
||||||
null,
|
null,
|
||||||
/* 3 */
|
/* 3 */
|
||||||
"checkall", //$NON-NLS-1$
|
"Select All", //$NON-NLS-1$
|
||||||
/* 4 */
|
/* 4 */
|
||||||
"uncheckall" //$NON-NLS-1$
|
"Unselect All" //$NON-NLS-1$
|
||||||
};
|
};
|
||||||
|
|
||||||
fErrorParserList = new CheckedListDialogField(null, buttonLabels, getLabelProvider());
|
fErrorParserList = new CheckedListDialogField(null, buttonLabels, getLabelProvider());
|
||||||
|
@ -181,7 +196,7 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
monitor.beginTask("Reference Projects", 1);
|
monitor.beginTask("Setting Error Parsers...", 1);
|
||||||
List list = fErrorParserList.getCheckedElements();
|
List list = fErrorParserList.getCheckedElements();
|
||||||
|
|
||||||
String[] parserIDs = (String[])list.toArray(EMPTY);
|
String[] parserIDs = (String[])list.toArray(EMPTY);
|
||||||
|
@ -190,6 +205,8 @@ public abstract class ErrorParserBlock extends AbstractCOptionPage {
|
||||||
} else {
|
} else {
|
||||||
saveErrorParsers(project, parserIDs);
|
saveErrorParsers(project, parserIDs);
|
||||||
}
|
}
|
||||||
|
monitor.worked(1);
|
||||||
|
monitor.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
@ -14,7 +14,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui.dialogs;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Copyright (c) 2003 IBM Corporation and others.
|
* Copyright (c) 2003 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
|
@ -8,8 +8,8 @@
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.ui.wizards;
|
package org.eclipse.cdt.ui.wizards;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.TabFolderOptionBlock;
|
import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
|
||||||
import org.eclipse.cdt.ui.ICOptionContainer;
|
import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue