Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-01-09 15:24:24 +0000
committerDani Megert2012-01-09 15:24:24 +0000
commit489c7638f26995c7d30a71353874443e6a7febb9 (patch)
tree6184e7987731d085e56978876ef3ad5099569b88
parent3abcc6a1710bfea19defbb0f6cbd9845c5fae14d (diff)
downloadeclipse.platform.text-489c7638f26995c7d30a71353874443e6a7febb9.tar.gz
eclipse.platform.text-489c7638f26995c7d30a71353874443e6a7febb9.tar.xz
eclipse.platform.text-489c7638f26995c7d30a71353874443e6a7febb9.zip
Fixed bug 339331: [templates view] Preview area is not refreshed afterv20120109-1524
template editing
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
index 571ec97f4..a041f17c5 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Dakshinamurthy Karra, IBM Corporation and others.
+ * Copyright (c) 2007, 2012 Dakshinamurthy Karra, IBM Corporation 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
@@ -1333,7 +1333,8 @@ public abstract class AbstractTemplatesPage extends Page implements ITemplatesPa
* Edits the selected template.
*/
private void editTemplate() {
- Template oldTemplate= getSelectedTemplates()[0].getTemplate();
+ TemplatePersistenceData selectedTemplate= getSelectedTemplates()[0];
+ Template oldTemplate= selectedTemplate.getTemplate();
Template newTemplate= editTemplate(new Template(oldTemplate), true, true);
if (newTemplate != null) {
if (!newTemplate.getName().equals(oldTemplate.getName())
@@ -1346,7 +1347,8 @@ public abstract class AbstractTemplatesPage extends Page implements ITemplatesPa
refresh();
fTreeViewer.setSelection(new StructuredSelection(templateData), true);
} else {
- getSelectedTemplates()[0].setTemplate(newTemplate);
+ selectedTemplate.setTemplate(newTemplate);
+ updatePatternViewer(newTemplate);
}
}
saveTemplateStore();

Back to the top