mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Merge remote-tracking branch 'cdt/master' into sd90
This commit is contained in:
commit
89a9259918
12 changed files with 91 additions and 112 deletions
|
@ -7,11 +7,13 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Red Hat Inc. - initial API and implementation
|
* Red Hat Inc. - initial API and implementation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.autotools.core;
|
package org.eclipse.cdt.internal.autotools.core;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.LineNumberReader;
|
import java.io.LineNumberReader;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
@ -29,11 +31,10 @@ import org.eclipse.core.runtime.Path;
|
||||||
// possibly other data in the future. The standard CDT ErrorParserManager doesn't allow
|
// possibly other data in the future. The standard CDT ErrorParserManager doesn't allow
|
||||||
// us to pass an extended ProblemMarkerInfo, so we are forced to have our own mechanism
|
// us to pass an extended ProblemMarkerInfo, so we are forced to have our own mechanism
|
||||||
// which is similar to the CDT one.
|
// which is similar to the CDT one.
|
||||||
public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
public class ErrorParser extends MarkerGenerator implements IErrorParser {
|
||||||
|
|
||||||
public static final String ID = AutotoolsPlugin.PLUGIN_ID + ".errorParser"; //$NON-NLS-1$
|
public static final String ID = AutotoolsPlugin.PLUGIN_ID + ".errorParser"; //$NON-NLS-1$
|
||||||
private Pattern pkgconfigError =
|
private Pattern pkgconfigError =
|
||||||
Pattern.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$
|
Pattern.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$
|
||||||
private Pattern genconfigError =
|
private Pattern genconfigError =
|
||||||
Pattern.compile(".*?configure:\\s+error:\\s+(.*)"); //$NON-NLS-1$
|
Pattern.compile(".*?configure:\\s+error:\\s+(.*)"); //$NON-NLS-1$
|
||||||
private Pattern checkingFail =
|
private Pattern checkingFail =
|
||||||
|
@ -54,6 +55,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
||||||
this.sourcePath = sourcePath;
|
this.sourcePath = sourcePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean processLine(String line,
|
public boolean processLine(String line,
|
||||||
org.eclipse.cdt.core.ErrorParserManager eoParser) {
|
org.eclipse.cdt.core.ErrorParserManager eoParser) {
|
||||||
|
|
||||||
|
@ -149,10 +151,9 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
FileReader stream;
|
LineNumberReader reader = null;
|
||||||
try {
|
try {
|
||||||
stream = new FileReader(file);
|
reader = new LineNumberReader(new FileReader(file));
|
||||||
LineNumberReader reader = new LineNumberReader(stream);
|
|
||||||
|
|
||||||
// look for something like:
|
// look for something like:
|
||||||
// if test "${ac_cv_prog_WINDRES+set}" = set; then :
|
// if test "${ac_cv_prog_WINDRES+set}" = set; then :
|
||||||
|
@ -179,10 +180,16 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
||||||
}
|
}
|
||||||
line = reader.readLine();
|
line = reader.readLine();
|
||||||
}
|
}
|
||||||
stream.close();
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
|
if (reader != null) {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// Ignore.
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -196,31 +203,34 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private int getErrorConfigLineNumber(String name) {
|
private int getErrorConfigLineNumber(String name) {
|
||||||
|
LineNumberReader reader = null;
|
||||||
try {
|
try {
|
||||||
File file = new File(buildDir + "/config.log");
|
File file = new File(buildDir + "/config.log");
|
||||||
// If the log file is not present there is nothing we can do.
|
// If the log file is not present there is nothing we can do.
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
FileReader stream = new FileReader(file);
|
reader = new LineNumberReader(new FileReader(file));
|
||||||
LineNumberReader reader = new LineNumberReader(stream);
|
|
||||||
|
|
||||||
Pattern errorPattern = Pattern
|
Pattern errorPattern =
|
||||||
.compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$
|
Pattern.compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$
|
||||||
String line = reader.readLine();
|
String line;
|
||||||
while (line != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
Matcher m = errorPattern.matcher(line);
|
Matcher m = errorPattern.matcher(line);
|
||||||
|
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
return Integer.parseInt(m.group(1));
|
return Integer.parseInt(m.group(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
line = reader.readLine();
|
|
||||||
}
|
}
|
||||||
stream.close();
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return -1;
|
return -1;
|
||||||
|
} finally {
|
||||||
|
if (reader != null) {
|
||||||
|
try {
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// Ignore.
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5787,7 +5787,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// template <template<typename T> class TT> struct CTT {
|
// template <template<typename T> class TT> struct CTT {
|
||||||
// int y;
|
// int y;
|
||||||
// };
|
// };
|
||||||
// template <typename T> struct CT {
|
// template <typename T> struct CT {
|
||||||
|
@ -5800,4 +5800,19 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
public void testSpecializationOfClassType_368610c() throws Exception {
|
public void testSpecializationOfClassType_368610c() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//struct A {
|
||||||
|
// int m(int i) const;
|
||||||
|
// void m() const;
|
||||||
|
//};
|
||||||
|
//
|
||||||
|
//template<typename T> struct B {
|
||||||
|
// typedef int (T::*Method)(int) const;
|
||||||
|
// B(Method p) {}
|
||||||
|
//};
|
||||||
|
//
|
||||||
|
//B<const A> a(&A::m);
|
||||||
|
public void testConstInTypeParameter_377223() throws Exception {
|
||||||
|
parseAndCheckBindings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2352,9 +2352,9 @@ public class CPPSemantics {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBinding resolveFunction(LookupData data, ICPPFunction[] fns, boolean allowUDC) throws DOMException {
|
public static IBinding resolveFunction(LookupData data, ICPPFunction[] fns, boolean allowUDC) throws DOMException {
|
||||||
fns= ArrayUtil.trim(ICPPFunction.class, fns);
|
if (fns == null || fns.length == 0 || fns[0] == null)
|
||||||
if (fns == null || fns.length == 0)
|
|
||||||
return null;
|
return null;
|
||||||
|
fns= ArrayUtil.trim(fns);
|
||||||
|
|
||||||
sortAstBeforeIndex(fns);
|
sortAstBeforeIndex(fns);
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
||||||
import org.eclipse.cdt.core.dom.ast.IFunction;
|
import org.eclipse.cdt.core.dom.ast.IFunction;
|
||||||
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
import org.eclipse.cdt.core.dom.ast.IFunctionType;
|
||||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IQualifierType;
|
||||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||||
import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
|
import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
|
@ -1190,6 +1191,9 @@ public class CPPTemplates {
|
||||||
ICPPPointerToMemberType ptm = (ICPPPointerToMemberType) typeContainer;
|
ICPPPointerToMemberType ptm = (ICPPPointerToMemberType) typeContainer;
|
||||||
IType memberOfClass = ptm.getMemberOfClass();
|
IType memberOfClass = ptm.getMemberOfClass();
|
||||||
IType newMemberOfClass = instantiateType(memberOfClass, tpMap, packOffset, within);
|
IType newMemberOfClass = instantiateType(memberOfClass, tpMap, packOffset, within);
|
||||||
|
if (newMemberOfClass instanceof IQualifierType) {
|
||||||
|
newMemberOfClass = ((IQualifierType) newMemberOfClass).getType();
|
||||||
|
}
|
||||||
if (!(newMemberOfClass instanceof ICPPClassType || newMemberOfClass instanceof UniqueType
|
if (!(newMemberOfClass instanceof ICPPClassType || newMemberOfClass instanceof UniqueType
|
||||||
|| newMemberOfClass instanceof ICPPUnknownBinding)) {
|
|| newMemberOfClass instanceof ICPPUnknownBinding)) {
|
||||||
return new ProblemType(ISemanticProblem.BINDING_INVALID_TYPE);
|
return new ProblemType(ISemanticProblem.BINDING_INVALID_TYPE);
|
||||||
|
|
|
@ -918,7 +918,7 @@ outer:
|
||||||
for (IErrorParser[] parsers : fErrorParsers.values()) {
|
for (IErrorParser[] parsers : fErrorParsers.values()) {
|
||||||
for (IErrorParser parser : parsers) {
|
for (IErrorParser parser : parsers) {
|
||||||
if (parser instanceof IErrorParser3) {
|
if (parser instanceof IErrorParser3) {
|
||||||
((IErrorParser3) parser).streamFinished();
|
((IErrorParser3) parser).shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM - Initial API and implementation
|
* IBM - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core;
|
package org.eclipse.cdt.core;
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ public interface IConsoleParser {
|
||||||
public boolean processLine(String line);
|
public boolean processLine(String line);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finalization of a console parser when the stream is closed.
|
* Called to let the parser know that the end of the error stream has been reached.
|
||||||
|
* Can be used by the parser to flush its internal buffers.
|
||||||
*/
|
*/
|
||||||
public void shutdown();
|
public void shutdown();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,8 @@ package org.eclipse.cdt.core;
|
||||||
*/
|
*/
|
||||||
public interface IErrorParser3 extends IErrorParser2 {
|
public interface IErrorParser3 extends IErrorParser2 {
|
||||||
/**
|
/**
|
||||||
* Notification that the stream of data to parse has ended.
|
* Called to let the parser know that the end of the error stream has been reached.
|
||||||
|
* Can be used by the parser to flush its internal buffers.
|
||||||
*/
|
*/
|
||||||
void streamFinished();
|
void shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2009, 2011 Andrew Gvozdev (Quoin Inc.) and others.
|
* Copyright (c) 2009, 2012 Andrew Gvozdev (Quoin Inc.) and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,8 +7,8 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Gvozdev (Quoin Inc.) - initial API and implementation
|
* Andrew Gvozdev (Quoin Inc.) - initial API and implementation
|
||||||
|
* Alex Ruiz (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.errorparsers;
|
package org.eclipse.cdt.internal.errorparsers;
|
||||||
|
|
||||||
import static org.eclipse.cdt.core.ErrorParserContext.BUILD;
|
import static org.eclipse.cdt.core.ErrorParserContext.BUILD;
|
||||||
|
@ -25,8 +25,8 @@ import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.ErrorParserManager;
|
|
||||||
import org.eclipse.cdt.core.ErrorParserContext;
|
import org.eclipse.cdt.core.ErrorParserContext;
|
||||||
|
import org.eclipse.cdt.core.ErrorParserManager;
|
||||||
import org.eclipse.cdt.core.IErrorParser;
|
import org.eclipse.cdt.core.IErrorParser;
|
||||||
import org.eclipse.cdt.core.IErrorParserNamed;
|
import org.eclipse.cdt.core.IErrorParserNamed;
|
||||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||||
|
@ -52,8 +52,7 @@ import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ErrorParserExtensionManager manages error parser extensions, serialization and preferences
|
* ErrorParserExtensionManager manages error parser extensions, serialization and preferences.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ErrorParserExtensionManager {
|
public class ErrorParserExtensionManager {
|
||||||
private static final String STORAGE_ERRORPARSER_EXTENSIONS = "model.extensions.xml"; //$NON-NLS-1$
|
private static final String STORAGE_ERRORPARSER_EXTENSIONS = "model.extensions.xml"; //$NON-NLS-1$
|
||||||
|
@ -396,7 +395,7 @@ public class ErrorParserExtensionManager {
|
||||||
|
|
||||||
IErrorParser errorParser = errorParserNamed;
|
IErrorParser errorParser = errorParserNamed;
|
||||||
if (errorParser instanceof ErrorParserNamedWrapper)
|
if (errorParser instanceof ErrorParserNamedWrapper)
|
||||||
errorParser = ((ErrorParserNamedWrapper)errorParser).getErrorParser();
|
errorParser = ((ErrorParserNamedWrapper) errorParser).getErrorParser();
|
||||||
|
|
||||||
// <extension/>
|
// <extension/>
|
||||||
Element elementExtension = XmlUtil.appendElement(elementPlugin, ELEM_EXTENSION, new String[] {
|
Element elementExtension = XmlUtil.appendElement(elementPlugin, ELEM_EXTENSION, new String[] {
|
||||||
|
@ -413,7 +412,7 @@ public class ErrorParserExtensionManager {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (errorParserNamed instanceof RegexErrorParser) {
|
if (errorParserNamed instanceof RegexErrorParser) {
|
||||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParserNamed;
|
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParserNamed;
|
||||||
RegexErrorPattern[] patterns = regexErrorParser.getPatterns();
|
RegexErrorPattern[] patterns = regexErrorParser.getPatterns();
|
||||||
|
|
||||||
for (RegexErrorPattern pattern : patterns) {
|
for (RegexErrorPattern pattern : patterns) {
|
||||||
|
@ -521,7 +520,7 @@ public class ErrorParserExtensionManager {
|
||||||
if (ce.getAttribute(ATTR_CLASS)!=null) {
|
if (ce.getAttribute(ATTR_CLASS)!=null) {
|
||||||
IErrorParser ep = (IErrorParser)ce.createExecutableExtension(ATTR_CLASS);
|
IErrorParser ep = (IErrorParser)ce.createExecutableExtension(ATTR_CLASS);
|
||||||
if (ep instanceof IErrorParserNamed) {
|
if (ep instanceof IErrorParserNamed) {
|
||||||
errorParser = (IErrorParserNamed)ep;
|
errorParser = (IErrorParserNamed) ep;
|
||||||
errorParser.setId(initialId);
|
errorParser.setId(initialId);
|
||||||
errorParser.setName(initialName);
|
errorParser.setName(initialName);
|
||||||
} else if (ep!=null) {
|
} else if (ep!=null) {
|
||||||
|
@ -546,7 +545,7 @@ public class ErrorParserExtensionManager {
|
||||||
errorParser.setId(id);
|
errorParser.setId(id);
|
||||||
errorParser.setName(name);
|
errorParser.setName(name);
|
||||||
if (errorParser instanceof RegexErrorParser) {
|
if (errorParser instanceof RegexErrorParser) {
|
||||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParser;
|
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParser;
|
||||||
|
|
||||||
NodeList patternNodes = errorparserNode.getChildNodes();
|
NodeList patternNodes = errorparserNode.getChildNodes();
|
||||||
for (int ipat=0;ipat<patternNodes.getLength();ipat++) {
|
for (int ipat=0;ipat<patternNodes.getLength();ipat++) {
|
||||||
|
@ -587,7 +586,7 @@ public class ErrorParserExtensionManager {
|
||||||
errorParser.setName(name);
|
errorParser.setName(name);
|
||||||
|
|
||||||
if (errorParser instanceof RegexErrorParser) {
|
if (errorParser instanceof RegexErrorParser) {
|
||||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParser;
|
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParser;
|
||||||
|
|
||||||
for (IConfigurationElement cepat : cfgEl.getChildren()) {
|
for (IConfigurationElement cepat : cfgEl.getChildren()) {
|
||||||
if (cepat.getName().equals(ELEM_PATTERN)) {
|
if (cepat.getName().equals(ELEM_PATTERN)) {
|
||||||
|
@ -643,7 +642,7 @@ public class ErrorParserExtensionManager {
|
||||||
Pair<IErrorParserNamed, Integer> pair = fAvailableErrorParsers.get(id);
|
Pair<IErrorParserNamed, Integer> pair = fAvailableErrorParsers.get(id);
|
||||||
IErrorParserNamed errorParser = pair.first;
|
IErrorParserNamed errorParser = pair.first;
|
||||||
if (errorParser instanceof ErrorParserNamedWrapper)
|
if (errorParser instanceof ErrorParserNamedWrapper)
|
||||||
return ((ErrorParserNamedWrapper)errorParser).getErrorParser();
|
return ((ErrorParserNamedWrapper) errorParser).getErrorParser();
|
||||||
return errorParser;
|
return errorParser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,10 +747,10 @@ public class ErrorParserExtensionManager {
|
||||||
* @return default error parsers IDs to be used if error parser list is empty.
|
* @return default error parsers IDs to be used if error parser list is empty.
|
||||||
*/
|
*/
|
||||||
public static String[] getDefaultErrorParserIds() {
|
public static String[] getDefaultErrorParserIds() {
|
||||||
if (fDefaultErrorParserIds==null) {
|
if (fDefaultErrorParserIds == null) {
|
||||||
return fAvailableErrorParsers.keySet().toArray(new String[0]);
|
return getErrorParserIds(fAvailableErrorParsers, BUILD);
|
||||||
}
|
}
|
||||||
return fDefaultErrorParserIds.toArray(new String[0]);
|
return fDefaultErrorParserIds.toArray(new String[fDefaultErrorParserIds.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -777,15 +776,15 @@ public class ErrorParserExtensionManager {
|
||||||
int context) {
|
int context) {
|
||||||
Pair<IErrorParserNamed, Integer> pair =
|
Pair<IErrorParserNamed, Integer> pair =
|
||||||
isExtension ? fExtensionErrorParsers.get(id) : fAvailableErrorParsers.get(id);
|
isExtension ? fExtensionErrorParsers.get(id) : fAvailableErrorParsers.get(id);
|
||||||
if (!isInContext(pair, context)) {
|
if (pair == null || !isInContext(pair, context)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
IErrorParserNamed errorParser = pair.first;
|
IErrorParserNamed errorParser = pair.first;
|
||||||
try {
|
try {
|
||||||
if (errorParser instanceof RegexErrorParser) {
|
if (errorParser instanceof RegexErrorParser) {
|
||||||
return (RegexErrorParser) ((RegexErrorParser)errorParser).clone();
|
return (RegexErrorParser) ((RegexErrorParser) errorParser).clone();
|
||||||
} else if (errorParser instanceof ErrorParserNamedWrapper) {
|
} else if (errorParser instanceof ErrorParserNamedWrapper) {
|
||||||
return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper)errorParser).clone();
|
return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper) errorParser).clone();
|
||||||
}
|
}
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
|
|
|
@ -96,61 +96,43 @@ public class CReconciler extends MonoReconciler {
|
||||||
public boolean isConflicting(ISchedulingRule rule) {
|
public boolean isConflicting(ISchedulingRule rule) {
|
||||||
return rule == this;
|
return rule == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal part listener for activating the reconciler.
|
* Internal part listener for activating the reconciler.
|
||||||
*/
|
*/
|
||||||
private class PartListener implements IPartListener2 {
|
private class PartListener implements IPartListener2 {
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partActivated(IWorkbenchPartReference partRef) {
|
public void partActivated(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partBroughtToTop(IWorkbenchPartReference partRef) {
|
public void partBroughtToTop(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partClosed(IWorkbenchPartReference partRef) {
|
public void partClosed(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partDeactivated(IWorkbenchPartReference partRef) {
|
public void partDeactivated(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partHidden(IWorkbenchPartReference partRef) {
|
public void partHidden(IWorkbenchPartReference partRef) {
|
||||||
if (partRef.getPart(false) == fTextEditor) {
|
if (partRef.getPart(false) == fTextEditor) {
|
||||||
setEditorActive(false);
|
setEditorActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partInputChanged(IWorkbenchPartReference partRef) {
|
public void partInputChanged(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partOpened(IWorkbenchPartReference partRef) {
|
public void partOpened(IWorkbenchPartReference partRef) {
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void partVisible(IWorkbenchPartReference partRef) {
|
public void partVisible(IWorkbenchPartReference partRef) {
|
||||||
if (partRef.getPart(false) == fTextEditor) {
|
if (partRef.getPart(false) == fTextEditor) {
|
||||||
|
@ -164,7 +146,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
* Internal Shell activation listener for activating the reconciler.
|
* Internal Shell activation listener for activating the reconciler.
|
||||||
*/
|
*/
|
||||||
private class ActivationListener extends ShellAdapter {
|
private class ActivationListener extends ShellAdapter {
|
||||||
|
|
||||||
private Control fControl;
|
private Control fControl;
|
||||||
|
|
||||||
public ActivationListener(Control control) {
|
public ActivationListener(Control control) {
|
||||||
|
@ -172,9 +153,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
fControl= control;
|
fControl= control;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.swt.events.ShellListener#shellActivated(org.eclipse.swt.events.ShellEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void shellActivated(ShellEvent e) {
|
public void shellActivated(ShellEvent e) {
|
||||||
if (!fControl.isDisposed() && fControl.isVisible()) {
|
if (!fControl.isDisposed() && fControl.isVisible()) {
|
||||||
|
@ -184,9 +162,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.swt.events.ShellListener#shellDeactivated(org.eclipse.swt.events.ShellEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void shellDeactivated(ShellEvent e) {
|
public void shellDeactivated(ShellEvent e) {
|
||||||
if (!fControl.isDisposed() && fControl.getShell() == e.getSource()) {
|
if (!fControl.isDisposed() && fControl.getShell() == e.getSource()) {
|
||||||
|
@ -199,9 +174,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
* Internal C element changed listener
|
* Internal C element changed listener
|
||||||
*/
|
*/
|
||||||
private class ElementChangedListener implements IElementChangedListener {
|
private class ElementChangedListener implements IElementChangedListener {
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.model.IElementChangedListener#elementChanged(org.eclipse.cdt.core.model.ElementChangedEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void elementChanged(ElementChangedEvent event) {
|
public void elementChanged(ElementChangedEvent event) {
|
||||||
if (event.getType() == ElementChangedEvent.POST_CHANGE) {
|
if (event.getType() == ElementChangedEvent.POST_CHANGE) {
|
||||||
|
@ -246,9 +218,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
private class IndexerListener implements IIndexerStateListener, IIndexChangeListener {
|
private class IndexerListener implements IIndexerStateListener, IIndexChangeListener {
|
||||||
private boolean fIndexChanged;
|
private boolean fIndexChanged;
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.index.IIndexerStateListener#indexChanged(org.eclipse.cdt.core.index.IIndexerStateEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void indexChanged(IIndexerStateEvent event) {
|
public void indexChanged(IIndexerStateEvent event) {
|
||||||
if (event.indexerIsIdle()) {
|
if (event.indexerIsIdle()) {
|
||||||
|
@ -263,9 +232,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.index.IIndexChangeListener#indexChanged(org.eclipse.cdt.core.index.IIndexChangeEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void indexChanged(IIndexChangeEvent event) {
|
public void indexChanged(IIndexChangeEvent event) {
|
||||||
if (!fIndexChanged && isRelevantProject(event.getAffectedProject())) {
|
if (!fIndexChanged && isRelevantProject(event.getAffectedProject())) {
|
||||||
|
@ -305,9 +271,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
fTextEditor= editor;
|
fTextEditor= editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.IReconciler#install(org.eclipse.jface.text.ITextViewer)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void install(ITextViewer textViewer) {
|
public void install(ITextViewer textViewer) {
|
||||||
super.install(textViewer);
|
super.install(textViewer);
|
||||||
|
@ -335,9 +298,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.IReconciler#uninstall()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void uninstall() {
|
public void uninstall() {
|
||||||
fTriggerReconcilerJob.cancel();
|
fTriggerReconcilerJob.cancel();
|
||||||
|
@ -369,9 +329,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.AbstractReconciler#forceReconciling()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void forceReconciling() {
|
protected void forceReconciling() {
|
||||||
if (!fInitialProcessDone)
|
if (!fInitialProcessDone)
|
||||||
|
@ -379,18 +336,12 @@ public class CReconciler extends MonoReconciler {
|
||||||
super.forceReconciling();
|
super.forceReconciling();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.AbstractReconciler#aboutToBeReconciled()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void aboutToBeReconciled() {
|
protected void aboutToBeReconciled() {
|
||||||
CCompositeReconcilingStrategy strategy= (CCompositeReconcilingStrategy)getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
|
CCompositeReconcilingStrategy strategy= (CCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
|
||||||
strategy.aboutToBeReconciled();
|
strategy.aboutToBeReconciled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.MonoReconciler#initialProcess()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void initialProcess() {
|
protected void initialProcess() {
|
||||||
super.initialProcess();
|
super.initialProcess();
|
||||||
|
@ -400,9 +351,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.reconciler.MonoReconciler#process(org.eclipse.jface.text.reconciler.DirtyRegion)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void process(DirtyRegion dirtyRegion) {
|
protected void process(DirtyRegion dirtyRegion) {
|
||||||
fIsReconciling= true;
|
fIsReconciling= true;
|
||||||
|
@ -469,7 +417,6 @@ public class CReconciler extends MonoReconciler {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean isRelevantProject(ICProject affectedProject) {
|
private boolean isRelevantProject(ICProject affectedProject) {
|
||||||
if (affectedProject == null) {
|
if (affectedProject == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -499,5 +446,4 @@ public class CReconciler extends MonoReconciler {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2011 Ericsson and others.
|
* Copyright (c) 2008, 2012 Ericsson and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
* Ericsson - initial API and implementation
|
* Ericsson - initial API and implementation
|
||||||
* Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306)
|
* Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306)
|
||||||
* John Dallaway - GDB 7.x MI thread details field ignored (Bug 325556)
|
* John Dallaway - GDB 7.x MI thread details field ignored (Bug 325556)
|
||||||
|
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.gdb.service;
|
package org.eclipse.cdt.dsf.gdb.service;
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
*/
|
*/
|
||||||
@Immutable
|
@Immutable
|
||||||
private static class MIExecutionDMC extends AbstractDMContext
|
private static class MIExecutionDMC extends AbstractDMContext
|
||||||
implements IMIExecutionDMContext
|
implements IMIExecutionDMContext, IDisassemblyDMContext
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* String ID that is used to identify the thread in the GDB/MI protocol.
|
* String ID that is used to identify the thread in the GDB/MI protocol.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2010 Ericsson and others.
|
* Copyright (c) 2008, 2012 Ericsson and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Ericsson - initial API and implementation
|
* Ericsson - initial API and implementation
|
||||||
|
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.mi.service;
|
package org.eclipse.cdt.dsf.mi.service;
|
||||||
|
|
||||||
|
@ -76,7 +77,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
*/
|
*/
|
||||||
@Immutable
|
@Immutable
|
||||||
private static class MIExecutionDMC extends AbstractDMContext
|
private static class MIExecutionDMC extends AbstractDMContext
|
||||||
implements IMIExecutionDMContext
|
implements IMIExecutionDMContext, IDisassemblyDMContext
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* String ID that is used to identify the thread in the GDB/MI protocol.
|
* String ID that is used to identify the thread in the GDB/MI protocol.
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* Ericsson AB - Modified for handling of multiple threads
|
* Ericsson AB - Modified for handling of multiple threads
|
||||||
* Vladimir Prus (Mentor Graphics) - Add proper stop reason for step return (Bug 362274)
|
* Vladimir Prus (Mentor Graphics) - Add proper stop reason for step return (Bug 362274)
|
||||||
* Indel AG - [369622] fixed moveToLine using MinGW
|
* Indel AG - [369622] fixed moveToLine using MinGW
|
||||||
|
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.mi.service;
|
package org.eclipse.cdt.dsf.mi.service;
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IBreakpointsExtension.IBreakpointHitDMEvent;
|
import org.eclipse.cdt.dsf.debug.service.IBreakpointsExtension.IBreakpointHitDMEvent;
|
||||||
import org.eclipse.cdt.dsf.debug.service.ICachingService;
|
import org.eclipse.cdt.dsf.debug.service.ICachingService;
|
||||||
|
import org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.command.BufferedCommandControl;
|
import org.eclipse.cdt.dsf.debug.service.command.BufferedCommandControl;
|
||||||
|
@ -93,7 +95,7 @@ import org.osgi.framework.BundleContext;
|
||||||
*/
|
*/
|
||||||
public class MIRunControl extends AbstractDsfService implements IMIRunControl, ICachingService
|
public class MIRunControl extends AbstractDsfService implements IMIRunControl, ICachingService
|
||||||
{
|
{
|
||||||
private static class MIExecutionDMC extends AbstractDMContext implements IMIExecutionDMContext
|
private static class MIExecutionDMC extends AbstractDMContext implements IMIExecutionDMContext, IDisassemblyDMContext
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Integer ID that is used to identify the thread in the GDB/MI protocol.
|
* Integer ID that is used to identify the thread in the GDB/MI protocol.
|
||||||
|
|
Loading…
Add table
Reference in a new issue