Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java')
-rw-r--r--org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java
index 9380bf87..6089bb37 100644
--- a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java
+++ b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/StylePropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 John Krasnay and others.
+ * Copyright (c) 2004, 2015 John Krasnay 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
@@ -8,14 +8,13 @@
* Contributors:
* John Krasnay - initial API and implementation
* Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
+ * Carsten Hiesserich - support for doctypes with no public id
*******************************************************************************/
package org.eclipse.vex.ui.internal.config;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Set;
-import java.util.TreeSet;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
@@ -160,7 +159,6 @@ public class StylePropertyPage extends PropertyPage {
}
private void populateDoctypes() {
- final Set<String> selectedDoctypes = new TreeSet<String>(style.getDocumentTypes());
doctypesTable.removeAll();
final DocumentType[] documentTypes = VexPlugin.getDefault().getConfigurationRegistry().getDocumentTypes();
@@ -168,7 +166,7 @@ public class StylePropertyPage extends PropertyPage {
for (final DocumentType documentType : documentTypes) {
final TableItem item = new TableItem(doctypesTable, SWT.NONE);
item.setText(documentType.getName());
- if (selectedDoctypes.contains(documentType.getPublicId())) {
+ if (style != null && style.appliesTo(documentType)) {
item.setChecked(true);
}
}
@@ -197,7 +195,7 @@ public class StylePropertyPage extends PropertyPage {
Arrays.sort(documentTypes);
for (final DocumentType documentType : documentTypes) {
if (selectedDoctypes.contains(documentType.getName())) {
- style.addDocumentType(documentType.getSimpleId());
+ style.addDocumentType(documentType.getMainId());
}
}

Back to the top