/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
if (file.canRead()) {
doc = db.parse(file);
if (!doc.getDocumentElement().getNodeName().equals(CUSTOM_TXT_TRACE_DEFINITION_ROOT_ELEMENT)) {
+ Activator.logError(String.format("Error saving CustomTxtTraceDefinition: path=%s is not a valid custom parser file", path)); //$NON-NLS-1$
return;
}
} else {
TmfTraceType.addCustomTraceType(CustomTxtTrace.class, categoryName, definitionName);
- } catch (ParserConfigurationException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerConfigurationException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerFactoryConfigurationError e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (TransformerException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (IOException e) {
- Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
- } catch (SAXException e) {
+ } catch (ParserConfigurationException | TransformerFactoryConfigurationError | TransformerException | IOException | SAXException e) {
Activator.logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$
}
}
/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
if (file.canRead()) {
doc = db.parse(file);
if (!doc.getDocumentElement().getNodeName().equals(CUSTOM_XML_TRACE_DEFINITION_ROOT_ELEMENT)) {
+ Activator.logError(String.format("Error saving CustomXmlTraceDefinition: path=%s is not a valid custom parser file", path)); //$NON-NLS-1$
return;
}
} else {
/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
+ * Copyright (c) 2012, 2016 Ericsson
* 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
public static String ManageCustomParsersDialog_ExportParserSelection;
public static String ManageCustomParsersDialog_ImportButtonLabel;
public static String ManageCustomParsersDialog_ImportParserSelection;
+ public static String ManageCustomParsersDialog_ImportFailureTitle;
+ public static String ManageCustomParsersDialog_ImportFailureMessage;
public static String ManageCustomParsersDialog_NewButtonLabel;
public static String ManageCustomParsersDialog_TextButtonLabel;
ManageCustomParsersDialog_ExportParserSelection=Select file to export {0}
ManageCustomParsersDialog_ImportButtonLabel=Import...
ManageCustomParsersDialog_ImportParserSelection=Select custom parser file to import
+ManageCustomParsersDialog_ImportFailureTitle=Import failure
+ManageCustomParsersDialog_ImportFailureMessage=Selected file did not contain any valid custom parser.
ManageCustomParsersDialog_NewButtonLabel=New...
ManageCustomParsersDialog_TextButtonLabel=Text