aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Rajotte Julien2014-06-05 09:40:12 (EDT)
committerPatrick Tasse2014-06-06 16:12:15 (EDT)
commitc21bfa59b35c5826a1dbde32a0f10a7ace5df312 (patch)
treeaf504280db6312f3934803e9cb2bcb735df47769
parent86a9c08a95a9aa2d0ec2be86a3e4d9455692a3f9 (diff)
downloadorg.eclipse.linuxtools-c21bfa59b35c5826a1dbde32a0f10a7ace5df312.zip
org.eclipse.linuxtools-c21bfa59b35c5826a1dbde32a0f10a7ace5df312.tar.gz
org.eclipse.linuxtools-c21bfa59b35c5826a1dbde32a0f10a7ace5df312.tar.bz2
[TMF] Bug: 436513 Custom Parser manager: renaming create a new parser and a parser is createdrefs/changes/77/28077/2
Change-Id: I5750bc051737233dc5aa1b1960df55dbe9f26457 Signed-off-by: Jonathan Rajotte Julien <jonathan.rajotte-julien@ericsson.com> Reviewed-on: https://git.eclipse.org/r/27884 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> Tested-by: Patrick Tasse <patrick.tasse@gmail.com> (cherry picked from commit d8757ff23eb659cc981f97ea319a1e1ca0b15960) Reviewed-on: https://git.eclipse.org/r/28077
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserWizard.java6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserWizard.java6
2 files changed, 8 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserWizard.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserWizard.java
index 355e9cf..aa96b22 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserWizard.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserWizard.java
@@ -30,6 +30,7 @@ public class CustomTxtParserWizard extends Wizard implements INewWizard {
CustomTxtParserOutputWizardPage outputPage;
private ISelection selection;
CustomTxtTraceDefinition definition;
+ String initialDefinitionName;
/**
* Default constructor
@@ -47,13 +48,14 @@ public class CustomTxtParserWizard extends Wizard implements INewWizard {
public CustomTxtParserWizard(CustomTxtTraceDefinition definition) {
super();
this.definition = definition;
+ this.initialDefinitionName = definition.definitionName;
}
@Override
public boolean performFinish() {
CustomTxtTraceDefinition def = outputPage.getDefinition();
- if (definition != null && !definition.definitionName.equals(def.definitionName)) {
- CustomTxtTraceDefinition.delete(definition.definitionName);
+ if (definition != null && !initialDefinitionName.equals(def.definitionName)) {
+ CustomTxtTraceDefinition.delete(initialDefinitionName);
}
def.save();
return true;
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserWizard.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserWizard.java
index 4e4c277..5d4bcb4 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserWizard.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserWizard.java
@@ -30,6 +30,7 @@ public class CustomXmlParserWizard extends Wizard implements INewWizard {
CustomXmlParserOutputWizardPage outputPage;
private ISelection selection;
CustomXmlTraceDefinition definition;
+ String initialDefinitionName;
/**
* Default constructor
@@ -47,13 +48,14 @@ public class CustomXmlParserWizard extends Wizard implements INewWizard {
public CustomXmlParserWizard(CustomXmlTraceDefinition definition) {
super();
this.definition = definition;
+ this.initialDefinitionName = definition.definitionName;
}
@Override
public boolean performFinish() {
CustomXmlTraceDefinition def = outputPage.getDefinition();
- if (definition != null && !definition.definitionName.equals(def.definitionName)) {
- CustomXmlTraceDefinition.delete(definition.definitionName);
+ if (definition != null && !initialDefinitionName.equals(def.definitionName)) {
+ CustomXmlTraceDefinition.delete(initialDefinitionName);
}
def.save();
return true;