blob: a72b57982a88e423af88190f3e265a92131e3894 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2001, 2004 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
package org.eclipse.wst.dtd.ui.internal.registry;
import org.eclipse.wst.dtd.core.internal.modelhandler.ModelHandlerForDTD;
import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
import org.eclipse.wst.sse.ui.internal.util.Assert;
/**
* @author nitin
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class AdapterFactoryProviderForDTD implements AdapterFactoryProvider {
/**
*
*/
public AdapterFactoryProviderForDTD() {
super();
}
/*
* @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
*/
public void addAdapterFactories(IStructuredModel structuredModel) {
FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
}
public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
return (contentTypeDescription instanceof ModelHandlerForDTD);
}
public void reinitializeFactories(IStructuredModel structuredModel) {
// nothing to do, since no embedded type
}
}