Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation')
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java44
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java119
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionFactory.java42
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java280
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java96
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupElement.java271
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupFactoryElement.java97
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java84
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java177
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java21
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java48
12 files changed, 0 insertions, 1307 deletions
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java
deleted file mode 100644
index 60b55eb58..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 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
- *******************************************************************************/
-/*
- * Created on Jan 16, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-/**
- * @author blancett
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public interface CommonUIPluginConstants {
- public static final String PLUGIN_ID = "org.eclipse.wst.common.frameworks.ui"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java
deleted file mode 100644
index b9f0cff3a..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 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
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageGroupHandler;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageHandler;
-
-/**
- * This interface is EXPERIMENTAL and is subject to substantial changes.
- */
-public abstract class DMWizardExtensionFactory {
-
- public DMWizardExtensionFactory() {
- super();
- }
-
- public abstract DataModelWizardPage[] createPageGroup(IDataModel dataModel, String pageGroupID);
-
- /*
- * this is optional
- */
- public IDMPageHandler createPageHandler(IDataModel dataModel, String pageGroupID)
- {
- return null;
- }
-
- /**
- * This page group handler can be optionally overriden.
- */
- public IDMPageGroupHandler createPageGroupHandler( IDataModel dataModel, String pageGroupID )
- {
- return null;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java
deleted file mode 100644
index 7070cafc9..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor;
-import org.eclipse.wst.common.frameworks.internal.enablement.Identifiable;
-
-/**
- * This class provides convenient methods for accessing the semantics of the
- * given <code>IConfigurationElement</code> in the context of the the
- * <cite>wizardPage</cite> element of the <cite>wizardPageGroup</cite>
- * extension point.
- *
- * @author kraev
- */
-public class DMWizardPageElement extends AbstractRegistryDescriptor {
-
- /**
- * The name of the attribute that points to the wizard, which pages are
- * extended by the current contribution.
- */
- public static final String ATT_WIZARD_ID = "wizardID"; //$NON-NLS-1$
-
- /**
- * The name of the element that contains the factory class name, where is
- * the Java code that contributes the new controls to the wizard pages.
- */
- public static final String ELEMENT_FACTORY = "factory"; //$NON-NLS-1$
-
- protected String wizardID;
- protected DMWizardPageFactoryElement factoryElement;
-
- private int loadOrder;
- private static int loadOrderCounter;
-
- /**
- * Constructs a new <code>DMWizardPageElement</code> from the given
- * <code>IConfigurationElement</code>.
- *
- * @param element -
- * the <code>IConfigurationElement</code> to wrap.
- */
- public DMWizardPageElement(IConfigurationElement element) {
- super(element);
-
- wizardID = element.getAttribute(ATT_WIZARD_ID);
- readFactory(element);
-
- loadOrder = loadOrderCounter++;
- }
-
- /**
- * @see Identifiable#getID()
- */
- public String getID() {
- String id = wizardID;
- if (factoryElement != null) {
- id = id + "@" + factoryElement.className;
- }
- return id;
- }
-
- /**
- * @see Identifiable#getLoadOrder()
- */
- public int getLoadOrder() {
- return loadOrder;
- }
-
- /**
- * Returns the ID of the wizard which pages the current extension will
- * contribute to.
- *
- * @return a String representation of the wizard ID.
- */
- public String getWizardID() {
- return wizardID;
- }
-
- /**
- * Create additional controls for the specified wizard page.
- *
- * <p>
- * The current extension contributes additional controls to the specified
- * parent composite that is part of the wizard page.
- * </p>
- *
- * @param parent -
- * the parent composite where the additional controls will be
- * added to.
- * @param model -
- * the data model of the wizard.
- * @param pageName -
- * the name of the extended wizard page.
- */
- public void createAdditionalControls(Composite parent, IDataModel model, String pageName) {
- if (factoryElement != null)
- factoryElement.createAdditionalControls(parent, model, pageName);
- }
-
- private void readFactory(IConfigurationElement element) {
- IConfigurationElement[] factories = element.getChildren(ELEMENT_FACTORY);
- if (factories != null && factories.length > 0) {
- factoryElement = new DMWizardPageFactoryElement(factories[0]);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionFactory.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionFactory.java
deleted file mode 100644
index 5b2d5fd75..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * An abstract class where the actual extending of the wizard pages happen.
- *
- * <p>
- * Implementation of this abstract class should be registered in the
- * <cite>org.eclipse.wst.common.frameworks.ui.wizardPageGruop</cite> extension
- * point > <cite>wizardPage</cite> > <cite>factory</cite> > <cite>className</cite>.
- * </p>
- *
- * @author kraev
- */
-public abstract class DMWizardPageExtensionFactory {
-
- /**
- * Create additional controls for the specified wizard page.
- *
- * @param parent -
- * the parent composite where the additional controls will be
- * added to.
- * @param model -
- * the data model of the wizard.
- * @param pageName -
- * the name of the extended wizard page.
- */
- public abstract void createAdditionalControls(Composite parent, IDataModel model, String pageName);
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java
deleted file mode 100644
index 70f90aed7..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Kaloyan Raev, kaloyan.raev@sap.com - bug 213927
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.internal.enablement.EnablementManager;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPCommonUIResourceHandler;
-
-public class DMWizardPageExtensionManager {
-
- public static final String ORG_ECLIPSE_UI = "org.eclipse.ui"; //$NON-NLS-1$
-
- protected static DMWizardPageExtensionManager instance = null;
-
- HashMap wizardPluginIDMap = null;
-
- TreeMap wizardPageElements = null;
-
- // private TreeSet wizardExtPageElements = null;
- List nonSyncedPageElementList = null;
-
- private WizardPageExtensionReader reader = null;
-
- private DMWizardPageExtensionManager() {
- setupWizardPluginIDMap();
- readFromRegistry();
- postReadFromRegistry();
- }
-
- private void setupWizardPluginIDMap() {
- wizardPluginIDMap = new HashMap();
- // get editor plugin and save it to a hash map
- // Note: editors extension id is different from editor id
-
- IExtensionPoint[] point = new IExtensionPoint[]{Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "exportWizards"), //$NON-NLS-1$
- Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "importWizards"), //$NON-NLS-1$
- Platform.getExtensionRegistry().getExtensionPoint(ORG_ECLIPSE_UI, "newWizards"), //$NON-NLS-1$
- Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.wst.common.frameworks.ui", "extendableWizard")}; //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int x = 0; x < point.length; x++) {
- IConfigurationElement[] elements = point[x].getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- String wizardID = elements[i].getAttribute("id"); //$NON-NLS-1$
- String pluginID = elements[i].getDeclaringExtension().getNamespace();
- wizardPluginIDMap.put(wizardID, pluginID);
- }
- }
- }
-
- private void readFromRegistry() {
- wizardPageElements = new TreeMap();
- // wizardExtPageElements = new TreeSet();
- nonSyncedPageElementList = new ArrayList();
- // Read all page extensions into editorPageElements
- reader = new WizardPageExtensionReader();
- reader.readRegistry();
-
- }
-
- protected class WizardPageExtensionReader extends RegistryReader {
-
- public WizardPageExtensionReader() {
- super(CommonUIPluginConstants.PLUGIN_ID, DMWizardPageGroupElement.ELEMENT_PAGE_GROUP);
- }
-
- public boolean readElement(IConfigurationElement element) {
- if (!DMWizardPageGroupElement.ELEMENT_PAGE_GROUP.equals(element.getName()))
- return false;
- DMWizardPageGroupElement newElement = new DMWizardPageGroupElement(element);
-
- // put the element into a hashmap, wizardID as key,
- // list of page elements as object
- String wizardID = newElement.getWizardID();
- if (!wizardPageElements.containsKey(wizardID)) {
- wizardPageElements.put(wizardID, createPageMapEntry(newElement));
- } else {
- TreeMap pageMap = (TreeMap) wizardPageElements.get(wizardID);
- insertPageElement(pageMap, newElement);
- }
-
- return true;
- }
-
- public void insertPageElement(TreeMap pageMap, DMWizardPageGroupElement newElement) {
- if (newElement.pageInsertionID == null) {
- pageMap.put(newElement, new TreeSet());
- } else {
- String elementName = newElement.pageInsertionID;
- DMWizardPageGroupElement parentElement = getPageElement(elementName, pageMap);
- insertExtPageElement(pageMap, parentElement, newElement);
- }
-
- newElement.getPageInsertionID();
-
- }
-
- private void insertExtPageElement(TreeMap pageMap, DMWizardPageGroupElement parentElement, DMWizardPageGroupElement newElement) {
- if (parentElement == null) {
- nonSyncedPageElementList.add(newElement);
- return;
- }
- if (!parentElement.allowsExtendedPagesAfter()) {
- Logger.getLogger().logError(WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WizardPageExtensionManager_UI_0, new Object[]{parentElement.getPageID()}));
- Logger.getLogger().logError(WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WizardPageExtensionManager_UI_1, new Object[]{newElement.getPageID()}));
- return;
- }
- TreeSet set = (TreeSet) pageMap.get(parentElement);
- set.add(newElement);
-
- if (newElement.allowsExtendedPagesAfter)
- pageMap.put(newElement, new TreeSet());
-
- if (nonSyncedPageElementList.contains(newElement))
- nonSyncedPageElementList.remove(newElement);
- }
-
- private DMWizardPageGroupElement getPageElement(String elementName, TreeMap map) {
- Set keySet = map.keySet();
- for (Iterator iter = keySet.iterator(); iter.hasNext();) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) iter.next();
- if (element.getPageID().equals(elementName))
- return element;
- }
- return null;
-
- }
-
- private TreeMap createPageMapEntry(DMWizardPageGroupElement newElement) {
- TreeMap pageMap = new TreeMap();
- TreeSet pageExtensionSet = new TreeSet();
- pageMap.put(newElement, pageExtensionSet);
- return pageMap;
-
- }
-
- }
-
- public boolean hasExtensionElements(String wizardID) {
- TreeMap treeMap = (TreeMap) wizardPageElements.get(wizardID);
- return treeMap.isEmpty();
- }
-
- public DMWizardPageGroupElement[] getPageElements(String wizardID) {
- TreeMap elementMap = (TreeMap) wizardPageElements.get(wizardID);
- if (elementMap == null || elementMap.isEmpty()) {
- return new DMWizardPageGroupElement[0];
- }
- ArrayList alreadyVistedList = new ArrayList(elementMap.size());
- Set allPageElementsList = elementMap.keySet();
- ArrayList orderedPageList = new ArrayList(elementMap.size());
-
- for (Iterator iter = allPageElementsList.iterator(); iter.hasNext();) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) iter.next();
- if (alreadyVistedList.contains(element))
- continue;
- if (EnablementManager.INSTANCE.getIdentifier(element.getID(), null).isEnabled()) {
- orderedPageList.add(element);
- TreeSet treeSet = (TreeSet) elementMap.get(element);
- if (treeSet != null && !treeSet.isEmpty())
- flatenTreeSet(treeSet, allPageElementsList, alreadyVistedList, orderedPageList, elementMap);
- }
- }
- return getPageArray(orderedPageList);
-
- }
-
- private DMWizardPageGroupElement[] getPageArray(ArrayList orderedPageList) {
- DMWizardPageGroupElement[] pageElements = new DMWizardPageGroupElement[orderedPageList.size()];
- for (int i = 0; i < orderedPageList.size(); i++) {
- pageElements[i] = (DMWizardPageGroupElement) orderedPageList.get(i);
- }
- return pageElements;
- }
-
- private void flatenTreeSet(TreeSet treeSet, Set allPageElementsList, ArrayList alreadyVistedList, ArrayList orderedPageList, TreeMap elementMap) {
- for (Iterator iter = treeSet.iterator(); iter.hasNext();) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) iter.next();
- if (alreadyVistedList.contains(element)) {
- Logger.getLogger().logError(WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WizardPageExtensionManager_UI_2, new Object[]{element.getPageID(), DMWizardPageGroupElement.ATT_PAGE_INSERTION_ID}));
- return;
- }
- if (allPageElementsList.contains(element)) {
- TreeSet set = (TreeSet) elementMap.get(element);
- orderedPageList.add(element);
- alreadyVistedList.add(element);
- flatenTreeSet(set, allPageElementsList, alreadyVistedList, orderedPageList, elementMap);
- } else {
- orderedPageList.add(element);
- alreadyVistedList.add(element);
- }
-
- }
-
- }
-
- // if child elements are read in before parent element. Do post read.
- protected ArrayList listRemoveObjects;
-
- private void postReadFromRegistry() {
- listRemoveObjects = new ArrayList(nonSyncedPageElementList.size());
- for (int i = 0; i < nonSyncedPageElementList.size(); i++) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) nonSyncedPageElementList.get(i);
- TreeMap pageMap = (TreeMap) wizardPageElements.get(element.wizardID);
- if (element.pageInsertionID == null) {
- addToFirstAvialiable(pageMap, element);
- } else if (reader != null && pageMap != null)
- reader.insertPageElement(pageMap, element);
- }
- nonSyncedPageElementList.removeAll(listRemoveObjects);
- if (!nonSyncedPageElementList.isEmpty())
- logMissingClassError();
- nonSyncedPageElementList.clear();
-
- }
-
- /**
- * @param pageMap
- * @param element
- */
- private void addToFirstAvialiable(TreeMap pageMap, DMWizardPageGroupElement newElement) {
- boolean insertNotFound = true;
- for (Iterator iter = pageMap.keySet().iterator(); iter.hasNext();) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) iter.next();
- if (element.allowsExtendedPagesAfter) {
- TreeSet set = (TreeSet) pageMap.get(element);
- set.add(newElement);
- listRemoveObjects.add(newElement);
- return;
- }
- }
- if (insertNotFound) {
- Logger logger = Logger.getLogger();
- logger.logError(WTPCommonUIResourceHandler.WizardPageExtensionManager_UI_3);
- }
-
- }
-
- private void logMissingClassError() {
- Logger logger = Logger.getLogger();
- for (int i = 0; i < nonSyncedPageElementList.size(); i++) {
- DMWizardPageGroupElement element = (DMWizardPageGroupElement) nonSyncedPageElementList.get(i);
- logger.logError(WTPCommonUIResourceHandler.getString(WTPCommonUIResourceHandler.WizardPageExtensionManager_UI_4, new Object[]{element.pageInsertionID, element.getPageID(), element.pluginID}));
- }
- nonSyncedPageElementList.clear();
-
- }
-
- /**
- * Gets the instance.
- *
- * @return Returns a EjbPageExtensionRegistry
- */
- public static DMWizardPageExtensionManager getInstance() {
- if (instance == null) {
- instance = new DMWizardPageExtensionManager();
- }
- return instance;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java
deleted file mode 100644
index 4b09a8b99..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.ConfigurationElementWrapper;
-
-/**
- * This class provides convenient methods for accessing the semantics of the
- * given <code>IConfigurationElement</code> in the context of the
- * <cite>factory</cite> element as a child element of the <cite>wizardPage</cite>
- * element of the <cite>wizardPageGroup</cite> extension point.
- *
- * @author kraev
- */
-public class DMWizardPageFactoryElement extends ConfigurationElementWrapper {
-
- /**
- * The name of the attribute that points to fully qualified name of the
- * class that extends the <code>DMWizardPageExtensionFactory</code>
- * abstract class. This class does the actual job on extending a wizard
- * page.
- */
- public static final String ATT_CLASS_NAME = "className"; //$NON-NLS-1$
-
- protected String className;
- protected DMWizardPageExtensionFactory wizardPageFactory;
-
- private boolean isPageFactoryInitialized;
-
- /**
- * Constructs a new <code>DMWizardPageFactoryElement</code> from the given
- * <code>IConfigurationElement</code>.
- *
- * @param element -
- * the <code>IConfigurationElement</code> to wrap.
- */
- public DMWizardPageFactoryElement(IConfigurationElement element) {
- super(element);
- className = element.getAttribute(ATT_CLASS_NAME);
-
- isPageFactoryInitialized = false;
- }
-
- /**
- * Create additional controls for the specified wizard page.
- *
- * <p>
- * This method ensures that the implementation of the
- * <code>DMWizardPageExtensionFactory</code> abstract class, that is
- * defined in the <cite>className</cite> attribute, is initialized. Then
- * the method forwards the call to the factory class.
- * </p>
- *
- * @param parent -
- * the parent composite where the additional controls will be
- * added to.
- * @param model -
- * the data model of the wizard.
- * @param pageName -
- * the name of the extended wizard page.
- */
- public void createAdditionalControls(Composite parent, IDataModel model, String pageName) {
- if (!isPageFactoryInitialized)
- initPageFactory();
-
- if (wizardPageFactory == null)
- return;
-
- wizardPageFactory.createAdditionalControls(parent, model, pageName);
- }
-
- private void initPageFactory() {
- try {
- wizardPageFactory = (DMWizardPageExtensionFactory) element.createExecutableExtension(ATT_CLASS_NAME);
- } catch (CoreException e) {
- Logger.getLogger().logError("Error getting page factory: " + className); //$NON-NLS-1$
- Logger.getLogger().logError(e);
- } finally {
- isPageFactoryInitialized = true;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupElement.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupElement.java
deleted file mode 100644
index 8c7aa7e95..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupElement.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Kaloyan Raev, kaloyan.raev@sap.com - bug 213927
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageGroupHandler;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageHandler;
-import org.eclipse.wst.common.frameworks.internal.enablement.IdentifiableComparator;
-
-public class DMWizardPageGroupElement extends AbstractRegistryDescriptor implements Comparable {
- static final String ELEMENT_PAGE_GROUP = "wizardPageGroup"; //$NON-NLS-1$
- static final String ATT_PAGE_ID = "pageGroupID"; //$NON-NLS-1$
- static final String ATT_WIZARD_ID = "wizardID"; //$NON-NLS-1$
- static final String ATT_REQUIRES_DATA_OPERATION_ID = "requiresDataOperationId"; //$NON-NLS-1$
- static final String ATT_DATA_MODEL_IDS = "dataModelIds"; //$NON-NLS-1$
- static final String ATT_ALLOWS_EXTENDED_PAGES_AFTER = "allowsExtendedPagesAfter"; //$NON-NLS-1$
- static final String ATT_PAGE_INSERTION_ID = "pageGroupInsertionID"; //$NON-NLS-1$
- static final String ELEMENT_FACTORY = "factory"; //$NON-NLS-1$
-
- protected DMWizardPageGroupFactoryElement wizardPageFactoryElement;
- protected String pluginID;
- protected String wizardID;
- public String pageGroupID;
- protected String wizardFactoryElement;
- protected boolean allowsExtendedPagesAfter;
- protected String requiresDataOperationId;
- protected Set dataModelIDs;
- protected String pageInsertionID;
- private int loadOrder;
- private static int loadOrderCounter;
-
-
- private int type;
-
- public DMWizardPageGroupElement(IConfigurationElement element1) {
- super(element1);
- pluginID = element1.getDeclaringExtension().getNamespace();
- wizardID = element1.getAttribute(ATT_WIZARD_ID);
- pageGroupID = element1.getAttribute(ATT_PAGE_ID);
- requiresDataOperationId = element1.getAttribute(ATT_REQUIRES_DATA_OPERATION_ID);
- dataModelIDs = getDataModelIds( element1 );
- readAllowsExtendedPageAfter(element1);
- pageInsertionID = element1.getAttribute(ATT_PAGE_INSERTION_ID);
- readFactory(element1);
- validateSettings();
- loadOrder = loadOrderCounter++;
- }
-
- private Set getDataModelIds(IConfigurationElement element )
- {
- HashSet ids = new HashSet();
- String idList = element.getAttribute(ATT_DATA_MODEL_IDS);
-
- if( idList != null )
- {
- String[] dataModelIDs = idList.split( " *"); //$NON-NLS-1$
-
- for( int index = 0; index < dataModelIDs.length; index++ )
- {
- ids.add( dataModelIDs[index] );
- }
- }
-
- return ids;
- }
-
- private void validateSettings() {
- if (wizardID == null || wizardPageFactoryElement == null) {
- Logger.getLogger().logError("Incomplete page extension specification."); //$NON-NLS-1$
- }
- }
-
-
- private void readAllowsExtendedPageAfter(IConfigurationElement element1) {
- String allowsPageAfterValue = element1.getAttribute(ATT_ALLOWS_EXTENDED_PAGES_AFTER);
- allowsExtendedPagesAfter = allowsPageAfterValue == null ? false : Boolean.valueOf(allowsPageAfterValue).booleanValue();
- }
-
- private void readFactory(IConfigurationElement element1) {
- IConfigurationElement[] factories = element1.getChildren(ELEMENT_FACTORY);
- if (factories != null && factories.length > 0) {
- wizardPageFactoryElement = new DMWizardPageGroupFactoryElement(factories[0], pageGroupID);
- }
- }
-
- public IDMPageHandler createPageHandler(IDataModel dataModel) {
- if (wizardPageFactoryElement != null)
- return wizardPageFactoryElement.createPageHandler(dataModel);
- return null;
- }
-
- public DataModelWizardPage[] createPageGroup(IDataModel dataModel) {
- if (wizardPageFactoryElement != null)
- return wizardPageFactoryElement.createPageGroup(dataModel);
- return null;
- }
-
- public IDMPageGroupHandler createPageGroupHandler(IDataModel dataModel) {
- return wizardPageFactoryElement == null ? null : wizardPageFactoryElement.createPageGroupHandler(dataModel);
- }
-
- public int compareTo(Object o) {
- return IdentifiableComparator.getInstance().compare(this, o);
- /*
- * if (o == null) return GREATER_THAN; WizardPageElement element = (WizardPageElement) o; if
- * (getID() == null && element.getID() == null) return compareLoadOrder(element); if
- * (getID() == null) return GREATER_THAN; else if (element.getID() == null) return
- * LESS_THAN;
- *
- * int priority = getPriority(); int elementPriority =element.getPriority();
- *
- * if (priority == elementPriority) return compareLoadOrder(element); if (priority <
- * elementPriority) return GREATER_THAN; if (priority > elementPriority) return LESS_THAN;
- * return EQUAL;
- */
- }
-
- /**
- * @return
- */
- public boolean allowsExtendedPagesAfter() {
- return allowsExtendedPagesAfter;
- }
-
- /**
- * @return
- */
- public String getPluginID() {
- return pluginID;
- }
-
- /**
- * @return
- */
- public String getPageID() {
- return pageGroupID;
- }
-
- /**
- * @return
- */
- public String getPageInsertionID() {
- return pageInsertionID;
- }
-
- /**
- * @return
- */
- public int getType() {
- return type;
- }
-
- /**
- * @return
- */
- public int getLoadOrder() {
- return loadOrder;
- }
-
-
- /**
- * @return Returns the allowsExtendedPagesAfter.
- */
- public boolean isAllowsExtendedPagesAfter() {
- return allowsExtendedPagesAfter;
- }
-
- /**
- * @param allowsExtendedPagesAfter
- * The allowsExtendedPagesAfter to set.
- */
- public void setAllowsExtendedPagesAfter(boolean allowsExtendedPagesAfter) {
- this.allowsExtendedPagesAfter = allowsExtendedPagesAfter;
- }
-
- public String getRequiresDataOperationId() {
- return requiresDataOperationId;
- }
-
-
- public void setRequiresDataOperationId(String dataOperationId) {
- requiresDataOperationId = dataOperationId;
- }
-
- public Set getDataModelIDs() {
- return dataModelIDs;
- }
-
- public void setDataModelID(Set newDataModelIDs) {
- dataModelIDs = newDataModelIDs;
- }
-
- /**
- * @return Returns the wizardFactoryElement.
- */
- public String getWizardFactoryElement() {
- return wizardFactoryElement;
- }
-
- /**
- * @param wizardFactoryElement
- * The wizardFactoryElement to set.
- */
- public void setWizardFactoryElement(String wizardFactoryElement) {
- this.wizardFactoryElement = wizardFactoryElement;
- }
-
- /**
- * @return Returns the wizardID.
- */
- public String getWizardID() {
- return wizardID;
- }
-
- /**
- * @param wizardID
- * The wizardID to set.
- */
- public void setWizardID(String wizardID) {
- this.wizardID = wizardID;
- }
-
- /**
- * @return Returns the wizardPageFactoryElement.
- */
- public DMWizardPageGroupFactoryElement getWizardPageFactoryElement() {
- return wizardPageFactoryElement;
- }
-
- /**
- * @param wizardPageFactoryElement
- * The wizardPageFactoryElement to set.
- */
- public void setWizardPageFactoryElement(DMWizardPageGroupFactoryElement wizardPageFactoryElement) {
- this.wizardPageFactoryElement = wizardPageFactoryElement;
- }
-
-
- /**
- * @param pageID
- * The pageID to set.
- */
- public void setPageID(String pageID) {
- this.pageGroupID = pageID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.AbstractRegistryDescriptor#getID()
- */
- public String getID() {
- return getPageID();
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupFactoryElement.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupFactoryElement.java
deleted file mode 100644
index f04ba2286..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageGroupFactoryElement.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Kaloyan Raev, kaloyan.raev@sap.com - bug 213927
- *******************************************************************************/
-/*
- * Created on Oct 20, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.ConfigurationElementWrapper;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageGroupHandler;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.IDMPageHandler;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DMWizardPageGroupFactoryElement extends ConfigurationElementWrapper {
-
- static final String ATT_CLASS_NAME = "className"; //$NON-NLS-1$
-
- protected String className;
- protected DMWizardExtensionFactory wizardPageGroupFactory;
- protected boolean isPageGroupFactoryInitialized;
- protected String pageGroupID;
-
- /**
- * @param element
- */
- public DMWizardPageGroupFactoryElement(IConfigurationElement element, String pageGroupID) {
- super(element);
- className = element.getAttribute(ATT_CLASS_NAME);
- this.pageGroupID = pageGroupID;
- }
-
- public IDMPageHandler createPageHandler(IDataModel dataModel) {
- if (!isPageGroupFactoryInitialized)
- initPageFactory();
- if (wizardPageGroupFactory == null)
- return null;
-
- IDMPageHandler handler = wizardPageGroupFactory.createPageHandler(dataModel, pageGroupID);
- return handler;
- }
-
- public DataModelWizardPage[] createPageGroup(IDataModel dataModel) {
- if (!isPageGroupFactoryInitialized)
- initPageFactory();
-
- if (wizardPageGroupFactory == null)
- return null;
-
- DataModelWizardPage[] pages = wizardPageGroupFactory.createPageGroup(dataModel, pageGroupID);
-
- return pages;
- }
-
- public IDMPageGroupHandler createPageGroupHandler( IDataModel dataModel )
- {
- if (!isPageGroupFactoryInitialized) initPageFactory();
-
- if( wizardPageGroupFactory == null ) return null;
-
- return wizardPageGroupFactory.createPageGroupHandler( dataModel, pageGroupID );
- }
-
- private void initPageFactory() {
- try {
- wizardPageGroupFactory = (DMWizardExtensionFactory) element.createExecutableExtension(ATT_CLASS_NAME);
- } catch (CoreException e) {
- Logger.getLogger().logError("Error getting page factory: " + className); //$NON-NLS-1$
- Logger.getLogger().logError(e);
- } finally {
- isPageGroupFactoryInitialized = true;
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java
deleted file mode 100644
index 5ce7b7394..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 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
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-
-public class DataModelWizardExtensionReader extends RegistryReader {
-
- private static final String EXTENSION = "DataModelWizardExtension"; //$NON-NLS-1$
- private static final String ELEMENT = "DataModelWizard"; //$NON-NLS-1$
- private static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
- private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
-
- private HashMap extensions;
-
- public DataModelWizardExtensionReader() {
- super(WTPUIPlugin.PLUGIN_ID, EXTENSION);
- }
-
- public boolean readElement(IConfigurationElement element) {
- if (!element.getName().equals(ELEMENT))
- return false;
- String id = element.getAttribute(ATTRIBUTE_ID);
- if (null == id || id.trim().length() == 0) {
- Logger.getLogger().logError(new RuntimeException("Extension:" + EXTENSION + " Element:" + ELEMENT + " is missing " + ATTRIBUTE_ID)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- String className = element.getAttribute(ATTRIBUTE_CLASS);
- if (null == className || className.trim().length() == 0) {
- Logger.getLogger().logError(new RuntimeException("Extension:" + EXTENSION + " Element:" + ELEMENT + " is missing " + ATTRIBUTE_CLASS)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- addExtension(id, element);
- return true;
- }
-
- private void addExtension(String id, IConfigurationElement element) {
- if (extensions.containsKey(id)) {
- Logger.getLogger().logError(new RuntimeException("Duplicate " + ELEMENT + " " + ATTRIBUTE_ID + " " + id)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- extensions.put(id, element);
- }
-
- protected IConfigurationElement getExtension(String id) {
- if (extensions == null) {
- extensions = new HashMap();
- readRegistry();
- }
- IConfigurationElement element = (IConfigurationElement) extensions.get(id);
- if (null == element) {
- throw new RuntimeException("Extension:" + EXTENSION + " Element:" + ELEMENT + " not found for " + ATTRIBUTE_ID + ": " + id); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- return element;
- }
-
- public DataModelWizard getWizard(IDataModel dataModel) {
- DataModelWizard wizard = null;
- IConfigurationElement element = getExtension(dataModel.getID());
-
- try {
- wizard = (DataModelWizard) element.createExecutableExtension(ATTRIBUTE_CLASS);
- wizard.setDataModel(dataModel);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- return wizard;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java
deleted file mode 100644
index c6aee2c37..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 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
- *******************************************************************************/
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-
-
-/**
- * @author mdelder
- */
-public class ExtensibleViewRegistry extends RegistryReader {
-
- private static ExtensibleViewRegistry INSTANCE = null;
- private Map extendedViewerMap = null;
- private Map descriptorMap = null;
-
- protected interface Elements {
- public static final String EXTENDED_VIEWER = "extendedViewer"; //$NON-NLS-1$
- public static final String VIEWER_ID = "viewerID"; //$NON-NLS-1$
- public static final String PARENT_VIEWER_ID = "parentViewerID"; //$NON-NLS-1$
- public static final String FACTORY_CLASS = "factoryClass"; //$NON-NLS-1$
- public static final String ICON = "icon"; //$NON-NLS-1$
- public static final String LABEL = "label"; //$NON-NLS-1$
- public static final String FUNCTION_GROUP_ID = "functionGroupID"; //$NON-NLS-1$
- }
-
- /**
- *
- */
- private ExtensibleViewRegistry() {
- super(WTPUIPlugin.PLUGIN_ID, WTPUIPlugin.EXTENDED_VIEWER_REGISTRY_EXTENSION_POINT);
- }
-
- public static ExtensibleViewRegistry getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new ExtensibleViewRegistry();
- INSTANCE.readRegistry();
- }
- return INSTANCE;
- }
-
- public Descriptor getDescriptor(String viewerID) {
- return (Descriptor) getDescriptorMap().get(viewerID);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.internal.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- if (element.getName().equals(Elements.EXTENDED_VIEWER)) {
- Descriptor descriptor = new Descriptor(element);
- getDescriptorMap().put(descriptor.getViewerID(), descriptor);
- return true;
- }
- return false;
- }
-
- /**
- * @return Returns the extendedViewerMap.
- */
- protected Map getExtendedViewerMap() {
- if (extendedViewerMap == null)
- extendedViewerMap = new HashMap();
- return extendedViewerMap;
- }
-
- /**
- * @return Returns the descriptorMap.
- */
- protected Map getDescriptorMap() {
- if (descriptorMap == null)
- descriptorMap = new HashMap();
- return descriptorMap;
- }
-
- public class Descriptor {
-
- private String viewerID = null;
- private String parentViewerID = null;
- private String factoryClass = null;
- private String icon = null;
- private String label = null;
- private String functionGroupID = null;
-
- private String toStringCache = null;
- private IConfigurationElement element = null;
-
- /**
- *
- */
- public Descriptor(IConfigurationElement element) {
- this.element = element;
-
- this.viewerID = this.element.getAttribute(ExtensibleViewRegistry.Elements.VIEWER_ID);
- this.parentViewerID = this.element.getAttribute(ExtensibleViewRegistry.Elements.PARENT_VIEWER_ID);
- this.factoryClass = this.element.getAttribute(ExtensibleViewRegistry.Elements.FACTORY_CLASS);
- this.icon = this.element.getAttribute(ExtensibleViewRegistry.Elements.ICON);
- this.label = this.element.getAttribute(ExtensibleViewRegistry.Elements.LABEL);
- this.functionGroupID = this.element.getAttribute(ExtensibleViewRegistry.Elements.FUNCTION_GROUP_ID);
- }
-
- public IExtensibleViewFactory createFactoryInstance() {
- IExtensibleViewFactory factoryInstance = null;
- try {
- factoryInstance = (IExtensibleViewFactory) this.element.createExecutableExtension(getFactoryClass());
- } catch (CoreException e) {
- WTPUIPlugin.getLogger().logError(e);
- }
- return factoryInstance;
- }
-
- /**
- * @return Returns the factoryClass.
- */
- public String getFactoryClass() {
- return factoryClass;
- }
-
- /**
- * @return Returns the functionGroupID.
- */
- public String getFunctionGroupID() {
- return functionGroupID;
- }
-
- /**
- * @return Returns the icon.
- */
- public String getIcon() {
- return icon;
- }
-
- /**
- * @return Returns the label.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * @return Returns the parentViewerID.
- */
- public String getParentViewerID() {
- return parentViewerID;
- }
-
- /**
- * @return Returns the viewerID.
- */
- public String getViewerID() {
- return viewerID;
- }
-
- public String toString() {
- if (toStringCache == null)
- toStringCache = "ExtensibleViewRegistry.Info [viewerID=\"" + getViewerID() + "\",parentViewerID=\"" + getParentViewerID() + "\",factoryClass=" + getFactoryClass() + "\",functionGroupID=\"" + getFunctionGroupID() + "\"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- return toStringCache;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java
deleted file mode 100644
index 261938ba4..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 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
- *******************************************************************************/
-
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-/**
- * @author mdelder
- */
-public interface IExtensibleViewFactory {
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java b/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java
deleted file mode 100644
index 747b5ca80..000000000
--- a/plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on May 5, 2004
- *
- * TODO To change the template for this generated file go to Window -
- * Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.frameworks.internal.operation.extensionui;
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public interface IOperationNode {
-
- public IOperationNode[] getChildren();
-
- public boolean isChecked();
-
- /**
- * Same as calling setChecked(checked, true)
- *
- * @param checked
- */
- public void setChecked(boolean checked);
-
- public String getName();
-
- public String getDescription();
-
- public IOperationNode getParent();
-
- /**
- * @return
- */
- public boolean isAlwaysExecute();
-} \ No newline at end of file

Back to the top