import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.phpeditor.PHPEditorEnvironment;
import net.sourceforge.phpeclipse.phpeditor.PHPSourceViewerConfiguration;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
template.setContext(contextTypeName); //$NON-NLS-1$
EditTemplateDialog dialog = new EditTemplateDialog(getShell(), template, false);
- if (dialog.open() == dialog.OK) {
+ if (dialog.open() == EditTemplateDialog.OK) {
fTemplates.add(template);
fTableViewer.refresh();
fTableViewer.setChecked(template, template.isEnabled());
private void edit(Template template) {
Template newTemplate = new Template(template);
EditTemplateDialog dialog = new EditTemplateDialog(getShell(), newTemplate, true);
- if (dialog.open() == dialog.OK) {
+ if (dialog.open() == EditTemplateDialog.OK) {
if (!newTemplate.getName().equals(template.getName()) && MessageDialog.openQuestion(getShell(), TemplateMessages.getString("TemplatePreferencePage.question.create.new.title"), //$NON-NLS-1$
TemplateMessages.getString("TemplatePreferencePage.question.create.new.message"))) //$NON-NLS-1$