nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright (c) 2004 IBM Corporation and others. All rights reserved. This |
| 3 | * program and the accompanying materials are made available under the terms |
| 4 | * of the Eclipse Public License v1.0 which accompanies this distribution, and |
| 5 | * is available at http://www.eclipse.org/legal/epl-v10.html |
| 6 | * |
| 7 | * Contributors: IBM Corporation - initial API and implementation |
| 8 | ****************************************************************************/ |
nitind | fb0ad6b | 2005-03-30 18:46:46 +0000 | [diff] [blame] | 9 | package org.eclipse.wst.css.ui.internal.contentoutline; |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 10 | |
david_williams | 4ad020f | 2005-04-18 08:00:30 +0000 | [diff] [blame] | 11 | import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter; |
| 12 | import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier; |
nitind | bca2663 | 2005-03-30 18:13:32 +0000 | [diff] [blame] | 13 | import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter; |
| 14 | import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeAdapterFactory; |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 15 | |
| 16 | public class JFaceNodeAdapterFactoryCSS extends JFaceNodeAdapterFactory { |
| 17 | public JFaceNodeAdapterFactoryCSS() { |
| 18 | this(IJFaceNodeAdapter.class, true); |
| 19 | } |
| 20 | |
| 21 | public JFaceNodeAdapterFactoryCSS(Object adapterKey, boolean registerAdapters) { |
| 22 | super(adapterKey, registerAdapters); |
| 23 | } |
| 24 | |
| 25 | |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 26 | protected INodeAdapter createAdapter(INodeNotifier node) { |
| 27 | if (singletonAdapter == null) { |
| 28 | // create the JFaceNodeAdapter |
| 29 | singletonAdapter = new CSSNodeAdapter(this); |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 30 | } |
| 31 | return singletonAdapter; |
| 32 | } |
| 33 | |
nitind | 958d79a | 2004-11-23 19:23:00 +0000 | [diff] [blame] | 34 | |
| 35 | } |