mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 23:15:24 +02:00
Cosmetics.
This commit is contained in:
parent
d193756141
commit
c4b91212b3
1 changed files with 11 additions and 12 deletions
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,8 +7,8 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Andrew Gvozdev (Quoin Inc.) - initial API and implementation
|
||||
* Alex Ruiz (Google)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.errorparsers;
|
||||
|
||||
import static org.eclipse.cdt.core.ErrorParserContext.BUILD;
|
||||
|
@ -52,8 +52,7 @@ import org.w3c.dom.Node;
|
|||
import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* ErrorParserExtensionManager manages error parser extensions, serialization and preferences
|
||||
*
|
||||
* ErrorParserExtensionManager manages error parser extensions, serialization and preferences.
|
||||
*/
|
||||
public class ErrorParserExtensionManager {
|
||||
private static final String STORAGE_ERRORPARSER_EXTENSIONS = "model.extensions.xml"; //$NON-NLS-1$
|
||||
|
@ -396,7 +395,7 @@ public class ErrorParserExtensionManager {
|
|||
|
||||
IErrorParser errorParser = errorParserNamed;
|
||||
if (errorParser instanceof ErrorParserNamedWrapper)
|
||||
errorParser = ((ErrorParserNamedWrapper)errorParser).getErrorParser();
|
||||
errorParser = ((ErrorParserNamedWrapper) errorParser).getErrorParser();
|
||||
|
||||
// <extension/>
|
||||
Element elementExtension = XmlUtil.appendElement(elementPlugin, ELEM_EXTENSION, new String[] {
|
||||
|
@ -413,7 +412,7 @@ public class ErrorParserExtensionManager {
|
|||
});
|
||||
|
||||
if (errorParserNamed instanceof RegexErrorParser) {
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParserNamed;
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParserNamed;
|
||||
RegexErrorPattern[] patterns = regexErrorParser.getPatterns();
|
||||
|
||||
for (RegexErrorPattern pattern : patterns) {
|
||||
|
@ -521,7 +520,7 @@ public class ErrorParserExtensionManager {
|
|||
if (ce.getAttribute(ATTR_CLASS)!=null) {
|
||||
IErrorParser ep = (IErrorParser)ce.createExecutableExtension(ATTR_CLASS);
|
||||
if (ep instanceof IErrorParserNamed) {
|
||||
errorParser = (IErrorParserNamed)ep;
|
||||
errorParser = (IErrorParserNamed) ep;
|
||||
errorParser.setId(initialId);
|
||||
errorParser.setName(initialName);
|
||||
} else if (ep!=null) {
|
||||
|
@ -546,7 +545,7 @@ public class ErrorParserExtensionManager {
|
|||
errorParser.setId(id);
|
||||
errorParser.setName(name);
|
||||
if (errorParser instanceof RegexErrorParser) {
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParser;
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParser;
|
||||
|
||||
NodeList patternNodes = errorparserNode.getChildNodes();
|
||||
for (int ipat=0;ipat<patternNodes.getLength();ipat++) {
|
||||
|
@ -587,7 +586,7 @@ public class ErrorParserExtensionManager {
|
|||
errorParser.setName(name);
|
||||
|
||||
if (errorParser instanceof RegexErrorParser) {
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser)errorParser;
|
||||
RegexErrorParser regexErrorParser = (RegexErrorParser) errorParser;
|
||||
|
||||
for (IConfigurationElement cepat : cfgEl.getChildren()) {
|
||||
if (cepat.getName().equals(ELEM_PATTERN)) {
|
||||
|
@ -643,7 +642,7 @@ public class ErrorParserExtensionManager {
|
|||
Pair<IErrorParserNamed, Integer> pair = fAvailableErrorParsers.get(id);
|
||||
IErrorParserNamed errorParser = pair.first;
|
||||
if (errorParser instanceof ErrorParserNamedWrapper)
|
||||
return ((ErrorParserNamedWrapper)errorParser).getErrorParser();
|
||||
return ((ErrorParserNamedWrapper) errorParser).getErrorParser();
|
||||
return errorParser;
|
||||
}
|
||||
|
||||
|
@ -783,9 +782,9 @@ public class ErrorParserExtensionManager {
|
|||
IErrorParserNamed errorParser = pair.first;
|
||||
try {
|
||||
if (errorParser instanceof RegexErrorParser) {
|
||||
return (RegexErrorParser) ((RegexErrorParser)errorParser).clone();
|
||||
return (RegexErrorParser) ((RegexErrorParser) errorParser).clone();
|
||||
} else if (errorParser instanceof ErrorParserNamedWrapper) {
|
||||
return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper)errorParser).clone();
|
||||
return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper) errorParser).clone();
|
||||
}
|
||||
} catch (CloneNotSupportedException e) {
|
||||
CCorePlugin.log(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue