[jbosstools-commits] JBoss Tools SVN: r43677 - in trunk/as: plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards and 9 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 14 01:02:08 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-14 01:02:07 -0400 (Fri, 14 Sep 2012)
New Revision: 43677
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/moduleDependencyPropertyPage.exsd
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/referenceWizardFragment.exsd
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddFolderDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExportedClasspathFoldersReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExternalJarReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IDependencyPageProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IModuleDependenciesControl.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IReferenceEditor.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/JarReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ModuleAssemblyRootPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceRootWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/OutputFolderReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ProjectReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/VariableReferenceWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependenciesPropertyPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependencyPageProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/vcf/OutputFoldersLabelProvider.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
Log:
JBIDE-12612 deleting cruft
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2012-09-14 05:02:07 UTC (rev 43677)
@@ -25,7 +25,6 @@
org.jboss.tools.jmx.core,
org.eclipse.core.variables;bundle-version="3.2.500",
org.jboss.ide.eclipse.as.wtp.core,
- org.jboss.ide.eclipse.as.wtp.ui,
org.eclipse.emf.common;bundle-version="2.7.0",
org.eclipse.emf.ecore;bundle-version="2.7.0",
org.eclipse.wst.common.modulecore.ui;bundle-version="1.0.100",
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -67,8 +67,6 @@
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.TaskModel;
-import org.eclipse.wst.server.core.internal.IInstallableRuntime;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/META-INF/MANIFEST.MF 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/META-INF/MANIFEST.MF 2012-09-14 05:02:07 UTC (rev 43677)
@@ -30,4 +30,3 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
-Export-Package: org.jboss.ide.eclipse.as.wtp.ui.propertypage
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
-
<extension
point="org.eclipse.ui.exportWizards">
<wizard
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/moduleDependencyPropertyPage.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/moduleDependencyPropertyPage.exsd 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/moduleDependencyPropertyPage.exsd 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.ide.eclipse.as.wtp.override.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.jboss.ide.eclipse.as.wtp.override.ui" id="moduleDependencyPropertyPage" name="org.jboss.ide.eclipse.as.wtp.override.moduleDependencyPropertyPage"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="dependencyPage"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="dependencyPage">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.as.wtp.override.ui.propertypage.IDependencyPageProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/referenceWizardFragment.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/referenceWizardFragment.exsd 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/referenceWizardFragment.exsd 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,126 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.ide.eclipse.as.wtp.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.jboss.ide.eclipse.as.wtp.ui" id="referenceWizardFragment" name="referenceWizardFragment"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="referenceFragment"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="referenceFragment">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name will be displayed in the UI, inside the viewer
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.ui.wizard.WizardFragment:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.ide.eclipse.as.wtp.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.jboss.ide.eclipse.as.wtp.ui" id="VirtualComponentLabelProvider" name="VirtualComponentLabelProvider"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="provider"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="provider">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.as.wtp.ui.propertypage.IVirtualComponentLabelProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="weight" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddFolderDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddFolderDialog.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddFolderDialog.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,133 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class AddFolderDialog extends TitleAreaDialog {
- private IProject project;
- private TreeViewer viewer;
- private IContainer selected = null;
- public AddFolderDialog(Shell parentShell, IProject project) {
- super(parentShell);
- this.project = project;
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText("Add Folder");
- shell.setBounds(shell.getLocation().x, shell.getLocation().y, 400,300);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite c = (Composite)super.createDialogArea(parent);
- this.viewer = new TreeViewer(c, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(getLabelProvider());
- viewer.addFilter(getFilter());
- viewer.setInput(project);
- viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- viewer.addSelectionChangedListener(getListener());
- return c;
- }
-
- protected ISelectionChangedListener getListener() {
- return new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection sel = (IStructuredSelection)viewer.getSelection();
- Object first = sel.getFirstElement();
- if( first instanceof IContainer)
- selected = (IContainer)first;
- }
- };
- }
-
- public IContainer getSelected() {
- return selected;
- }
-
- protected ViewerFilter getFilter() {
- return new ViewerFilter() {
- public boolean select(Viewer viewer, Object parentElement,
- Object element) {
- return element instanceof IContainer;
- }
- };
- }
-
- protected ITreeContentProvider getContentProvider() {
- return new ITreeContentProvider() {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- try {
- return project.members();
- } catch( CoreException ce ) {
- return new Object[]{};
- }
- }
-
- public boolean hasChildren(Object element) {
- if( element instanceof IContainer) {
- try {
- return ((IContainer)element).members().length > 0;
- } catch( CoreException ce ) {
- }
- }
- return false;
- }
-
- public Object getParent(Object element) {
- if( element instanceof IResource)
- return ((IResource)element).getParent();
- return null;
- }
-
- public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof IContainer) {
- try {
- return ((IContainer)parentElement).members();
- } catch( CoreException ce ) {
- }
- }
- return new Object[]{};
- }
- };
- }
-
- protected LabelProvider getLabelProvider() {
- return new LabelProvider() {
- public Image getImage(Object element) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- }
- public String getText(Object element) {
- if( element instanceof IResource)
- return ((IResource)element).getName();
- return element.toString();
- }
- };
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,990 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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
- * David Schneider, david.schneider at unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- * Stefan Dimov, stefan.dimov at sap.com - bugs 207826, 222651
- *******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.operation.RemoveReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.ui.Messages;
-import org.jboss.ide.eclipse.as.wtp.ui.WTPOveridePlugin;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.DependencyPageExtensionManager.ReferenceExtension;
-
-public class AddModuleDependenciesPropertiesPage implements Listener,
- IModuleDependenciesControl, ILabelProviderListener {
-
- private static final String DEPLOY_PATH_PROPERTY = new Integer(0).toString();
- private static final String SOURCE_PROPERTY = new Integer(1).toString();
-
-
- protected final String PATH_SEPARATOR = ComponentDependencyContentProvider.PATH_SEPARATOR;
- private boolean hasInitialized = false;
- protected final IProject project;
- protected final ModuleAssemblyRootPage propPage;
- protected IVirtualComponent rootComponent = null;
- protected Text componentNameText;
- protected Label availableModules;
- protected TableViewer availableComponentsViewer;
- protected Button addMappingButton, addReferenceButton, editReferenceButton, removeButton;
- protected Composite buttonColumn;
- protected static final IStatus OK_STATUS = IDataModelProvider.OK_STATUS;
- protected Listener tableListener;
- protected Listener labelListener;
-
- // Mappings that existed when the page was opened (or last saved)
- protected HashMap<IVirtualComponent, String> oldComponentToRuntimePath = new HashMap<IVirtualComponent, String>();
-
- // Mappings that are current
- protected HashMap<IVirtualComponent, String> objectToRuntimePath = new HashMap<IVirtualComponent, String>();
-
- protected ArrayList<IVirtualComponent> consumedReferences = new ArrayList<IVirtualComponent>();
-
- // A single list of wb-resource mappings. If there's any change,
- // all old will be removed and new ones added
- protected ArrayList<ComponentResourceProxy> resourceMappings = new ArrayList<ComponentResourceProxy>();
-
- // keeps track if a change has occurred in wb-resource mappings
- protected boolean resourceMappingsChanged = false;
-
- /**
- * Constructor for AddModulestoEARPropertiesControl.
- */
- public AddModuleDependenciesPropertiesPage(final IProject project,
- final ModuleAssemblyRootPage page) {
- this.project = project;
- this.propPage = page;
- rootComponent = ComponentCore.createComponent(project);
- }
-
- /*
- * UI Creation Methods
- */
-
- public Composite createContents(final Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- ModuleAssemblyRootPage.createDescriptionComposite(composite,
- Messages.ModuleDependencyDescription);
- createListGroup(composite);
- refresh();
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- protected void createListGroup(Composite parent) {
- Composite listGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- listGroup.setLayout(layout);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.horizontalIndent = 5;
- listGroup.setLayoutData(gData);
-
- availableModules = new Label(listGroup, SWT.NONE);
- gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL);
- availableModules.setText("Module Assembly"); //$NON-NLS-1$
- availableModules.setLayoutData(gData);
- createTableComposite(listGroup);
- }
-
- protected void createTableComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gData);
- fillComposite(composite);
- }
-
- public void fillComposite(Composite parent) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.FILL_BOTH));
- createTable(parent);
- createButtonColumn(parent);
- }
-
- protected void createButtonColumn(Composite parent) {
- buttonColumn = createButtonColumnComposite(parent);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonColumn.setLayoutData(data);
- createPushButtons();
- }
-
- protected void createPushButtons() {
- addMappingButton = createPushButton("Add Folder...");
- addReferenceButton = createPushButton("Add Reference...");
- editReferenceButton = createPushButton("Edit Reference...");
- removeButton = createPushButton("Remove selected");
- }
-
- protected Button createPushButton(String label) {
- Button aButton = new Button(buttonColumn, SWT.PUSH);
- aButton.setText(label);
- aButton.addListener(SWT.Selection, this);
- aButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return aButton;
- }
-
- public Composite createButtonColumnComposite(Composite parent) {
- Composite aButtonColumn = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- aButtonColumn.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- aButtonColumn.setLayoutData(data);
- return aButtonColumn;
- }
-
- public Group createGroup(Composite parent) {
- return new Group(parent, SWT.NULL);
- }
-
- protected void createTable(Composite parent) {
- if (rootComponent != null) {
- availableComponentsViewer = createAvailableComponentsViewer(parent);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.FILL_VERTICAL);
- availableComponentsViewer.getTable().setLayoutData(gd);
-
- ComponentDependencyContentProvider provider = createProvider();
- provider.setRuntimePaths(objectToRuntimePath);
- provider.setResourceMappings(resourceMappings);
- availableComponentsViewer.setContentProvider(provider);
- availableComponentsViewer.setLabelProvider(provider);
- addTableListeners();
- }
- }
-
- /**
- * Subclasses should over-ride this and extend the class
- */
- protected ComponentDependencyContentProvider createProvider() {
- return new ComponentDependencyContentProvider(this);
- }
-
- /*
- * Listeners of various events
- */
-
- protected void addTableListeners() {
- addHoverHelpListeners();
- addDoubleClickListener();
- addSelectionListener();
- }
-
- protected void addHoverHelpListeners() {
- final Table table = availableComponentsViewer.getTable();
- createLabelListener(table);
- createTableListener(table);
- table.addListener(SWT.Dispose, tableListener);
- table.addListener(SWT.KeyDown, tableListener);
- table.addListener(SWT.MouseMove, tableListener);
- table.addListener(SWT.MouseHover, tableListener);
- }
-
- protected void createLabelListener(final Table table) {
- labelListener = new Listener() {
- public void handleEvent(Event event) {
- Label label = (Label) event.widget;
- Shell shell = label.getShell();
- switch (event.type) {
- case SWT.MouseDown:
- Event e = new Event();
- e.item = (TableItem) label.getData("_TABLEITEM"); //$NON-NLS-1$
- table.setSelection(new TableItem[] { (TableItem) e.item });
- table.notifyListeners(SWT.Selection, e);
- shell.dispose();
- table.setFocus();
- break;
- case SWT.MouseExit:
- shell.dispose();
- break;
- }
- }
- };
- }
-
- protected void createTableListener(final Table table) {
- tableListener = new Listener() {
- Shell tip = null;
- Label label = null;
-
- public void handleEvent(Event event) {
- switch (event.type) {
- case SWT.Dispose:
- case SWT.KeyDown:
- case SWT.MouseMove: {
- if (tip == null)
- break;
- tip.dispose();
- tip = null;
- label = null;
- break;
- }
- case SWT.MouseHover: {
- TableItem item = table.getItem(new Point(event.x, event.y));
- if (item != null && item.getData() != null && !canEditPath(item.getData())) {
- if (tip != null && !tip.isDisposed())
- tip.dispose();
- tip = new Shell(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell(),
- SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL);
- tip.setBackground(Display.getDefault().getSystemColor(
- SWT.COLOR_INFO_BACKGROUND));
- FillLayout layout = new FillLayout();
- layout.marginWidth = 2;
- tip.setLayout(layout);
- label = new Label(tip, SWT.WRAP);
- label.setForeground(Display.getDefault()
- .getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- label.setBackground(Display.getDefault()
- .getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- label.setData("_TABLEITEM", item); //$NON-NLS-1$
- label.setText(J2EEUIMessages
- .getResourceString(J2EEUIMessages.HOVER_HELP_FOR_DISABLED_LIBS));
- label.addListener(SWT.MouseExit, labelListener);
- label.addListener(SWT.MouseDown, labelListener);
- Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Rectangle rect = item.getBounds(0);
- Point pt = table.toDisplay(rect.x, rect.y);
- tip.setBounds(pt.x, pt.y - size.y, size.x, size.y);
- tip.setVisible(true);
- }
- }
- }
- }
- };
- }
-
- protected boolean canEditPath(Object data) {
- if( data == null ) return false;
- if( !(data instanceof VirtualArchiveComponent)) return true;
-
- VirtualArchiveComponent d2 = (VirtualArchiveComponent)data;
- boolean sameProject = d2.getWorkspaceRelativePath() != null
- && d2.getWorkspaceRelativePath().segment(0)
- .equals(rootComponent.getProject().getName());
- return !(sameProject && isPhysicallyAdded(d2));
- }
-
- protected void addDoubleClickListener() {
- availableComponentsViewer.setColumnProperties(new String[] {
- DEPLOY_PATH_PROPERTY, SOURCE_PROPERTY });
-
- CellEditor[] editors = new CellEditor[] {
- new TextCellEditor(availableComponentsViewer.getTable()),
- new TextCellEditor()};
- availableComponentsViewer.setCellEditors(editors);
- availableComponentsViewer
- .setCellModifier(new RuntimePathCellModifier());
- }
-
- protected void addSelectionListener() {
- availableComponentsViewer.addSelectionChangedListener(
- new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event) {
- viewerSelectionChanged();
- }
- });
- }
-
- protected void viewerSelectionChanged() {
- editReferenceButton.setEnabled(hasEditWizardPage(getSelectedObject()));
- removeButton.setEnabled(getSelectedObject() != null && canEditPath(getSelectedObject()));
- }
-
- protected boolean hasEditWizardPage(Object o) {
- if( o == null || !(o instanceof IVirtualComponent))
- return false;
- WizardFragment wf = NewReferenceWizard.getFirstEditingFragment((IVirtualComponent)o);
- return wf != null;
- }
-
- protected Object getSelectedObject() {
- IStructuredSelection sel = (IStructuredSelection)availableComponentsViewer.getSelection();
- return sel.getFirstElement();
- }
-
- private class RuntimePathCellModifier implements ICellModifier {
-
- public boolean canModify(Object element, String property) {
- if( property.equals(DEPLOY_PATH_PROPERTY)) {
- if (element instanceof VirtualArchiveComponent) {
- try {
- return canEditPath(element);
- } catch (IllegalArgumentException iae) {
- }
- }
- return true;
- }
- return false;
- }
-
- public Object getValue(Object element, String property) {
- Object data = element; //((TableItem)element).getData();
- if( data instanceof IVirtualComponent ) {
- return objectToRuntimePath.get(element) == null ? new Path("/") //$NON-NLS-1$
- .toString() : objectToRuntimePath.get(element);
- } else if( data instanceof ComponentResourceProxy) {
- return ((ComponentResourceProxy)data).runtimePath.toString();
- }
- return new Path("/");
- }
-
- public void modify(Object element, String property, Object value) {
- if (property.equals(DEPLOY_PATH_PROPERTY)) {
- TableItem item = (TableItem) element;
- if( item.getData() instanceof IVirtualComponent) {
- objectToRuntimePath.put((IVirtualComponent)item.getData(), (String) value);
- } else if( item.getData() instanceof ComponentResourceProxy) {
- ComponentResourceProxy c = ((ComponentResourceProxy)item.getData());
- c.runtimePath = new Path((String)value);
- resourceMappingsChanged = true;
- }
- refresh();
- }
- }
-
- }
-
- public void handleEvent(Event event) {
- if( event.widget == addMappingButton)
- handleAddMappingButton();
- else if( event.widget == addReferenceButton)
- handleAddReferenceButton();
- else if( event.widget == editReferenceButton )
- handleEditReferenceButton();
- else if( event.widget == removeButton )
- handleRemoveSelectedButton();
- }
-
- protected void handleAddMappingButton() {
- AddFolderDialog afd = new AddFolderDialog(addMappingButton.getShell(), project);
- if( afd.open() == Window.OK) {
- IContainer c = afd.getSelected();
- if( c != null ) {
- IPath p = c.getProjectRelativePath();
- ComponentResourceProxy proxy = new ComponentResourceProxy(p, new Path("/"));
- resourceMappings.add(proxy);
- refresh();
- }
- }
- }
-
- protected void handleAddReferenceButton() {
- showReferenceWizard(false);
- }
-
- protected void handleEditReferenceButton() {
- showReferenceWizard(true);
- }
-
- protected ReferenceExtension[] getReferenceExtensions() {
- return DependencyPageExtensionManager.getManager().getReferenceExtensions();
- }
-
- protected void showReferenceWizard(boolean editing) {
-
- NewReferenceWizard wizard = new NewReferenceWizard(getReferenceExtensions());
- // fill the task model
- wizard.getTaskModel().putObject(NewReferenceWizard.PROJECT, project);
- wizard.getTaskModel().putObject(NewReferenceWizard.ROOT_COMPONENT, rootComponent);
-
- IVirtualComponent selected = null;
- if( editing ) {
- Object o = ((IStructuredSelection)availableComponentsViewer.getSelection()).getFirstElement();
- if( o instanceof IVirtualComponent ) {
- selected = (IVirtualComponent)o;
- wizard.getTaskModel().putObject(NewReferenceWizard.COMPONENT, selected);
- wizard.getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, objectToRuntimePath.get(selected));
- }
- }
-
- WizardDialog wd = new WizardDialog(addReferenceButton.getShell(), wizard);
- if( wd.open() != Window.CANCEL) {
- if( editing && selected != null) {
- // remove old
- objectToRuntimePath.remove(selected);
- consumedReferences.remove(selected);
- }
-
- Object c1 = wizard.getTaskModel().getObject(NewReferenceWizard.COMPONENT);
- Object p1 = wizard.getTaskModel().getObject(NewReferenceWizard.COMPONENT_PATH);
- DependencyType type = (DependencyType)wizard.getTaskModel().getObject(NewReferenceWizard.DEPENDENCY_TYPE);
- boolean consumed = type == null ? false : type.equals(DependencyType.CONSUMES_LITERAL);
- IVirtualComponent[] compArr = c1 instanceof IVirtualComponent ?
- new IVirtualComponent[] { (IVirtualComponent)c1 } :
- (IVirtualComponent[])c1;
- String[] pathArr = p1 instanceof String ?
- new String[] { (String)p1 } :
- (String[])p1;
- for( int i = 0; i < compArr.length; i++ ) {
- objectToRuntimePath.put(compArr[i], pathArr[i]);
- if( consumed )
- consumedReferences.add(compArr[i]);
- }
- refresh();
- }
- }
-
- protected void handleRemoveSelectedButton() {
- ISelection sel = availableComponentsViewer.getSelection();
- if( sel instanceof IStructuredSelection ) {
- Object o = ((IStructuredSelection)sel).getFirstElement();
- if( o instanceof IVirtualComponent)
- objectToRuntimePath.remove(o);
- else if( o instanceof ComponentResourceProxy)
- resourceMappings.remove(o);
- refresh();
- }
- }
-
- public TableViewer createAvailableComponentsViewer(Composite parent) {
- int flags = SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI;
-
- Table table = new Table(parent, flags);
- availableComponentsViewer = new TableViewer(table);
-
- // set up table layout
- TableLayout tableLayout = new org.eclipse.jface.viewers.TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(400, true));
- tableLayout.addColumnData(new ColumnWeightData(500, true));
- table.setLayout(tableLayout);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- availableComponentsViewer.setSorter(null);
-
- TableColumn bndColumn = new TableColumn(table, SWT.NONE, 0);
- bndColumn.setText(Messages.AddModuleDependenciesPropertiesPage_DeployPathColumn);
- bndColumn.setResizable(true);
-
- TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(Messages.AddModuleDependenciesPropertiesPage_SourceColumn);
- projectColumn.setResizable(true);
-
- tableLayout.layout(table, true);
- return availableComponentsViewer;
-
- }
-
- protected boolean isPhysicallyAdded(VirtualArchiveComponent component) {
- try {
- component.getProjectRelativePath();
- return true;
- } catch (IllegalArgumentException e) {
- return false;
- }
- }
-
- /**
- * This should only be called on changes, such as adding a project
- * reference, adding a lib reference etc.
- *
- * It will reset the input, manually re-add missing elements, and do other
- * tasks
- */
- public void refresh() {
- resetTableUI();
- if (!hasInitialized) {
- initialize();
- resetTableUI();
- }
-
- }
-
- protected void resetTableUI() {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- availableComponentsViewer.setInput(input);
- GridData data = new GridData(GridData.FILL_BOTH);
- int numlines = Math.min(10, availableComponentsViewer.getTable()
- .getItemCount());
- data.heightHint = availableComponentsViewer.getTable().getItemHeight()
- * numlines;
- availableComponentsViewer.getTable().setLayoutData(data);
- GridData btndata = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- buttonColumn.setLayoutData(btndata);
- }
-
- protected IVirtualReference[] getHardReferencesFromComponent(IVirtualComponent component) {
- return component.getReferences();
- }
-
- protected void initialize() {
- IVirtualReference[] refs = getHardReferencesFromComponent(rootComponent);
- IVirtualComponent comp;
- for( int i = 0; i < refs.length; i++ ) {
- comp = refs[i].getReferencedComponent();
- IPath val = refs[i].getRuntimePath();
- if( refs[i].getDependencyType() != IVirtualReference.DEPENDENCY_TYPE_CONSUMES)
- if( refs[i].getArchiveName() != null )
- val = val.append(refs[i].getArchiveName());
-
- objectToRuntimePath.put(comp, val.toString());
- oldComponentToRuntimePath.put((IVirtualComponent) comp, val.toString());
- if( refs[i].getDependencyType() == DependencyType.CONSUMES)
- consumedReferences.add(comp);
- }
-
- ComponentResource[] allMappings = findAllMappings();
- for( int i = 0; i < allMappings.length; i++ ) {
- resourceMappings.add(new ComponentResourceProxy(
- allMappings[i].getSourcePath(), allMappings[i].getRuntimePath()
- ));
- }
- removeButton.setEnabled(false);
- editReferenceButton.setEnabled(false);
- hasInitialized = true;
- }
-
- protected ComponentResource[] findAllMappings() {
- StructureEdit structureEdit = null;
- try {
- structureEdit = StructureEdit.getStructureEditForRead(project);
- WorkbenchComponent component = structureEdit.getComponent();
- Object[] arr = component.getResources().toArray();
- ComponentResource[] result = new ComponentResource[arr.length];
- for( int i = 0; i < arr.length; i++ )
- result[i] = (ComponentResource)arr[i];
- return result;
- } catch(Exception e) {
- } finally {
- structureEdit.dispose();
- }
- return new ComponentResource[]{};
- }
-
- public class ComponentResourceProxy {
- public IPath source, runtimePath;
- public ComponentResourceProxy(IPath source, IPath runtimePath) {
- this.source = source;
- this.runtimePath = runtimePath;
- }
- }
-
- /*
- * Clean-up methods are below. These include performCancel, performDefaults,
- * performOK, and any other methods that are called *only* by this one.
- */
- public void setVisible(boolean visible) {
- }
-
- public void performDefaults() {
- }
-
- public boolean performCancel() {
- return true;
- }
-
- public void dispose() {
- Table table = null;
- if (availableComponentsViewer != null) {
- table = availableComponentsViewer.getTable();
- }
- if (table == null || tableListener == null)
- return;
- table.removeListener(SWT.Dispose, tableListener);
- table.removeListener(SWT.KeyDown, tableListener);
- table.removeListener(SWT.MouseMove, tableListener);
- table.removeListener(SWT.MouseHover, tableListener);
- }
-
-
-
- /*
- * This is where the OK work goes. Lots of it. Watch your head.
- * xiao xin
- */
- protected boolean preHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- protected boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- public boolean performOk() {
- boolean result = true;
- result &= saveResourceChanges();
- result &= saveReferenceChanges();
- return result;
- }
-
- protected boolean saveResourceChanges() {
- removeAllResourceMappings();
- addNewResourceMappings();
- return true;
- }
- protected boolean addNewResourceMappings() {
- ComponentResourceProxy[] proxies = (ComponentResourceProxy[]) resourceMappings.toArray(new ComponentResourceProxy[resourceMappings.size()]);
- IVirtualFolder rootFolder = rootComponent.getRootFolder();
- for( int i = 0; i < proxies.length; i++ ) {
- try {
- rootFolder.getFolder(proxies[i].runtimePath).createLink(proxies[i].source, 0, null);
- } catch( CoreException ce ) {
- }
- }
- resourceMappingsChanged = false;
- return true;
- }
-
- protected boolean removeAllResourceMappings() {
- StructureEdit moduleCore = null;
- try {
- moduleCore = StructureEdit.getStructureEditForWrite(project);
- moduleCore.getComponent().getResources().clear();
- }
- finally {
- if (moduleCore != null) {
- moduleCore.saveIfNecessary(new NullProgressMonitor());
- moduleCore.dispose();
- }
- }
- return true;
- }
-
- protected boolean saveReferenceChanges() {
- // Fill our delta lists
- ArrayList<IVirtualComponent> added = new ArrayList<IVirtualComponent>();
- ArrayList<IVirtualComponent> removed = new ArrayList<IVirtualComponent>();
- ArrayList<IVirtualComponent> changed = new ArrayList<IVirtualComponent>();
-
- Iterator<IVirtualComponent> j = oldComponentToRuntimePath.keySet().iterator();
- Object key, val;
- while (j.hasNext()) {
- key = j.next();
- val = oldComponentToRuntimePath.get(key);
- if( !objectToRuntimePath.containsKey(key))
- removed.add((IVirtualComponent)key);
- else if (!val.equals(objectToRuntimePath.get(key)))
- changed.add((IVirtualComponent)key);
- }
-
- j = objectToRuntimePath.keySet().iterator();
- while (j.hasNext()) {
- key = j.next();
- if (!oldComponentToRuntimePath.containsKey(key))
- added.add((IVirtualComponent)key);
- }
-
- NullProgressMonitor monitor = new NullProgressMonitor();
- boolean subResult = preHandleChanges(monitor);
- if( !subResult )
- return false;
-
- handleDeltas(removed, changed, added);
- subResult &= postHandleChanges(monitor);
-
- // Now update the variables
- oldComponentToRuntimePath.clear();
- ArrayList<IVirtualComponent> keys = new ArrayList<IVirtualComponent>();
- keys.addAll(objectToRuntimePath.keySet());
- Iterator<IVirtualComponent> i = keys.iterator();
- while(i.hasNext()) {
- IVirtualComponent vc = i.next();
- String path = objectToRuntimePath.get(vc);
- oldComponentToRuntimePath.put(vc, path);
- }
- return subResult;
- }
-
- // Subclass can override if it has a good way to handle changed elements
- protected void handleDeltas(ArrayList<IVirtualComponent> removed,
- ArrayList<IVirtualComponent> changed, ArrayList<IVirtualComponent> added) {
- ArrayList<IVirtualComponent> removed2 = new ArrayList<IVirtualComponent>();
- ArrayList<IVirtualComponent> added2 = new ArrayList<IVirtualComponent>();
- removed2.addAll(removed);
- removed2.addAll(changed);
- added2.addAll(added);
- added2.addAll(changed);
-
- // meld the changed into the added / removed for less efficiency ;)
- // basically we lack "change" operations and only have add / remove
- handleRemoved(removed2);
- handleAdded(added2);
- }
- protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
- // If it's removed it should *only* be a virtual component already
- Iterator<IVirtualComponent> i = removed.iterator();
- IVirtualComponent component;
- while(i.hasNext()) {
- try {
- component = i.next();
- IDataModelOperation operation = getRemoveComponentOperation(component);
- operation.execute(null, null);
- } catch( ExecutionException e) {
- WTPOveridePlugin.logError(e);
- }
- }
- }
-
- protected IDataModelOperation getRemoveComponentOperation(IVirtualComponent component) {
- String path, archiveName;
- path = archiveName = null;
-
- if( !consumedReferences.contains(component)) {
- path = new Path(oldComponentToRuntimePath.get(component)).removeLastSegments(1).toString();
- archiveName = new Path(oldComponentToRuntimePath.get(component)).lastSegment();
- } else {
- path = oldComponentToRuntimePath.get(component);
- }
-
- IDataModelProvider provider = getRemoveReferenceDataModelProvider(component);
- IDataModel model = DataModelFactory.createDataModel(provider);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, rootComponent);
- List<IVirtualComponent> modHandlesList = (List<IVirtualComponent>) model.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- modHandlesList.add(component);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modHandlesList);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
- Map<IVirtualComponent, String> uriMap = new HashMap<IVirtualComponent, String>();
- uriMap.put(component, archiveName);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
- return model.getDefaultOperation();
- }
-
- protected IDataModelProvider getRemoveReferenceDataModelProvider(IVirtualComponent component) {
- return new RemoveReferenceComponentsDataModelProvider();
- }
-
-
- protected void handleChanged(ArrayList<IVirtualComponent> changed) {
- Iterator<IVirtualComponent> i = changed.iterator();
- IVirtualComponent component;
- IVirtualReference ref;
- IPath p;
- while(i.hasNext()) {
- component = i.next();
- ref = rootComponent.getReference(component.getName());
- p = new Path(objectToRuntimePath.get(component));
- ref.setRuntimePath(p);
- }
- }
-
- protected void handleAdded(ArrayList<IVirtualComponent> added) {
- final ArrayList<IVirtualComponent> components = new ArrayList<IVirtualComponent>();
- Iterator<IVirtualComponent> i = added.iterator();
- IVirtualComponent o;
- while(i.hasNext()) {
- o = i.next();
- components.add((IVirtualComponent)o);
- }
-
- IWorkspaceRunnable runnable = new IWorkspaceRunnable(){
- public void run(IProgressMonitor monitor) throws CoreException{
- addComponents(components);
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(runnable, new NullProgressMonitor());
- } catch( CoreException e ) {
- WTPOveridePlugin.logError(e);
- }
- }
-
- protected void addComponents(ArrayList<IVirtualComponent> components) throws CoreException {
- Iterator<IVirtualComponent> i = components.iterator();
- while(i.hasNext()) {
- addOneComponent(i.next());
- }
- }
-
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
- return new CreateReferenceComponentsDataModelProvider();
- }
-
- protected void addOneComponent(IVirtualComponent component) throws CoreException {
- String path, archiveName;
- path = archiveName = null;
- if( !consumedReferences.contains(component)) {
- path = new Path(objectToRuntimePath.get(component)).removeLastSegments(1).toString();
- archiveName = new Path(objectToRuntimePath.get(component)).lastSegment();
- } else {
- path = objectToRuntimePath.get(component);
- }
-
- IDataModelProvider provider = getAddReferenceDataModelProvider(component);
- IDataModel dm = DataModelFactory.createDataModel(provider);
-
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, rootComponent);
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, Arrays.asList(component));
-
- //[Bug 238264] the uri map needs to be manually set correctly
- if( archiveName != null ) {
- Map<IVirtualComponent, String> uriMap = new HashMap<IVirtualComponent, String>();
- uriMap.put(component, archiveName);
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
- }
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
-
- IStatus stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- if (stat != OK_STATUS)
- throw new CoreException(stat);
- try {
- dm.getDefaultOperation().execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- WTPOveridePlugin.logError(e);
- }
- }
- /**
- * Method returns the name of the given IVirtualComponent being sure the correct extension
- * is on the end of the name, this is important for internal projects. Added for [Bug 241509]
- *
- * Note (rs) : I do not believe this ever gets called with a binary virtComp
- *
- * @param virtComp the IVirtualComponent to get the name of with the correct extension
- * @return the name of the given IVirtualComponent with the correct extension
- */
- protected String getVirtualComponentNameWithExtension(IVirtualComponent virtComp) {
- String virtCompURIMapName = this.getURIMappingName(virtComp);
- String extension = ".jar";
- virtCompURIMapName += extension;
- return virtCompURIMapName;
- }
-
- /**
- * [Bug 238264]
- * determines a unique URI mapping name for a given component
- * this is in case two components have the same name.
- *
- * @return returns a valid (none duplicate) uri mapping name for the given component\
- */
- private String getURIMappingName(IVirtualComponent archive) {
-
- //get the default uri map name for the given archive
- IPath componentPath = Path.fromOSString(archive.getName());
- String uriMapName = componentPath.lastSegment().replace(' ', '_');
-
-
- //check to be sure this uri mapping is not already in use by another reference
- boolean dupeArchiveName;
- String refedCompName;
- int lastDotIndex;
- String increment;
- IVirtualReference [] existingRefs = rootComponent.getReferences();
- for(int i=0;i<existingRefs.length;i++){
- refedCompName = existingRefs[i].getReferencedComponent().getName();
-
- //if uri mapping names of the refed component and the given archive are the same
- // find a new uri map name for the given archive
- if(existingRefs[i].getArchiveName().equals(uriMapName)){
- dupeArchiveName = true;
- //find a new uriMapName for the given component
- for(int j=1; dupeArchiveName; j++){
- lastDotIndex = uriMapName.lastIndexOf('.');
- increment = "_"+j; //$NON-NLS-1$
-
- //create the new potential name
- if(lastDotIndex != -1){
- uriMapName = uriMapName.substring(0, lastDotIndex) + increment + uriMapName.substring(lastDotIndex);
- } else {
- uriMapName = uriMapName.substring(0)+increment;
- }
-
- //determine if the new potential name is valid
- for(int k=0; k<existingRefs.length; k++) {
- dupeArchiveName = existingRefs[k].getArchiveName().equals(uriMapName);
- if(dupeArchiveName) {
- break;
- }
- }
- }
- }
- }
-
- return uriMapName;
- }
-
- public void labelProviderChanged(LabelProviderChangedEvent event) {
- if(!availableComponentsViewer.getTable().isDisposed())
- availableComponentsViewer.refresh(true);
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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
- * Stefan Dimov, stefan.dimov at sap.com - bug 207826
- *******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.jboss.ide.eclipse.as.wtp.ui.WTPOveridePlugin;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
-
-
-/*
- * The only valid elements this content provider (should) provide
- * are IProject or IVirtualComponent objects. The runtime paths portion is
- * shared with the preference page itself where they can both modify the data.
- *
- * This provider no longer "meddles" in to the content as it used to,
- * but rather serves as only a view of it.
- */
-public class ComponentDependencyContentProvider extends LabelProvider implements IStructuredContentProvider, ITableLabelProvider {
-
- final static String PATH_SEPARATOR = String.valueOf(IPath.SEPARATOR);
-
- private HashMap<IVirtualComponent, String> runtimePaths;
- private ArrayList<ComponentResourceProxy> resourceMappings;
- private DecoratingLabelProvider decProvider = new DecoratingLabelProvider(
- new WorkbenchLabelProvider(), PlatformUI.getWorkbench().
- getDecoratorManager().getLabelDecorator());
- private IVirtualComponentLabelProvider[] delegates;
- public ComponentDependencyContentProvider(AddModuleDependenciesPropertiesPage addModuleDependenciesPropertiesPage) {
- super();
- decProvider.addListener(addModuleDependenciesPropertiesPage);
- delegates = DependencyPageExtensionManager.loadDelegates();
- }
-
- public void setRuntimePaths(HashMap<IVirtualComponent, String> paths) {
- this.runtimePaths = paths;
- }
-
- public void setResourceMappings(ArrayList<ComponentResourceProxy> mappings) {
- this.resourceMappings = mappings;
- }
-
- public Object[] getElements(Object inputElement) {
- Object[] empty = new Object[0];
- if( !(inputElement instanceof IWorkspaceRoot))
- return empty;
- ArrayList<Object> list = new ArrayList<Object>();
- list.addAll(resourceMappings);
- list.addAll(runtimePaths.keySet());
- return list.toArray();
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if( element instanceof ComponentResourceProxy) {
- return WTPOveridePlugin.getInstance().getImage("folder");
- }
- if (element instanceof IVirtualComponent) {
- if (columnIndex == 0)
- return WTPOveridePlugin.getInstance().getImage("jar_obj");
- else
- return handleSourceImage((IVirtualComponent)element);
- }
- if (element instanceof IProject){
- return decProvider.getImage(element);
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if( element instanceof ComponentResourceProxy) {
- if( columnIndex == 0 )
- return ((ComponentResourceProxy)element).runtimePath.toString();
- else if( columnIndex == 1 )
- return ((ComponentResourceProxy)element).source.toString();
- }
- if (element instanceof IVirtualComponent) {
- IVirtualComponent comp = (IVirtualComponent)element;
- if (columnIndex == 0) {
- if( runtimePaths == null || runtimePaths.get(element) == null) {
- return new Path(PATH_SEPARATOR).toString();
- }
- return runtimePaths.get(element);
- } else if (columnIndex == 1) {
- return handleSourceText(comp);
- }
- } else if (element instanceof IProject){
- if (columnIndex == 0) {
- if( runtimePaths == null || runtimePaths.get(element) == null) {
- return new Path(PATH_SEPARATOR).toString();
- }
- return runtimePaths.get(element);
- } else {
- return ((IProject)element).getName();
- }
- }
- return null;
- }
-
-
-
- private String handleSourceText(IVirtualComponent component) {
- if( delegates != null ) {
- for( int i = 0; i < delegates.length; i++ )
- if( delegates[i].canHandle(component))
- return delegates[i].getSourceText(component);
- }
-
- // default impl
- if( component.isBinary() && component instanceof VirtualArchiveComponent) {
- IPath p = ((VirtualArchiveComponent)component).getWorkspaceRelativePath();
- if( p == null )
- p = new Path(((VirtualArchiveComponent)component).getUnderlyingDiskFile().getAbsolutePath());
- return p.toString();
- }
- return component.getProject().getName();
- }
-
- private Image handleSourceImage(IVirtualComponent component) {
- if( delegates != null ) {
- for( int i = 0; i < delegates.length; i++ )
- if( delegates[i].canHandle(component))
- return delegates[i].getSourceImage(component);
- }
-
- // default impl
- if(component.isBinary())
- return WTPOveridePlugin.getInstance().getImage("jar_obj");
- else return decProvider.getImage(component.getProject());
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,160 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.ui.WTPOveridePlugin;
-
-public class DependencyPageExtensionManager {
- private static DependencyPageExtensionManager manager = null;
- public static DependencyPageExtensionManager getManager() {
- if( manager == null )
- manager = new DependencyPageExtensionManager();
- return manager;
- }
-
- private HashMap<String, IDependencyPageProvider> providers = null;
-
- public IDependencyPageProvider getProvider(IFacetedProject project) {
- if( providers == null )
- loadProviders();
- Iterator<IDependencyPageProvider> i = providers.values().iterator();
- IDependencyPageProvider temp;
- while(i.hasNext()) {
- temp = i.next();
- if( temp.canHandle(project))
- return temp;
- }
- return null;
- }
-
- private void loadProviders() {
- HashMap<String, IDependencyPageProvider> temp = new HashMap<String, IDependencyPageProvider>();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(
- WTPOveridePlugin.PLUGIN_ID, "moduleDependencyPropertyPage"); //$NON-NLS-1$
- for( int i = 0; i < cf.length; i++ ) {
- try {
- temp.put(cf[i].getAttribute("id"), //$NON-NLS-1$
- (IDependencyPageProvider)cf[i].createExecutableExtension("class")); //$NON-NLS-1$
- } catch( CoreException ce ) {}
- }
- providers = temp;
- }
-
- public WizardFragment[] loadAllReferenceWizardFragments() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(
- WTPOveridePlugin.PLUGIN_ID, "referenceWizardFragment"); //$NON-NLS-1$
- ArrayList<WizardFragment> list = new ArrayList<WizardFragment>();
- for( int i = 0; i < cf.length; i++ ) {
- try {
- list.add((WizardFragment)cf[i].createExecutableExtension("class"));
- } catch( CoreException ce) {}
- }
- return (WizardFragment[]) list.toArray(new WizardFragment[list.size()]);
- }
-
- public WizardFragment loadReferenceWizardFragment(String id) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(
- WTPOveridePlugin.PLUGIN_ID, "referenceWizardFragment"); //$NON-NLS-1$
- for( int i = 0; i < cf.length; i++ ) {
- if( cf[i].getAttribute("id").equals(id))
- try {
- return (WizardFragment)cf[i].createExecutableExtension("class");
- } catch( CoreException ce) {}
- }
- return null;
- }
-
- public ReferenceExtension[] getReferenceExtensions() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(
- WTPOveridePlugin.PLUGIN_ID, "referenceWizardFragment"); //$NON-NLS-1$
- ArrayList<ReferenceExtension> list = new ArrayList<ReferenceExtension>();
- for( int i = 0; i < cf.length; i++ ) {
- list.add(new ReferenceExtension(cf[i]));
- }
- return (ReferenceExtension[]) list
- .toArray(new ReferenceExtension[list.size()]);
- }
-
- public class ReferenceExtension {
- private IConfigurationElement element;
- private String id, name, imageLoc;
- private Image image;
- public ReferenceExtension(IConfigurationElement element) {
- this.element = element;
- this.id = element.getAttribute("id");
- this.name = element.getAttribute("name");
- this.imageLoc = element.getAttribute("icon");
- }
- public String getId() { return this.id;}
- public String getName() { return this.name; }
- public Image getImage() {
- if( image == null ) {
- if( imageLoc != null && element.getContributor().getName() != null) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor().getName(), imageLoc);
- if( desc != null )
- image = desc.createImage();
- }
- }
- return image;
- }
- public void disposeImage() {
- if( image != null ) {
- image.dispose();
- image = null;
- }
- }
- }
-
-
- public static IVirtualComponentLabelProvider[] loadDelegates() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(
- WTPOveridePlugin.PLUGIN_ID, "virtualComponentLabelProvider"); //$NON-NLS-1$
- List<IConfigurationElement> list = Arrays.asList(cf);
- Comparator c = new Comparator<IConfigurationElement>() {
- public int compare(IConfigurationElement o1,
- IConfigurationElement o2) {
- String o1String, o2String;
- int o1int, o2int;
- o1String=o1.getAttribute("weight");
- o2String=o2.getAttribute("weight");
- o1int = Integer.parseInt(o1String);
- o2int = Integer.parseInt(o1String);
- return o1int-o2int;
- }
- };
- Collections.sort(list, c);
- ArrayList<IVirtualComponentLabelProvider> retList = new ArrayList<IVirtualComponentLabelProvider>();
- Iterator<IConfigurationElement> i = list.iterator();
- while(i.hasNext()) {
- try {
- retList.add((IVirtualComponentLabelProvider)i.next().createExecutableExtension("class"));
- } catch( CoreException ce) {
- // log
- }
- }
- return (IVirtualComponentLabelProvider[]) retList
- .toArray(new IVirtualComponentLabelProvider[retList.size()]);
- }
-
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExportedClasspathFoldersReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExportedClasspathFoldersReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExportedClasspathFoldersReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,219 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.internal.classpathdep.UpdateClasspathAttributesDataModelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.SharedImages;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.core.vcf.ExportedClasspathFoldersVirtualComponent;
-
-public class ExportedClasspathFoldersReferenceWizardFragment
- extends WizardFragment implements IReferenceEditor {
-
- protected TreeViewer viewer;
- protected IPath[] paths;
- protected IWizardHandle handle;
- protected IStructuredSelection selected = null;
- protected IStructuredSelection initialSelection = null;
- protected Object[] allElements;
- public ExportedClasspathFoldersReferenceWizardFragment() {
- super();
- }
-
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- this.handle = handle;
- handle.setTitle("Add exported folders from the build pathx");
- handle.setDescription("This reference will allow you to add references to exported classpaths from this project's build page. Please select all entries you wish to be published.");
- IVirtualComponent parentComp = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- IProject project = parentComp.getProject();
- IJavaProject javaProject = JavaCore.create(project);
- allElements = findAllClassFolderEntries(javaProject);
-
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FormLayout());
- viewer = new TreeViewer(c, SWT.MULTI | SWT.BORDER);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(getLabelProvider());
- viewer.setInput(ResourcesPlugin.getWorkspace());
-
- FormData fd = new FormData();
- fd.left = new FormAttachment(0, 5);
- fd.top = new FormAttachment(0, 5);
- fd.right = new FormAttachment(100, -5);
- fd.bottom = new FormAttachment(100, -5);
- viewer.getTree().setLayoutData(fd);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- selected = (IStructuredSelection)viewer.getSelection();
- }
- });
-
- ArrayList<IClasspathEntry> withTag = new ArrayList<IClasspathEntry>();
- for( int i = 0; i < allElements.length; i++ ) {
- IClasspathAttribute attribute = ClasspathDependencyUtil.checkForComponentDependencyAttribute(
- ((IClasspathEntry)allElements[i]),
- ClasspathDependencyUtil.DependencyAttributeType.CLASSPATH_COMPONENT_DEPENDENCY);
-
- if( attribute != null )
- withTag.add((IClasspathEntry)allElements[i]);
- }
-
- StructuredSelection newSel = new StructuredSelection(withTag);
- viewer.setSelection(newSel);
- initialSelection = newSel;
- return c;
- }
-
- protected IClasspathEntry[] findAllClassFolderEntries(IJavaProject javaProject) {
- List<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- try {
- IClasspathEntry[] entries = javaProject.getRawClasspath();
- for( int i = 0; i < entries.length; i++ ) {
- if( ClasspathDependencyUtil.isClassFolderEntry(entries[i]))
- list.add(entries[i]);
- }
- } catch( CoreException ce) {
- }
- return list.toArray(new IClasspathEntry[list.size()]);
- }
-
- private ITreeContentProvider getContentProvider() {
- return new ITreeContentProvider() {
- public Object[] getElements(Object inputElement) {
- IVirtualComponent parentComp = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- IProject project = parentComp.getProject();
- IJavaProject jp = JavaCore.create(project);
- if( jp != null ) {
- return findAllClassFolderEntries(jp);
- }
- return new Object[]{};
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object getParent(Object element) {
- return null;
- }
- public Object[] getChildren(Object parentElement) {
- return null;
- }
- };
- }
-
- private LabelProvider getLabelProvider() {
- return new LabelProvider() {
- public Image getImage(Object element) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
- }
- public String getText(Object element) {
- return element instanceof IProject ? ((IProject)element).getName() : element.toString();
- }
- };
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- IVirtualComponent parentComp = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- try {
- Map<IClasspathEntry, IPath> toAdd = new HashMap<IClasspathEntry, IPath>();
- Map<IClasspathEntry, IPath> toRemove = new HashMap<IClasspathEntry, IPath>();
-
- List pre = Arrays.asList(initialSelection.toArray());
- List post = Arrays.asList(selected.toArray());
- for( int i = 0; i < allElements.length; i++ ) {
- if( pre.contains(allElements[i]) && !post.contains(allElements[i])) {
- toRemove.put((IClasspathEntry)allElements[i], getOriginalPath((IClasspathEntry)allElements[i]));
- }
- else if( !pre.contains(allElements[i]) && post.contains(allElements[i])) {
- toAdd.put((IClasspathEntry)allElements[i], getNewPath((IClasspathEntry)allElements[i]));
- }
- }
-
- UpdateClasspathAttributesDataModelProvider provider = new UpdateClasspathAttributesDataModelProvider();
- IDataModel model = DataModelFactory.createDataModel(provider);
- model.setProperty(UpdateClasspathAttributesDataModelProvider.PROJECT_NAME, parentComp.getProject().getName());
- model.setProperty(UpdateClasspathAttributesDataModelProvider.ENTRIES_TO_ADD_ATTRIBUTE, toAdd);
- model.getDefaultOperation().execute(new NullProgressMonitor(), null);
-
- provider = new UpdateClasspathAttributesDataModelProvider();
- model = DataModelFactory.createDataModel(provider);
- model.setProperty(UpdateClasspathAttributesDataModelProvider.PROJECT_NAME, parentComp.getProject().getName());
- model.setProperty(UpdateClasspathAttributesDataModelProvider.ENTRIES_TO_REMOVE_ATTRIBUTE, toRemove);
- model.getDefaultOperation().execute(new NullProgressMonitor(), null);
-
- } catch( ExecutionException ee) {
-
- }
-
- ExportedClasspathFoldersVirtualComponent vc = new ExportedClasspathFoldersVirtualComponent(parentComp.getProject(), parentComp);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, vc);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, "/");
- getTaskModel().putObject(NewReferenceWizard.DEPENDENCY_TYPE, DependencyType.CONSUMES_LITERAL);
- }
-
- protected IPath getOriginalPath(IClasspathEntry entry) {
- final IClasspathAttribute[] attributes = entry.getExtraAttributes();
- for (int i = 0; i < attributes.length; i++) {
- final IClasspathAttribute attribute = attributes[i];
- final String name = attribute.getName();
- if (name.equals(ClasspathDependencyUtil.CLASSPATH_COMPONENT_DEPENDENCY)) {
- return new Path(attribute.getValue());
- }
- }
- return new Path("/");
- }
-
- protected IPath getNewPath(IClasspathEntry cpe) {
- return new Path("/");
- }
-
- public boolean canEdit(IVirtualComponent vc) {
- if( vc instanceof ExportedClasspathFoldersVirtualComponent )
- return true;
- return false;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExternalJarReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExternalJarReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ExternalJarReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,51 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-
-public class ExternalJarReferenceWizardFragment extends JarReferenceWizardFragment {
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add an External Jar Reference");
- handle.setDescription("Here you can reference a filesystem Jar\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
- return c;
- }
-
- protected void buttonPressed() {
- selected = BuildPathDialogAccess
- .chooseExternalJAREntries(browse.getShell());
- viewer.refresh();
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- IVirtualComponent rootComponent = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- if (selected != null && selected.length > 0) {
- ArrayList<IVirtualComponent> compList = new ArrayList<IVirtualComponent>();
- ArrayList<String> paths = new ArrayList<String>();
- for (int i = 0; i < selected.length; i++) {
- // IPath fullPath = project.getFile(selected[i]).getFullPath();
- String type = VirtualArchiveComponent.LIBARCHIVETYPE
- + IPath.SEPARATOR;
- IVirtualComponent archive = ComponentCore
- .createArchiveComponent(rootComponent.getProject(),
- type + selected[i].toString());
- compList.add(archive);
- paths.add(selected[i].lastSegment());
- }
- IVirtualComponent[] components = (IVirtualComponent[]) compList.toArray(new IVirtualComponent[compList.size()]);
- String[] paths2 = (String[]) paths.toArray(new String[paths.size()]);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, components);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, paths2);
- }
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IDependencyPageProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IDependencyPageProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IDependencyPageProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,10 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-
-public interface IDependencyPageProvider {
- public boolean canHandle(IFacetedProject project);
- public IModuleDependenciesControl[] createPages(IFacetedProject project, ModuleAssemblyRootPage parent);
- public Composite createRootControl(IModuleDependenciesControl[] pages, Composite parent);
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IModuleDependenciesControl.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IModuleDependenciesControl.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IModuleDependenciesControl.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,42 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.swt.widgets.Composite;
-
-public interface IModuleDependenciesControl {
- /**
- * Creates the Composite associated with this control.
- * @param parent Parent Composite.
- * @return Composite for the control.
- */
- Composite createContents(Composite parent);
-
- /**
- * Called when the property page's <code>performOk()</code> method is called.
- * @return
- */
- boolean performOk();
-
- /**
- * Called when the property page's <code>performDefaults()</code> method is called.
- * @return
- */
- void performDefaults();
-
- /**
- * Called when the property page's <code>performCancel()</code> method is called.
- * @return
- */
- boolean performCancel();
-
- /**
- * Called when the property page's <code>setVisible()</code> method is called.
- * @return
- */
- void setVisible(boolean visible);
-
- /**
- * Called when the property page's <code>dispose()</code> method is called.
- * @return
- */
- void dispose();
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IReferenceEditor.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IReferenceEditor.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IReferenceEditor.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,7 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public interface IReferenceEditor {
- public boolean canEdit(IVirtualComponent vc);
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,10 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public interface IVirtualComponentLabelProvider {
- public boolean canHandle(IVirtualComponent component);
- public String getSourceText(IVirtualComponent component);
- public Image getSourceImage(IVirtualComponent component);
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/JarReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/JarReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/JarReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,149 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-
-public class JarReferenceWizardFragment extends WizardFragment {
- protected LabelProvider labelProvider = null;
- protected ITreeContentProvider contentProvider = null;
- protected TreeViewer viewer;
- protected Button browse;
- protected IPath[] paths;
- protected IWizardHandle handle;
- protected IPath[] selected = new IPath[]{};
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- this.handle = handle;
- handle.setTitle("Add a Jar Reference");
- handle.setDescription("Here you can reference a workspace Jar\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
-
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FormLayout());
- viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(getLabelProvider());
- viewer.setInput(ResourcesPlugin.getWorkspace());
-
- browse = new Button(c, SWT.NONE);
- browse.setText("Browse...");
- FormData fd = new FormData();
- fd.left = new FormAttachment(0, 5);
- fd.bottom = new FormAttachment(100, -5);
- browse.setLayoutData(fd);
-
- fd = new FormData();
- fd.left = new FormAttachment(0, 5);
- fd.top = new FormAttachment(0, 5);
- fd.right = new FormAttachment(100, -5);
- fd.bottom = new FormAttachment(browse, -5);
- viewer.getTree().setLayoutData(fd);
-
- browse.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- buttonPressed();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
- return c;
- }
-
- protected void buttonPressed() {
- IProject project = (IProject)getTaskModel().getObject(NewReferenceWizard.PROJECT);
- selected = BuildPathDialogAccess.chooseJAREntries(
- browse.getShell(),
- project.getLocation(), new IPath[0]);
- viewer.refresh();
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- IVirtualComponent rootComponent = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- if (selected != null && selected.length > 0) {
- ArrayList<IVirtualComponent> compList = new ArrayList<IVirtualComponent>();
- ArrayList<String> paths = new ArrayList<String>();
- for (int i = 0; i < selected.length; i++) {
- // IPath fullPath = project.getFile(selected[i]).getFullPath();
- String type = VirtualArchiveComponent.LIBARCHIVETYPE
- + IPath.SEPARATOR;
- IVirtualComponent archive = ComponentCore
- .createArchiveComponent(rootComponent.getProject(),
- type + selected[i].makeRelative().toString());
- compList.add(archive);
- paths.add(selected[i].lastSegment());
- }
- IVirtualComponent[] components = (IVirtualComponent[]) compList.toArray(new IVirtualComponent[compList.size()]);
- String[] paths2 = (String[]) paths.toArray(new String[paths.size()]);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, components);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, paths2);
- }
- }
-
- protected LabelProvider getLabelProvider() {
- if (labelProvider == null) {
- labelProvider = new LabelProvider() {
- public Image getImage(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- return element == null ? "" : element.toString();//$NON-NLS-1$
- }
- };
- }
- return labelProvider;
- }
-
- protected ITreeContentProvider getContentProvider() {
- if (contentProvider == null) {
- contentProvider = new ITreeContentProvider() {
- public Object[] getElements(Object inputElement) {
- return selected == null ? new Object[]{} : selected;
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object getParent(Object element) {
- return null;
- }
- public Object[] getChildren(Object parentElement) {
- return null;
- }
- };
- }
- return contentProvider;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ModuleAssemblyRootPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ModuleAssemblyRootPage.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ModuleAssemblyRootPage.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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 implementation as prop page heirarchy
- * rfrost at bea.com - conversion to single property page impl
- *******************************************************************************/
-
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * Primary project property page for Module dependencies;
- */
-public class ModuleAssemblyRootPage extends PropertyPage {
-
- private IProject project;
- private IModuleDependenciesControl[] controls = new IModuleDependenciesControl[0];
-
- public ModuleAssemblyRootPage() {
- super();
- }
-
- private Composite getFacetErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "Error Checking Project Facets";
- setErrorMessage(errorCheckingFacet);
- return getErrorComposite(parent, errorCheckingFacet);
- }
- private Composite getVirtCompErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "The given project is not a virtual component project";
- setErrorMessage(errorCheckingFacet);
- return getErrorComposite(parent, errorCheckingFacet);
- }
-
-
- private Composite getErrorComposite(final Composite parent, final String error) {
- final Composite composite = new Composite(parent, SWT.NONE);
- final GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- final Label label= new Label(composite, SWT.NONE);
- label.setText(error);
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- if (!controls[i].performOk()) {
- return false;
- }
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- public void performDefaults() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- controls[i].performDefaults();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performCancel()
- */
- public boolean performCancel() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- if (!controls[i].performCancel()) {
- return false;
- }
- }
- }
- return super.performCancel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- controls[i].setVisible(visible);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- public void dispose() {
- super.dispose();
- for (int i = 0; i < controls.length; i++) {
- if(controls[i] != null){
- controls[i].dispose();
- }
- }
- }
-
- protected static void createDescriptionComposite(final Composite parent, final String description) {
- Composite descriptionComp = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- descriptionComp.setLayout(layout);
- descriptionComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fillDescription(descriptionComp, description);
- }
-
- private static void fillDescription(Composite c, String s) {
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 250;
- Text text = new Text(c, SWT.READ_ONLY | SWT.WRAP);
- text.setLayoutData(data);
- text.setText(s);
- }
-
- protected Control createContents(Composite parent) {
-
- // Need to find out what type of project we are handling
- project = (IProject) getElement().getAdapter(IResource.class);
- if( project != null ) {
- try {
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- IDependencyPageProvider provider = null;
- if( facetedProject == null )
- return getFacetErrorComposite(parent);
-
- provider = DependencyPageExtensionManager.getManager().getProvider(facetedProject);
- if( provider != null ) {
- controls = provider.createPages(facetedProject, this);
- return provider.createRootControl(controls, parent);
- }
-
- if( ComponentCore.createComponent(project) == null )
- return getVirtCompErrorComposite(parent);
-
- AddModuleDependenciesPropertiesPage page = new AddModuleDependenciesPropertiesPage(project, this);
- controls = new IModuleDependenciesControl[1];
- controls[0] = page;
- return page.createContents(parent);
- } catch( CoreException ce ) {
- }
- }
- return getFacetErrorComposite(parent);
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceRootWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceRootWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceRootWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,152 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.DependencyPageExtensionManager.ReferenceExtension;
-
-public class NewReferenceRootWizardFragment extends WizardFragment {
- protected Map<String, WizardFragment> fragmentMap =
- new HashMap<String, WizardFragment>();
- private IWizardHandle wizard;
- private TreeViewer viewer;
- private ReferenceExtension[] extensions = null;
- public NewReferenceRootWizardFragment(ReferenceExtension[] extensions) {
- if( extensions == null )
- this.extensions = DependencyPageExtensionManager.getManager().getReferenceExtensions();
- else
- this.extensions = extensions;
- }
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle wizard) {
- this.wizard = wizard;
- wizard.setTitle("Select a reference type");
- wizard.setDescription("Here you can select one of many types of references to add");
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FillLayout());
- viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
- viewer.setLabelProvider(getLabelProvider());
- viewer.setContentProvider(getContentProvider());
- viewer.setInput(ResourcesPlugin.getWorkspace());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- viewerSelectionChanged();
- }
- });
- return c;
- }
-
- protected void viewerSelectionChanged() {
- wizard.update();
- }
-
- protected WizardFragment getWizardFragment(String extensionPointID) {
- try {
- WizardFragment fragment = fragmentMap.get(extensionPointID);
- if (fragment != null)
- return fragment;
- } catch (Exception e) {
- // ignore
- }
-
- WizardFragment fragment = DependencyPageExtensionManager.getManager().loadReferenceWizardFragment(extensionPointID);
- if (fragment != null)
- fragmentMap.put(extensionPointID, fragment);
- return fragment;
- }
-
- public List getChildFragments() {
- List<WizardFragment> listImpl = new ArrayList<WizardFragment>();
- createChildFragments(listImpl);
- return listImpl;
- }
-
- protected void createChildFragments(List<WizardFragment> list) {
- // Instantiate and add the fragment for the current ID
- if( viewer != null ) {
- IStructuredSelection sel = (IStructuredSelection)viewer.getSelection();
- ReferenceExtension selected = (ReferenceExtension)sel.getFirstElement();
- if( selected != null ) {
- WizardFragment child = getWizardFragment(selected.getId());
- if( child != null )
- list.add(child);
- }
- }
- }
-
- public boolean isComplete() {
- return true;
- }
-
-
- private LabelProvider labelProvider = null;
- private ITreeContentProvider contentProvider = null;
- protected LabelProvider getLabelProvider() {
- if( labelProvider == null ) {
- labelProvider = new LabelProvider() {
- public Image getImage(Object element) {
- if( element instanceof ReferenceExtension)
- return ((ReferenceExtension)element).getImage();
- return null;
- }
- public String getText(Object element) {
- if( element instanceof ReferenceExtension)
- return ((ReferenceExtension)element).getName();
- return element == null ? "" : element.toString();//$NON-NLS-1$
- }
- public void dispose() {
- super.dispose();
- if( extensions != null ) {
- for( int i = 0; i < extensions.length; i++) {
- extensions[i].disposeImage();
- }
- }
- }
- };
- }
- return labelProvider;
- }
-
- protected ITreeContentProvider getContentProvider() {
- if( contentProvider == null ) {
- contentProvider = new ITreeContentProvider() {
- public Object[] getElements(Object inputElement) {
- return extensions;
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object getParent(Object element) {
- return null;
- }
- public Object[] getChildren(Object parentElement) {
- return null;
- }
- };
- }
- return contentProvider;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceWizard.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/NewReferenceWizard.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.DependencyPageExtensionManager.ReferenceExtension;
-
-public class NewReferenceWizard extends TaskWizard {
-
- public static final String COMPONENT = "dependency.component";
- public static final String COMPONENT_PATH = "dependency.component.path";
- public static final String PROJECT = "root.project";
- public static final String ROOT_COMPONENT = "root.component";
- public static final String DEPENDENCY_TYPE = "dependency.type";
-
-
- public NewReferenceWizard(ReferenceExtension[] extensions) {
- super("New Reference Wizard", new RootWizardFragment(extensions));
- getRootFragment().setTaskModel(getTaskModel());
- }
-
- protected static class RootWizardFragment extends WizardFragment {
- private ReferenceExtension[] extensions;
- public RootWizardFragment(ReferenceExtension[] extensions) {
- this.extensions = extensions;
- }
- protected void createChildFragments(List<WizardFragment> list) {
- IVirtualComponent component = (IVirtualComponent)getTaskModel().getObject(COMPONENT);
- if( component == null )
- list.add(new NewReferenceRootWizardFragment(extensions));
- else {
- WizardFragment fragment = getFirstEditingFragment(component);
- if( fragment != null )
- list.add(fragment);
- }
- }
- }
-
- public static WizardFragment getFirstEditingFragment(IVirtualComponent component ) {
- WizardFragment[] frags = DependencyPageExtensionManager.getManager().loadAllReferenceWizardFragments();
- for( int i = 0; i < frags.length; i++ ) {
- if( frags[i] instanceof IReferenceEditor ) {
- if( ((IReferenceEditor)frags[i]).canEdit(component)) {
- // accept first one
- return frags[i];
- }
- }
- }
- return null;
- }
-
- public void init(IWorkbench newWorkbench, IStructuredSelection newSelection) {
- // do nothing
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/OutputFolderReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/OutputFolderReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/OutputFolderReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,122 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.SharedImages;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.wtp.core.vcf.OutputFoldersVirtualComponent;
-
-public class OutputFolderReferenceWizardFragment extends WizardFragment implements IReferenceEditor {
-
- protected TreeViewer viewer;
- protected IPath[] paths;
- protected IWizardHandle handle;
- protected IProject selected = null;
- public OutputFolderReferenceWizardFragment() {
- super();
- }
-
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- this.handle = handle;
- handle.setTitle("Add output folders");
- handle.setDescription("This reference will add in all source folder outputs from the selected project.");
-
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FormLayout());
- viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(getLabelProvider());
- viewer.setInput(ResourcesPlugin.getWorkspace());
-
- FormData fd = new FormData();
- fd.left = new FormAttachment(0, 5);
- fd.top = new FormAttachment(0, 5);
- fd.right = new FormAttachment(100, -5);
- fd.bottom = new FormAttachment(100, -5);
- viewer.getTree().setLayoutData(fd);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection sel = (IStructuredSelection)viewer.getSelection();
- selected = (IProject)sel.getFirstElement();
- }
- });
-
- IVirtualComponent vc = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.COMPONENT);
- if( vc != null )
- selected = vc.getProject();
- return c;
- }
-
- private ITreeContentProvider getContentProvider() {
- return new ITreeContentProvider() {
- public Object[] getElements(Object inputElement) {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object getParent(Object element) {
- return null;
- }
- public Object[] getChildren(Object parentElement) {
- return null;
- }
- };
- }
-
- private LabelProvider getLabelProvider() {
- return new LabelProvider() {
- public Image getImage(Object element) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
- }
- public String getText(Object element) {
- return element instanceof IProject ? ((IProject)element).getName() : element.toString();
- }
- };
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- IVirtualComponent parentComp = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- selected = selected == null ? parentComp.getProject() : selected;
- OutputFoldersVirtualComponent vc = new OutputFoldersVirtualComponent(selected, parentComp);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, vc);
- getTaskModel().putObject(NewReferenceWizard.DEPENDENCY_TYPE, DependencyType.CONSUMES_LITERAL);
- String s = (String)getTaskModel().getObject(NewReferenceWizard.COMPONENT_PATH);
- if( s == null )
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, "/");
- }
-
- public boolean canEdit(IVirtualComponent vc) {
- if( vc instanceof OutputFoldersVirtualComponent )
- return true;
- return false;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ProjectReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ProjectReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ProjectReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,144 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.project.facet.IJavaProjectMigrationDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.JavaProjectMigrationDataModelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-
-public class ProjectReferenceWizardFragment extends WizardFragment {
- private LabelProvider labelProvider = null;
- private ITreeContentProvider contentProvider = null;
- private TreeViewer viewer;
- private IProject selected;
-
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- handle.setTitle("Add a Project Reference");
- handle.setDescription("Here you can make a project into a reference.\n" +
- "If the project is not already a flexible project, it will be converted into one.");
-
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FillLayout());
- viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
- viewer.setContentProvider(getContentProvider());
- viewer.setLabelProvider(getLabelProvider());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- selChanged();
- }
- });
- viewer.setInput(ResourcesPlugin.getWorkspace());
- return c;
- }
-
- private void selChanged() {
- if( viewer != null ) {
- IStructuredSelection sel = (IStructuredSelection)viewer.getSelection();
- if( sel != null )
- selected = (IProject)sel.getFirstElement();
- }
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- if( !ModuleCoreNature.isFlexibleProject(selected)) {
- try {
- IDataModel migrationdm = DataModelFactory.createDataModel(new JavaProjectMigrationDataModelProvider());
- migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.PROJECT_NAME, selected.getName());
- migrationdm.getDefaultOperation().execute(new NullProgressMonitor(), null);
- } catch( ExecutionException ee) {
- // TODO something
- }
- }
- IVirtualComponent comp = ComponentCore.createComponent(selected);
- String path = selected.getName();
- String extension = ".jar";
- path += extension;
-
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, comp);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, path);
- }
-
-
- protected LabelProvider getLabelProvider() {
- if( labelProvider == null ) {
- labelProvider = new LabelProvider() {
- public Image getImage(Object element) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT);
- }
- public String getText(Object element) {
- if( element instanceof IProject )
- return ((IProject)element).getName();
- return element == null ? "" : element.toString();//$NON-NLS-1$
- }
- };
- }
- return labelProvider;
- }
-
- protected ITreeContentProvider getContentProvider() {
- if( contentProvider == null ) {
- contentProvider = new ITreeContentProvider() {
- public Object[] getElements(Object inputElement) {
- IProject root = (IProject)getTaskModel().getObject(NewReferenceWizard.PROJECT);
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- ArrayList<IProject> list = new ArrayList<IProject>(Arrays.asList(projects));
- Iterator<IProject> i = list.iterator();
- IProject p;
- while(i.hasNext()) {
- p = i.next();
- if( !p.isOpen())
- i.remove();
- else if( p.equals(root))
- i.remove();
- }
- return (IProject[]) list.toArray(new IProject[list.size()]);
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public void dispose() {
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object getParent(Object element) {
- return null;
- }
- public Object[] getChildren(Object parentElement) {
- return null;
- }
- };
- }
- return contentProvider;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/VariableReferenceWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/VariableReferenceWizardFragment.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/VariableReferenceWizardFragment.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,56 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-
-public class VariableReferenceWizardFragment extends JarReferenceWizardFragment {
- public Composite createComposite(Composite parent, IWizardHandle handle) {
- Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add a Variable Reference");
- handle.setDescription("Here you can reference a variable which maps to a single jar.\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
- return c;
- }
-
- protected void buttonPressed() {
- selected = BuildPathDialogAccess.chooseVariableEntries(
- browse.getShell(), new Path[0]);
- viewer.refresh();
- }
-
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- IVirtualComponent rootComponent = (IVirtualComponent)getTaskModel().getObject(NewReferenceWizard.ROOT_COMPONENT);
- if (selected != null && selected.length > 0) {
- ArrayList<IVirtualComponent> compList = new ArrayList<IVirtualComponent>();
- ArrayList<String> paths = new ArrayList<String>();
- for (int i = 0; i < selected.length; i++) {
- IPath resolvedPath = JavaCore.getResolvedVariablePath(selected[i]);
- java.io.File file = new java.io.File(resolvedPath.toOSString());
- if (file.isFile() && file.exists()) {
- String type = VirtualArchiveComponent.VARARCHIVETYPE
- + IPath.SEPARATOR;
- IVirtualComponent archive = ComponentCore
- .createArchiveComponent(rootComponent.getProject(),
- type + selected[i].toString());
- compList.add(archive);
- paths.add(resolvedPath.lastSegment());
- }
- }
- IVirtualComponent[] components = (IVirtualComponent[]) compList.toArray(new IVirtualComponent[compList.size()]);
- String[] paths2 = (String[]) paths.toArray(new String[paths.size()]);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT, components);
- getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, paths2);
- }
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependenciesPropertyPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependenciesPropertyPage.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependenciesPropertyPage.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,95 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage.impl;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.AddModuleDependenciesPropertiesPage;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.DependencyPageExtensionManager;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.ModuleAssemblyRootPage;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.DependencyPageExtensionManager.ReferenceExtension;
-
-public class JEEModuleDependenciesPropertyPage extends
- AddModuleDependenciesPropertiesPage {
- public JEEModuleDependenciesPropertyPage(IProject project,
- ModuleAssemblyRootPage page) {
- super(project, page);
- }
-
- protected IVirtualReference[] getHardReferencesFromComponent(IVirtualComponent component) {
- if( component instanceof J2EEModuleVirtualComponent ) {
- return ((J2EEModuleVirtualComponent)component).getNonManifestReferences(false);
- }
- return component.getReferences();
- }
-
- protected ReferenceExtension[] getReferenceExtensions() {
- ReferenceExtension[] parents = super.getReferenceExtensions();
- ArrayList<ReferenceExtension> l = new ArrayList<ReferenceExtension>();
- for( int i = 0; i < parents.length; i++ )
- if( shouldAddReferenceType(parents[i]))
- l.add(parents[i]);
- return (ReferenceExtension[]) l.toArray(new ReferenceExtension[l.size()]);
- }
-
- protected boolean shouldAddReferenceType(ReferenceExtension extension) {
- // approved types
- String NEW_PROJ = "org.jboss.ide.eclipse.as.wtp.ui.newProjectReference";
- String JAR = "org.jboss.ide.eclipse.as.wtp.ui.jarReference";
- String EXT_JAR = "org.jboss.ide.eclipse.as.wtp.ui.externalJarReference";
- String VAR = "org.jboss.ide.eclipse.as.wtp.ui.variableReference";
- String id = extension.getId();
- if( id.equals(NEW_PROJ) || id.equals(JAR) || id.equals(EXT_JAR) || id.equals(VAR) )
- return true;
- return false;
- }
-
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
- super.handleRemoved(removed);
- if( isEar())
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- protected IDataModelProvider getRemoveReferenceDataModelProvider(IVirtualComponent component) {
- if( isEar() )
- return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
- return super.getRemoveReferenceDataModelProvider(component);
- }
-
-// protected void postAddProjects(Set moduleProjects) throws CoreException {
-// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(), moduleProjects, new NullProgressMonitor());
-// }
-
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
- if( isEar() )
- return new OverrideAddComponentToEnterpriseApplicationDataModelProvider();
- return super.getAddReferenceDataModelProvider(component);
- }
-
- protected boolean isEar() {
- return false;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependencyPageProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependencyPageProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/JEEModuleDependencyPageProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,31 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.propertypage.impl;
-
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.IDependencyPageProvider;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.IModuleDependenciesControl;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.ModuleAssemblyRootPage;
-
-public class JEEModuleDependencyPageProvider implements IDependencyPageProvider {
-
- public boolean canHandle(IFacetedProject project) {
- return J2EEProjectUtilities.isJEEProject(project.getProject())
- || J2EEProjectUtilities.isLegacyJ2EEProject(project.getProject());
- }
-
- public IModuleDependenciesControl[] createPages(IFacetedProject project,
- ModuleAssemblyRootPage parent) {
- return new IModuleDependenciesControl[] {
- new JEEModuleDependenciesPropertyPage(project.getProject(), parent)
- };
- }
-
- public Composite createRootControl(IModuleDependenciesControl[] pages,
- Composite parent) {
- if( pages.length == 1 && pages[0] != null)
- return pages[0].createContents(parent);
- return null;
- }
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -12,6 +12,10 @@
public class OverrideAddComponentToEnterpriseApplicationDataModelProvider
extends AddComponentToEnterpriseApplicationDataModelProvider {
+ public OverrideAddComponentToEnterpriseApplicationDataModelProvider() {
+ super();
+ }
+
public IDataModelOperation getDefaultOperation() {
return new OverrideAddComponentToEnterpriseApplicationOp(model);
}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/vcf/OutputFoldersLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/vcf/OutputFoldersLabelProvider.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/vcf/OutputFoldersLabelProvider.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -1,29 +0,0 @@
-package org.jboss.ide.eclipse.as.wtp.ui.vcf;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.jboss.ide.eclipse.as.wtp.core.vcf.OutputFoldersVirtualComponent;
-import org.jboss.ide.eclipse.as.wtp.ui.Messages;
-import org.jboss.ide.eclipse.as.wtp.ui.propertypage.IVirtualComponentLabelProvider;
-
-public class OutputFoldersLabelProvider implements IVirtualComponentLabelProvider {
- public OutputFoldersLabelProvider() {
- }
-
- public boolean canHandle(IVirtualComponent component) {
- return component instanceof OutputFoldersVirtualComponent;
- }
-
- public Image getSourceImage(IVirtualComponent component) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- public String getSourceText(IVirtualComponent component) {
- //OutputFoldersVirtualComponent fileset = (OutputFoldersVirtualComponent)component;
- return component.getProject().getName() + Messages.OutputFolders;
- }
-
-
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java 2012-09-14 05:02:07 UTC (rev 43677)
@@ -10,16 +10,11 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export;
-import java.util.Iterator;
-import java.util.Set;
-
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -30,14 +25,9 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.IGroup;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.ide.eclipse.as.wtp.core.util.VCFUtil;
import org.jboss.ide.eclipse.as.wtp.ui.Messages;
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2012-09-14 05:02:07 UTC (rev 43677)
@@ -39,7 +39,6 @@
org.jboss.ide.eclipse.as.classpath.core,
org.jboss.ide.eclipse.as.classpath.ui,
org.jboss.ide.eclipse.as.wtp.core,
- org.jboss.ide.eclipse.as.wtp.ui,
org.eclipse.jst.jsf.core,
org.eclipse.jpt.jpa.core,
org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0",
Modified: trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF 2012-09-14 00:42:04 UTC (rev 43676)
+++ trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF 2012-09-14 05:02:07 UTC (rev 43677)
@@ -24,7 +24,6 @@
org.jboss.ide.eclipse.as.ui;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.ui.mbeans;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.wtp.core;bundle-version="2.3.0",
- org.jboss.ide.eclipse.as.wtp.ui;bundle-version="2.3.0",
org.eclipse.core.resources,
org.eclipse.jdt.core,
org.eclipse.jdt.core.manipulation,
More information about the jbosstools-commits
mailing list