diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.navigator.ui')
86 files changed, 0 insertions, 4276 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/.cdtproject b/plugins/org.eclipse.jst.j2ee.navigator.ui/.cdtproject deleted file mode 100644 index 8e388b2da..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.cdtproject +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject>
-<data>
-<item id="cdt_indexer">
-<indexEnabled indexValue="true"/>
-</item>
-</data>
-</cdtproject>
diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/.classpath b/plugins/org.eclipse.jst.j2ee.navigator.ui/.classpath deleted file mode 100644 index 83d16d997..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="j2ee-navigator/"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/.cvsignore b/plugins/org.eclipse.jst.j2ee.navigator.ui/.cvsignore deleted file mode 100644 index c1103a145..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -bin -temp.folder -build.xml -j2ee-navigator.jar diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/.project b/plugins/org.eclipse.jst.j2ee.navigator.ui/.project deleted file mode 100644 index d856d104c..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.project +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.jst.j2ee.navigator.ui</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>com.ibm.etools.ctc.javaprojectnature</nature> - </natures> -</projectDescription> diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/build.properties b/plugins/org.eclipse.jst.j2ee.navigator.ui/build.properties deleted file mode 100644 index 905eacec3..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2004 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -bin.includes = plugin.xml,\ - *.jar,\ - j2ee-navigator.jar,\ - com.ibm.wtp.j2ee.ui.navigator/,\ - icons/,\ - plugin.properties,\ - schema/ -src.includes = com.ibm.wtp.j2ee.ui.navigator/ -source.j2ee-navigator.jar = j2ee-navigator/ diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/J2EEPerspective.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/J2EEPerspective.gif Binary files differdeleted file mode 100644 index c45656801..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/J2EEPerspective.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/appclientgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/appclientgroup_obj.gif Binary files differdeleted file mode 100644 index 276842824..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/appclientgroup_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/connectorgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/connectorgroup_obj.gif Binary files differdeleted file mode 100644 index ad3af3c65..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/connectorgroup_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/eargroup_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/eargroup_obj.gif Binary files differdeleted file mode 100644 index 2eeb3ef01..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/eargroup_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/ejbgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/ejbgroup_obj.gif Binary files differdeleted file mode 100644 index b0adb3e59..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/ejbgroup_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/folder.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/folder.gif Binary files differdeleted file mode 100644 index c91b26723..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/folder.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_export.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_export.gif Binary files differdeleted file mode 100644 index 6f83300c8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_export.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_import_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_import_wiz.gif Binary files differdeleted file mode 100644 index ce667f4ef..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/appclient_import_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ear.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ear.gif Binary files differdeleted file mode 100644 index 2270b1717..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ear.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ejbjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ejbjar_wiz.gif Binary files differdeleted file mode 100644 index 72cd417c4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_ejbjar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_rar.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_rar.gif Binary files differdeleted file mode 100644 index befb3d4e8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/export_rar.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/exportwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/exportwar_wiz.gif Binary files differdeleted file mode 100644 index ced859dd4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/exportwar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ear.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ear.gif Binary files differdeleted file mode 100644 index 099201bb5..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ear.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ejbjar.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ejbjar.gif Binary files differdeleted file mode 100644 index 5644b48df..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_ejbjar.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_rar.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_rar.gif Binary files differdeleted file mode 100644 index 50f25a2f7..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/import_rar.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/importwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/importwar_wiz.gif Binary files differdeleted file mode 100644 index 432c06679..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/importwar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newappclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newappclient_wiz.gif Binary files differdeleted file mode 100644 index 0ce86a13a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newappclient_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newconnectionprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newconnectionprj_wiz.gif Binary files differdeleted file mode 100644 index 1bec6ba83..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newconnectionprj_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newear_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newear_wiz.gif Binary files differdeleted file mode 100644 index 8b409b507..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newear_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newejbprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newejbprj_wiz.gif Binary files differdeleted file mode 100644 index ecda22bf9..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newejbprj_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newwar_wiz.gif Binary files differdeleted file mode 100644 index b9ac6be16..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ctool16/newwar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/cview16/j2ee_view.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/cview16/j2ee_view.gif Binary files differdeleted file mode 100644 index 20acd4c42..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/cview16/j2ee_view.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/obj16/webapp_deploy.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/obj16/webapp_deploy.gif Binary files differdeleted file mode 100644 index 80531e39b..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/obj16/webapp_deploy.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/client_app_ovr.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/client_app_ovr.gif Binary files differdeleted file mode 100644 index 3ff1ca57e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/client_app_ovr.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/connector_ovr.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/connector_ovr.gif Binary files differdeleted file mode 100644 index b7e77bc69..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/connector_ovr.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/ejb_module_ovr.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/ejb_module_ovr.gif Binary files differdeleted file mode 100644 index cf50d6d66..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/ejb_module_ovr.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/enterprise_app_ovr.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/enterprise_app_ovr.gif Binary files differdeleted file mode 100644 index ec19c473c..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/enterprise_app_ovr.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/web_module_ovr.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/web_module_ovr.gif Binary files differdeleted file mode 100644 index c1e96177a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/ovr16/web_module_ovr.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/appclient_wiz.gif Binary files differdeleted file mode 100644 index 56d7fa704..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/appclient_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/connector_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/connector_wiz.gif Binary files differdeleted file mode 100644 index 231f8d3e7..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/connector_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ear_wiz.gif Binary files differdeleted file mode 100644 index 625e763c9..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ear_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ejbproject_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ejbproject_wiz.gif Binary files differdeleted file mode 100644 index 7f2aa1e05..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/ejbproject_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_appclient_wiz.gif Binary files differdeleted file mode 100644 index 351539638..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_appclient_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ear_wiz.gif Binary files differdeleted file mode 100644 index a327fa68a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ear_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ejbjar_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ejbjar_obj.gif Binary files differdeleted file mode 100644 index adca79ef0..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_ejbjar_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_rar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_rar_wiz.gif Binary files differdeleted file mode 100644 index 6047f1adc..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_rar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_war_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_war_wiz.gif Binary files differdeleted file mode 100644 index d25124251..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/export_war_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_appclient_wiz.gif Binary files differdeleted file mode 100644 index 351a31dc9..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_appclient_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ear_wiz.gif Binary files differdeleted file mode 100644 index 67754deee..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ear_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ejbjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ejbjar_wiz.gif Binary files differdeleted file mode 100644 index d123519da..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_ejbjar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_rar_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_rar_wiz.gif Binary files differdeleted file mode 100644 index ea9dff4f6..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_rar_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_war_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_war_wiz.gif Binary files differdeleted file mode 100644 index 514274d38..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/import_war_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/war_wiz.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/war_wiz.gif Binary files differdeleted file mode 100644 index d964e2e56..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/wizban/war_wiz.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/jcu_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/jcu_obj.gif Binary files differdeleted file mode 100644 index 36a73ace2..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/jcu_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/servlet.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/servlet.gif Binary files differdeleted file mode 100644 index fc1bece72..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/servlet.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/sessionBean_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/sessionBean_obj.gif Binary files differdeleted file mode 100644 index 507b8a82e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/sessionBean_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/srvce_elem_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/srvce_elem_obj.gif Binary files differdeleted file mode 100644 index 6fdcb3fe6..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/srvce_elem_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webgroup_obj.gif Binary files differdeleted file mode 100644 index 274d361ca..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webgroup_obj.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webservicedesc.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webservicedesc.gif Binary files differdeleted file mode 100644 index 8fb844f5b..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/webservicedesc.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/wsdl.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/wsdl.gif Binary files differdeleted file mode 100644 index 8fb844f5b..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/wsdl.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManager.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManager.java deleted file mode 100644 index 4e81a868a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManager.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Created on Feb 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.resources.IProject; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public abstract class EMFModelManager { - private final IProject project; - private final EMFRootObjectProvider provider; - public abstract Object[] getModels(); - public final IProject getProject() { - return project; - } - public final EMFRootObjectProvider getEMFRootObjectProvider(){ - return provider; - } - public EMFModelManager(IProject aProject, EMFRootObjectProvider aProvider) { - project = aProject; - provider = aProvider; - } - - /** - * @param affectedProject - */ - protected void notifyListeners(IProject affectedProject) { - provider.notifyListeners(affectedProject); - } - /** - * - */ - public abstract void dispose(); - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManagerFactory.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManagerFactory.java deleted file mode 100644 index 6903ffbbb..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManagerFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Created on Feb 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.resources.IProject; -import org.eclipse.wst.common.componentcore.ModuleCoreNature; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class EMFModelManagerFactory { - public static EMFModelManager createEMFModelManager(IProject project, EMFRootObjectProvider provider) { - boolean flexible = (ModuleCoreNature.getModuleCoreNature(project) != null); - EMFModelManager modelManager = null; - if (flexible) - modelManager = new FlexibleEMFModelManager(project,provider); - else - modelManager = new NonFlexibleEMFModelManager(project,provider); - return modelManager; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectManager.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectManager.java deleted file mode 100644 index 0ae1dd806..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectManager.java +++ /dev/null @@ -1,246 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.IResourceDeltaVisitor; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.internal.J2EEEditModel; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.SWTException; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener; - -import org.eclipse.jem.util.logger.proxy.Logger; - -/** - * <p> - * The following class is experimental until fully documented. - * </p> - */ -public class EMFRootObjectManager implements EditModelListener, IResourceChangeListener, IResourceDeltaVisitor { - - - - private final Map projectEditModels = new HashMap(); - private final Map projectRootObjects = new HashMap(); - - private final List listeners = new ArrayList(); - - public interface IRefreshHandlerListener { - void onRefresh(Object element); - } - - /** - * - */ - public EMFRootObjectManager() { - super(); - ResourcesPlugin.getWorkspace().addResourceChangeListener(this); - } - - - - public void dispose() { - if (projectEditModels == null) - return; - ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); - J2EEEditModel editModel = null; - Object[] keys = projectEditModels.keySet().toArray(); - for (int i = 0; i < keys.length; i++) { - editModel = (J2EEEditModel) projectEditModels.remove(keys[i]); - if (editModel != null) { - editModel.removeListener(this); - editModel.releaseAccess(this); - } - } - } - - public Object getRootObject(IProject project) { - if (project == null || !project.isAccessible()) - return null; - - Object rootObject = null; - synchronized (projectRootObjects) { - rootObject = projectRootObjects.get(project); - - if (rootObject == null || ((EObject) rootObject).eResource() == null) { - J2EEEditModel editModel = getEditModelForProject(project); - if (editModel != null) { - rootObject = editModel.getPrimaryRootObject(); - projectRootObjects.put(project, rootObject); - } - } - } - return rootObject; - } - - - protected J2EEEditModel getEditModelForProject(IProject project) { - if (project == null) - return null; - J2EEEditModel editModel = null; - synchronized (projectEditModels) { - editModel = (J2EEEditModel) projectEditModels.get(project); - if (editModel == null && project.isAccessible()) { - //System.out.println("getEditModelForProject " + project.getName()); - J2EENature nature = J2EENature.getRegisteredRuntime(project); - if (nature != null) { - editModel = nature.getJ2EEEditModelForRead(this); - if (editModel != null) { - editModel.addListener(this); - addMapping(project, editModel); - } - } - } - } - return editModel; - } - - protected void addMapping(IProject project, J2EEEditModel editModel) { - projectEditModels.put(project, editModel); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener#editModelChanged(org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent) - */ - public void editModelChanged(EditModelEvent anEvent) { - IProject affectedProject = anEvent.getEditModel().getProject(); - switch (anEvent.getEventCode()) { - case EditModelEvent.UNLOADED_RESOURCE : - case EditModelEvent.REMOVED_RESOURCE : { - Object oldRootObject = projectRootObjects.remove(affectedProject); - if (oldRootObject != null) - notifyListeners(affectedProject); - } - break; - case EditModelEvent.SAVE : { - Object oldRootObject = projectRootObjects.get(affectedProject); - if (oldRootObject == null) - notifyListeners(affectedProject); - } - break; - case EditModelEvent.PRE_DISPOSE : - disposeCache(affectedProject); - break; - default : - break; - } - } - - - /** - * @param aProject - */ - private void notifyListeners(IProject aProject) { - for (int x = 0; x < listeners.size(); ++x) { - IRefreshHandlerListener refreshHandler = (IRefreshHandlerListener) listeners.get(x); - refreshHandler.onRefresh(aProject); - } - - } - - - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent) - */ - public void resourceChanged(IResourceChangeEvent event) { - final IResourceDelta delta = event.getDelta(); - - if (delta != null) { - try { - delta.accept(EMFRootObjectManager.this); - } catch (CoreException e) { - Logger.getLogger().logError(e); - } catch (SWTException swte) { - Logger.getLogger().logError(swte); - } catch (SWTError swte) { - Logger.getLogger().logError(swte); - } - } - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta) - */ - public boolean visit(IResourceDelta delta) throws CoreException { - IResource resource = delta.getResource(); - if (resource != null) { - switch (resource.getType()) { - case IResource.ROOT : - return true; - case IResource.PROJECT : - boolean projectOpenStateChanged = ((delta.getFlags() & IResourceDelta.OPEN) != 0); - if (delta.getKind() == IResourceDelta.REMOVED || projectOpenStateChanged) - disposeCache((IProject) resource); - return false; - } - } - return false; - } - - - protected void disposeCache(IProject affectedProject) { - synchronized (projectEditModels) { - projectRootObjects.remove(affectedProject); - //System.out.println("REMOVING edit model: " + affectedProject.getName()); - J2EEEditModel editModel = (J2EEEditModel) projectEditModels.remove(affectedProject); - //System.out.println("REMOVED edit model " + affectedProject.getName()); - if (editModel != null) { - editModel.removeListener(this); - editModel.releaseAccess(this); - //System.out.println("RELEASED edit model " + affectedProject.getName()); - } - } - } - - public void addRefreshHandlerListener(IRefreshHandlerListener aListener) { - synchronized (getListeners()) { - if (aListener != null && !getListeners().contains(aListener)) - getListeners().add(aListener); - } - } - - public void removeRefreshHandlerListener(IRefreshHandlerListener aListener) { - synchronized (listeners) { - listeners.remove(aListener); - } - } - - /** - * Insert the method's description here. Creation date: (4/11/2001 4:42:58 PM) - * - * @return java.util.List - */ - protected java.util.List getListeners() { - return listeners; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectProvider.java deleted file mode 100644 index 3d397510d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectProvider.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Created on Feb 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.IResourceDeltaVisitor; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.SWTException; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class EMFRootObjectProvider implements IResourceChangeListener, IResourceDeltaVisitor{ - private final HashMap emfModelCache = new HashMap(); - private final List listeners = new ArrayList(); - - public interface IRefreshHandlerListener { - void onRefresh(Object element); - } - - /** - * - */ - public EMFRootObjectProvider() { - super(); - ResourcesPlugin.getWorkspace().addResourceChangeListener(this); - } - - public Object[] getModels(IProject project){ - try { - EMFModelManager modelManager = (EMFModelManager) emfModelCache.get(project); - if (modelManager == null) { - synchronized (emfModelCache) { - modelManager= EMFModelManagerFactory.createEMFModelManager(project,this) ; - emfModelCache.put(project,modelManager); - } - } - return modelManager.getModels(); - } catch (Exception ex) { - //ex.printStackTrace(); - return null; - } - } - - /* (non-Javadoc) - * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent) - */ - public void resourceChanged(IResourceChangeEvent event) { - final IResourceDelta delta = event.getDelta(); - - if (delta != null) { - try { - delta.accept(EMFRootObjectProvider.this); - } catch (CoreException e) { - Logger.getLogger().logError(e); - } catch (SWTException swte) { - Logger.getLogger().logError(swte); - } catch (SWTError swte) { - Logger.getLogger().logError(swte); - } - } - - } - - /* (non-Javadoc) - * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta) - */ - public boolean visit(IResourceDelta delta) throws CoreException { - IResource resource = delta.getResource(); - if (resource != null) { - switch (resource.getType()) { - case IResource.ROOT : - return true; - case IResource.PROJECT : - boolean projectOpenStateChanged = ((delta.getFlags() & IResourceDelta.OPEN) != 0); - if (delta.getKind() == IResourceDelta.REMOVED || projectOpenStateChanged) { - IProject project = (IProject) resource; - dispose(project); - } - return false; - } - } - return false; - } - - private void dispose(IProject project) { - if (project == null) return; - EMFModelManager modelManager = (EMFModelManager) emfModelCache.remove(project); - if (modelManager != null) { - modelManager.dispose(); - } - } - public void dispose() { - ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); - EMFModelManager modelManager = null; - Object[] keys = emfModelCache.keySet().toArray(); - for (int i = 0; i < keys.length; i++) { - modelManager = (EMFModelManager) emfModelCache.remove(keys[i]); - if (modelManager != null) { - modelManager.dispose(); - } - } - } - - - /** - * @param aProject - */ - public void notifyListeners(IProject aProject) { - for (int x = 0; x < listeners.size(); ++x) { - IRefreshHandlerListener refreshHandler = (IRefreshHandlerListener) listeners.get(x); - refreshHandler.onRefresh(aProject); - } - - } - - public void addRefreshHandlerListener(IRefreshHandlerListener aListener) { - synchronized (getListeners()) { - if (aListener != null && !getListeners().contains(aListener)) - getListeners().add(aListener); - } - } - - public void removeRefreshHandlerListener(IRefreshHandlerListener aListener) { - synchronized (listeners) { - listeners.remove(aListener); - } - } - - /** - * Insert the method's description here. Creation date: (4/11/2001 4:42:58 PM) - * - * @return java.util.List - */ - protected java.util.List getListeners() { - return listeners; - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/FlexibleEMFModelManager.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/FlexibleEMFModelManager.java deleted file mode 100644 index b238f3965..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/FlexibleEMFModelManager.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Created on Feb 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.IProject; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.wst.common.componentcore.ArtifactEdit; -import org.eclipse.wst.common.componentcore.internal.StructureEdit; -import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent; -import org.eclipse.wst.common.componentcore.resources.ComponentHandle; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class FlexibleEMFModelManager extends EMFModelManager implements EditModelListener{ - - private List rootObjects = new ArrayList(); - private static final Object[] EMPTY_OBJECT = new Object[0]; - private final List artifactEdits = new ArrayList(); - private StructureEdit moduleCore; - private final Map artifactEditToRootObject = new HashMap(); - - /** - * @param aProject - * @param provider - */ - public FlexibleEMFModelManager(IProject aProject, EMFRootObjectProvider provider) { - super(aProject,provider); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#getModels() - */ - public Object[] getModels() { - try { - - IProject project = getProject(); - if ( project== null || !project.isAccessible()) - return EMPTY_OBJECT; - - synchronized (rootObjects) { - if (!isValid(rootObjects)) { - rootObjects = getRootObjects(); - } - } - } catch (Exception ex) { - ex.printStackTrace(); - } - if (rootObjects != null) { - return rootObjects.toArray() ; - } - return EMPTY_OBJECT; - - } - - private boolean isValid(List rootObjects) { - if (rootObjects == null || rootObjects.size()==0) - return false; - for (int x=0; x< rootObjects.size(); ++x) { - EObject eObject = (EObject) rootObjects.get(x); - if (eObject != null && eObject.eResource() == null) - return false; - } - return true; - } - - /** - * @param project - * @return - */ - private List getRootObjects() { - List artifacts = getArtifactEdits(); - List flexibleObjects = new ArrayList(); - ArtifactEdit artifactEdit = null; - EObject contentModelRoot = null; - for (int x=0; x< artifacts.size(); ++x) { - artifactEdit = (ArtifactEdit)artifacts.get(x); - contentModelRoot = artifactEdit.getContentModelRoot(); - if (contentModelRoot == null) { - Logger.getLogger().logError("Error retrieving Deployment Descriptor for module in Project : " + getProject().getName()); - } else { - flexibleObjects.add(contentModelRoot); - artifactEditToRootObject.put(artifactEdit,contentModelRoot); - } - } - return flexibleObjects; - } - - protected List getArtifactEdits() { - - IProject project = getProject(); - if (project == null) - return null; - synchronized (artifactEdits) { - if (artifactEdits.size() ==0 && project.isAccessible()) { - StructureEdit moduleCore = getModuleCore(); - WorkbenchComponent[] workBenchModules = moduleCore.getWorkbenchModules(); - for (int i = 0; i < workBenchModules.length; i++) { - WorkbenchComponent module = workBenchModules[i]; - ArtifactEdit artifactEdit = null; - try{ - ComponentHandle handle = ComponentHandle.create(project,module.getName()); - artifactEdit = ArtifactEdit.getArtifactEditForRead(handle); - if(artifactEdit != null) { - artifactEdits.add(artifactEdit); - artifactEdit.addListener(this); - } - } catch(Exception e){ - e.printStackTrace(); - } - } - - } - } - return artifactEdits; - } - - private StructureEdit getModuleCore() { - if (moduleCore == null) { - moduleCore = StructureEdit.getStructureEditForRead(getProject()); - } - return moduleCore; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#dispose() - */ - public void dispose() { - if (artifactEdits != null) { - for (int x=0; x< artifactEdits.size(); ++x) { - ArtifactEdit artifactEdit = (ArtifactEdit)artifactEdits.get(x); - if (artifactEdit != null) { - artifactEdit.removeListener(this); - artifactEdit.dispose(); - } - - } - } - if (moduleCore != null) - moduleCore.dispose(); - - } - - /* (non-Javadoc) - * @see org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener#editModelChanged(org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent) - */ - public void editModelChanged(EditModelEvent anEvent) { - IProject affectedProject = anEvent.getEditModel().getProject(); - - switch (anEvent.getEventCode()) { - case EditModelEvent.UNLOADED_RESOURCE : - case EditModelEvent.REMOVED_RESOURCE : { - Object oldRootObject = removeRootObject(anEvent.getEditModel(),affectedProject); - if (oldRootObject != null) - notifyListeners(affectedProject); - } - break; - case EditModelEvent.SAVE : { - Object oldRootObject = getRootObject(anEvent.getEditModel(),affectedProject); - if (oldRootObject == null) - notifyListeners(affectedProject); - } - break; - case EditModelEvent.PRE_DISPOSE : - dispose(anEvent.getEditModel(),affectedProject); - break; - default : - break; - } - - } - - - - /** - * @param editModel - * @param affectedProject - * @return - */ - private Object getRootObject(EditModel editModel, IProject project) { - ArtifactEdit artifactEdit = getArtifactEdit(editModel,project); - if (artifactEdit != null) { - return artifactEditToRootObject.get(artifactEdit); - } - return null; - } - - /** - * @param editModel - * @param affectedProject - * @return - */ - private Object removeRootObject(EditModel editModel, IProject project) { - ArtifactEdit artifactEdit = getArtifactEdit(editModel,project); - if (artifactEdit != null) { - artifactEditToRootObject.remove(artifactEdit); - } - return artifactEdit; - } - - /** - * @param affectedProject - * @param editModel - */ - private void dispose( EditModel editModel, IProject project) { - ArtifactEdit artifactEdit = getArtifactEdit(editModel,project); - if (artifactEdit != null) { - artifactEdit.removeListener(this); - artifactEdits.remove(artifactEdit); - artifactEditToRootObject.remove(artifactEdit); - } - - } - - private ArtifactEdit getArtifactEdit(EditModel editModel, IProject project) { - if (artifactEdits != null) { - for (int x=0; x<artifactEdits.size(); ++x) { - ArtifactEdit artifactEdit = (ArtifactEdit)artifactEdits.get(x); - if (artifactEdit.hasEditModel(editModel)) - return artifactEdit; - } - } - return null; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EENavigatorConstants.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EENavigatorConstants.java deleted file mode 100644 index 4f95c10e1..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EENavigatorConstants.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Jul 7, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - - -/** - * @author mdelder - * - * TODO To change the template for this generated type comment go to Window - Preferences - Java - - * Code Style - Code Templates - */ -public interface IJ2EENavigatorConstants { - - String VIEWER_ID = "com.ibm.wtp.ui.ProjectNavigator";//$NON-NLS-1$ -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EEWizardConstants.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EEWizardConstants.java deleted file mode 100644 index 0b9e2f169..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EEWizardConstants.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.jst.ejb.ui.internal.wizard.EJBComponentCreationWizard; -import org.eclipse.jst.ejb.ui.internal.wizard.EJBModuleExportWizard; -import org.eclipse.jst.ejb.ui.internal.wizard.EJBModuleImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard; -import org.eclipse.jst.j2ee.internal.wizard.AppClientModuleExportWizard; -import org.eclipse.jst.j2ee.internal.wizard.AppClientModuleImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard; -import org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationExportWizard; -import org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizard; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorComponentCreationWizard; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorModuleExportWizard; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorModuleImportWizard; -import org.eclipse.jst.servlet.ui.internal.wizard.WebComponentCreationWizard; -import org.eclipse.jst.servlet.ui.internal.wizard.WebModuleExportWizard; -import org.eclipse.jst.servlet.ui.internal.wizard.WebModuleImportWizard; - -/** - * <p> - * The following class is experimental until fully documented. - * </p> - * <p> - * The Creation IDs are used for activity filtering and as such are declared on the individual - * wizards. All other IDs must be maintained to stay in sync with the values found in the plugin.xml - * files of the respective module UI plugins. - */ -public interface IJ2EEWizardConstants { - - String NEW_EAR_PROJECT_WIZARD_ID = EARComponentCreationWizard.WIZARD_ID; - - String NEW_APPCLIENT_PROJECT_WIZARD_ID = AppClientComponentCreationWizard.WIZARD_ID; - - String NEW_JCA_PROJECT_WIZARD_ID = ConnectorComponentCreationWizard.WIZARD_ID; - - String NEW_EJB_PROJECT_WIZARD_ID = EJBComponentCreationWizard.WIZARD_ID; - - String NEW_WEB_PROJECT_WIZARD_ID = WebComponentCreationWizard.WIZARD_ID; - - String NEW_ENTERPRISE_BEAN_WIZARD_ID = "org.eclipse.jst.j2ee.ejb.ui.util.createEJBWizard"; //$NON-NLS-1$ - - String IMPORT_EAR_WIZARD_ID = EnterpriseApplicationImportWizard.class.getName(); - - String IMPORT_APPCLIENT_WIZARD_ID = AppClientModuleImportWizard.class.getName(); - - String IMPORT_CONNECTOR_WIZARD_ID = ConnectorModuleImportWizard.class.getName(); - - String IMPORT_ENTERPRISE_BEAN_WIZARD_ID = EJBModuleImportWizard.class.getName(); - - String IMPORT_WEB_MODULE_WIZARD_ID = WebModuleImportWizard.class.getName(); - - String IMPORT_UTILITY_JAR_WIZARD_ID = J2EEUtilityJarImportWizard.class.getName(); - - String EXPORT_EAR_WIZARD_ID = EnterpriseApplicationExportWizard.class.getName(); - - String EXPORT_APPCLIENT_WIZARD_ID = AppClientModuleExportWizard.class.getName(); - - String EXPORT_CONNECTOR_WIZARD_ID = ConnectorModuleExportWizard.class.getName(); - - String EXPORT_ENTERPRISE_BEAN_WIZARD_ID = EJBModuleExportWizard.class.getName(); - - String EXPORT_WEB_MODULE_WIZARD_ID = WebModuleExportWizard.class.getName(); -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEActionProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEActionProvider.java deleted file mode 100644 index c5ebde259..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEActionProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the - * accompanying materials are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: IBM Corporation - initial API and implementation - **************************************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.StructuredViewer; -import org.eclipse.jst.j2ee.internal.actions.J2EERenameAction; -import org.eclipse.jst.j2ee.internal.actions.OpenJ2EEResourceAction; -import org.eclipse.jst.j2ee.internal.provider.J2EEUtilityJarItemProvider; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.ActionContext; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.internal.WorkbenchMessages; -import org.eclipse.wst.common.frameworks.internal.ui.WTPGenericActionIds; -import org.eclipse.wst.common.frameworks.internal.ui.WTPOptionalOperationAction; -import org.eclipse.wst.common.navigator.internal.provisional.views.ICommonActionProvider; -import org.eclipse.wst.common.navigator.internal.provisional.views.ICommonMenuConstants; -import org.eclipse.wst.common.navigator.internal.provisional.views.NavigatorContentService; -import org.eclipse.wst.common.navigator.internal.views.actions.CommonActionProvider; - -public class J2EEActionProvider extends CommonActionProvider implements ICommonActionProvider { - - private IViewPart viewPart; - - private OpenJ2EEResourceAction openAction; - - private J2EERenameAction renameAction; - - private WTPOptionalOperationAction genericDelete; - - /** - * - */ - public J2EEActionProvider() { - } - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#init(org.eclipse.ui.IViewPart, - * org.eclipse.jface.viewers.StructuredViewer, - * org.eclipse.wst.common.navigator.internal.views.extensions.NavigatorContentService) - */ - public void init(IViewPart aViewPart, StructuredViewer aViewer, NavigatorContentService aContentService) { - viewPart = aViewPart; - - openAction = new OpenJ2EEResourceAction(); - renameAction = new J2EERenameAction(viewPart.getViewSite(), viewPart.getViewSite().getShell()); - - genericDelete = new WTPOptionalOperationAction(WTPGenericActionIds.DELETE, WorkbenchMessages.Workbench_delete); //$NON-NLS-1$ - ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); - genericDelete.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); - genericDelete.setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED)); - genericDelete.setWorkbenchSite(viewPart.getViewSite()); - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#setActionContext(org.eclipse.ui.actions.ActionContext) - */ - public void setActionContext(ActionContext aContext) { - if (aContext.getSelection() instanceof IStructuredSelection) { - IStructuredSelection selection = (IStructuredSelection) aContext.getSelection(); - - openAction.selectionChanged(selection); - renameAction.selectionChanged(selection); - - Object[] array = selection.toArray(); - if (isUtilityJars(array)) { - J2EEUtilityJarItemProvider utilityJarItemProvider = null; - List newSelection = new ArrayList(); - for (int i = 0; i < array.length; i++) { - utilityJarItemProvider = (J2EEUtilityJarItemProvider) array[i]; - newSelection.addAll(utilityJarItemProvider.getChildren(null)); - } - selection = new StructuredSelection(newSelection); - } - genericDelete.selectionChanged(genericDelete, selection); - } - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#fillActionBars(org.eclipse.ui.IActionBars) - */ - public boolean fillActionBars(IActionBars theActionBars) { - if (genericDelete.isEnabled()) - theActionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), genericDelete); - return true; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#fillContextMenu(org.eclipse.jface.action.IMenuManager) - */ - public boolean fillContextMenu(IMenuManager aMenu) { - boolean actionsAdded = false; - /* if (renameAction.isEnabled()) { - aMenu.appendToGroup(ICommonMenuConstants.COMMON_MENU_EDIT_ACTIONS, renameAction); - actionsAdded = true; - } - if (genericDelete.isEnabled()) { - aMenu.appendToGroup(ICommonMenuConstants.COMMON_MENU_EDIT_ACTIONS, genericDelete); - actionsAdded = true; - }*/ - return actionsAdded; - } - - private boolean isUtilityJars(Object[] items) { - if (items != null) { - for (int i = 0; i < items.length; i++) { - if (items[i] == null || items[i].getClass() != J2EEUtilityJarItemProvider.class) - return false; - } - return true; - } - return false; - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEComparator.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEComparator.java deleted file mode 100644 index afa07d6ae..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEComparator.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Created on Jan 22, 2005 - * - * TODO To change the template for this generated file go to Window - Preferences - Java - Code - * Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.Comparator; - -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper; - - -public class J2EEComparator implements Comparator { - - private J2EEViewerSorter j2eeViewSorter = new J2EEViewerSorter(); - - /* - * (non-Javadoc) - * - * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) - */ - public int compare(Object o1, Object o2) { - J2EEJavaClassProviderHelper providerHelperLeftArg = null; - J2EEJavaClassProviderHelper providerHelperRightArg = null; - - if (o1 instanceof J2EEJavaClassProviderHelper) - providerHelperLeftArg = (J2EEJavaClassProviderHelper) o1; - if (o2 instanceof J2EEJavaClassProviderHelper) - providerHelperRightArg = (J2EEJavaClassProviderHelper) o2; - - - /* if both arguments are J2EEJavaClassProviderHelpers */ - if (providerHelperLeftArg != null && providerHelperRightArg != null) - return providerHelperLeftArg.getText().compareTo(providerHelperRightArg.getText()); - /* if exactly one of the arguments are J2EEJavaClassProviderHelpers */ - else if (providerHelperLeftArg != null && o2 instanceof EnterpriseBean) - return 1; - else if (providerHelperRightArg != null && o1 instanceof EnterpriseBean) - return -1; - return j2eeViewSorter.compare(null, o1, o2); - } - - /* - * (non-Javadoc) - * - * @see java.util.Comparator#equals(java.lang.Object) - */ - public boolean equals(Object obj) { - return obj instanceof J2EEComparator; - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEContentProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEContentProvider.java deleted file mode 100644 index d2ab0aa83..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEContentProvider.java +++ /dev/null @@ -1,219 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jem.util.emf.workbench.ProjectUtilities; -import org.eclipse.jface.viewers.AbstractTreeViewer; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jst.common.navigator.internal.providers.CommonAdapterFactoryContentProvider; -import org.eclipse.jst.j2ee.internal.ejb.provider.BeanClassProviderHelper; -import org.eclipse.jst.j2ee.internal.provider.MethodsProviderDelegate; -import org.eclipse.jst.j2ee.navigator.internal.EMFRootObjectProvider.IRefreshHandlerListener; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.progress.UIJob; -import org.eclipse.wst.common.internal.emfworkbench.integration.DynamicAdapterFactory; -import org.eclipse.wst.common.navigator.internal.provisional.views.AdaptabilityUtility; -import org.eclipse.wst.common.navigator.internal.provisional.views.CommonViewer; - -/** - * <p> - * The following class is experimental until fully documented. - * </p> - */ -public class J2EEContentProvider implements ITreeContentProvider, IRefreshHandlerListener { - - private static final Class IPROJECT_CLASS = IProject.class; - - private final EMFRootObjectProvider rootObjectProvider; - - private AdapterFactoryContentProvider delegateContentProvider; - private MethodsProviderDelegate delegateMethodsProvider; - - private String viewerId = null; - Viewer viewer; - - /** - * - */ - public J2EEContentProvider() { - rootObjectProvider = new EMFRootObjectProvider(); - rootObjectProvider.addRefreshHandlerListener(this); - } - - /** - * - */ - public J2EEContentProvider(String aViewerId) { - rootObjectProvider = new EMFRootObjectProvider(); - updateContentProviders(aViewerId); - rootObjectProvider.addRefreshHandlerListener(this); - } - - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) - */ - public Object[] getElements(Object anInputElement) { - return getChildren(anInputElement); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getChildren(java.lang.Object) - */ - public Object[] getChildren(Object aParentElement) { - IProject project = null; - List children = new ArrayList(); - if (aParentElement instanceof IProject || aParentElement instanceof IJavaProject) { - project = (IProject) ((IAdaptable) aParentElement).getAdapter(IPROJECT_CLASS); - if (project != null) { - Object[] rootObjects = (rootObjectProvider != null) ? rootObjectProvider.getModels(project) : null; - if (rootObjects != null) { - for (int x=0; x< rootObjects.length ; ++x) { - children.add(rootObjects[x]); - } - - } - } - } else if (MethodsProviderDelegate.providesContentFor(aParentElement)) - return delegateMethodsProvider.getChildren(aParentElement); - else /* if (isEMFEditObject(aParentElement)) */{ - Object[] siblings = delegateContentProvider.getChildren(aParentElement); - if (siblings != null) - children.addAll(Arrays.asList(siblings)); - } - return children.toArray(); - } - - public Object getParent(Object object) { - if (MethodsProviderDelegate.providesContentFor(object)) - return delegateMethodsProvider.getParent(object); - Object parent = delegateContentProvider.getParent(object); - if (parent == null && object instanceof BeanClassProviderHelper) - parent = ((BeanClassProviderHelper) object).getEjb(); - if (parent == null && object instanceof EObject) - parent = ProjectUtilities.getProject((EObject) object); - return parent; - } - - /** - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - public void dispose() { - rootObjectProvider.removeRefreshHandlerListener(this); - delegateContentProvider.dispose(); - rootObjectProvider.dispose(); - delegateMethodsProvider.dispose(); - - } - - /* - * @see ITreeContentProvider#hasChildren(Object) - */ - public boolean hasChildren(Object element) { - if (MethodsProviderDelegate.providesContentFor(element)) - return delegateMethodsProvider.hasChildren(element); - /* else if (isEMFEditObject(element)) */ - return delegateContentProvider.hasChildren(element); - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, - * java.lang.Object, java.lang.Object) - */ - public void inputChanged(Viewer aViewer, Object anOldInput, Object aNewInput) { - String newViewerId = null; - viewer = aViewer; - if (aViewer instanceof CommonViewer) - newViewerId = ((CommonViewer) aViewer).getNavigatorContentService().getViewerId(); - - if (newViewerId != null && (viewerId == null || !viewerId.equals(newViewerId))) - updateContentProviders(newViewerId); - - delegateContentProvider.inputChanged(aViewer, anOldInput, aNewInput); - delegateMethodsProvider.inputChanged(aViewer, anOldInput, aNewInput); - } - - /** - * @param viewerId2 - */ - private void updateContentProviders(String aViewerId) { - - /* Dispose of the existing content providers */ - if (delegateContentProvider != null) - delegateContentProvider.dispose(); - if (delegateMethodsProvider != null) - delegateMethodsProvider.dispose(); - - /* Create new content providers using the new viewer id */ - DynamicAdapterFactory adapterFactory = new DynamicAdapterFactory(aViewerId); - delegateContentProvider = new CommonAdapterFactoryContentProvider(adapterFactory); - delegateMethodsProvider = new MethodsProviderDelegate(adapterFactory); - - /* Remember the viewer id */ - viewerId = aViewerId; - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.navigator.internal.EMFRootObjectManager.IRefreshHandlerListener#onRefresh(java.lang.Object) - */ - public void onRefresh(final Object element) { - if (viewer instanceof AbstractTreeViewer) { - if (Display.getCurrent() != null) { - ((AbstractTreeViewer) viewer).refresh(element, true); - } else { - /* Create and schedule a UI Job to update the Navigator Content Viewer */ - Job job = new UIJob("Update the Navigator Content Viewer Job") { //$NON-NLS-1$ - public IStatus runInUIThread(IProgressMonitor monitor) { - ((AbstractTreeViewer) viewer).refresh(element, true); - return Status.OK_STATUS; - } - }; - - if (element instanceof ISchedulingRule) - job.setRule((ISchedulingRule)element); - else { - ISchedulingRule rule = (ISchedulingRule)AdaptabilityUtility.getAdapter(element,ISchedulingRule.class); - if (rule != null) { - job.setRule(rule); - } - } - - job.schedule(); - } - } - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java deleted file mode 100644 index 1c856cd97..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.Path; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; -import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper; -import org.eclipse.swt.graphics.Image; -import org.eclipse.wst.common.internal.emfworkbench.integration.DynamicAdapterFactory; -import org.eclipse.wst.common.navigator.internal.provisional.views.ICommonLabelProvider; - -import org.eclipse.jem.util.emf.workbench.ProjectUtilities; - -/** - * <p> - * The following class is experimental until fully documented. - * </p> - */ -public class J2EELabelProvider implements ICommonLabelProvider { - - private AdapterFactoryLabelProvider delegateLabelProvider; - - /** - * - */ - public J2EELabelProvider() { - super(); - } - - /** - * - */ - public J2EELabelProvider(String aViewerId) { - super(); - initialize(aViewerId); - } - - public void initialize(String aViewerId) { - delegateLabelProvider = new AdapterFactoryLabelProvider(new DynamicAdapterFactory(aViewerId)); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.extensions.ICommonLabelProvider#getDescription(java.lang.Object) - */ - public String getDescription(Object anElement) { - if (anElement instanceof EObject) { - EObject eObj = (EObject) anElement; - if (CommonUtil.isDeploymentDescriptorRoot(eObj, true /* include ears */)) { - IProject parent = ProjectUtilities.getProject(eObj); - String path = new Path(eObj.eResource().getURI().toString()).makeRelative().toString(); - if (parent == null) - return path; - int startIndex = path.indexOf(parent.getFullPath().toString()); - return -1 == startIndex ? path : path.substring(startIndex); - } - } - return null; - } - - /** - * @param listener - */ - public void addListener(ILabelProviderListener listener) { - if (delegateLabelProvider != null) - delegateLabelProvider.addListener(listener); - } - - /** - * - */ - public void dispose() { - if (delegateLabelProvider != null) - delegateLabelProvider.dispose(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object obj) { - if (delegateLabelProvider != null) - return delegateLabelProvider.equals(obj); - return false; - } - - /** - * - */ - public void fireLabelProviderChanged() { - if (delegateLabelProvider != null) - delegateLabelProvider.fireLabelProviderChanged(); - } - - /** - * @return - */ - public AdapterFactory getAdapterFactory() { - if (delegateLabelProvider != null) - return delegateLabelProvider.getAdapterFactory(); - return null; - } - - /** - * @param object - * @param columnIndex - * @return - */ - public Image getColumnImage(Object object, int columnIndex) { - if (delegateLabelProvider != null) - return delegateLabelProvider.getColumnImage(object, columnIndex); - return null; - } - - /** - * @param object - * @param columnIndex - * @return - */ - public String getColumnText(Object object, int columnIndex) { - if (delegateLabelProvider != null) - return delegateLabelProvider.getColumnText(object, columnIndex); - return null; - } - - /** - * @param element - * @return - */ - public Image getImage(Object element) { - - if(element instanceof J2EEJavaClassProviderHelper) - return ((J2EEJavaClassProviderHelper) element).getImage(); - if (delegateLabelProvider != null) - return delegateLabelProvider.getImage(element); - return null; - } - - /** - * @param element - * @return - */ - public String getText(Object element) { - if(element instanceof J2EEJavaClassProviderHelper) - return ((J2EEJavaClassProviderHelper) element).getText(); - if (delegateLabelProvider != null) - return delegateLabelProvider.getText(element); - return null; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - public int hashCode() { - if (delegateLabelProvider != null) - return delegateLabelProvider.hashCode(); - return super.hashCode(); - } - - /** - * @param object - * @param id - * @return - */ - public boolean isLabelProperty(Object object, String id) { - if (delegateLabelProvider != null) - return delegateLabelProvider.isLabelProperty(object, id); - return false; - } - - /** - * @param notification - */ - public void notifyChanged(Notification notification) { - if (delegateLabelProvider != null) - delegateLabelProvider.notifyChanged(notification); - } - - /** - * @param listener - */ - public void removeListener(ILabelProviderListener listener) { - if (delegateLabelProvider != null) - delegateLabelProvider.removeListener(listener); - } - - /** - * @param adapterFactory - */ - public void setAdapterFactory(AdapterFactory adapterFactory) { - if (delegateLabelProvider != null) - delegateLabelProvider.setAdapterFactory(adapterFactory); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ - public String toString() { - if (delegateLabelProvider != null) - return delegateLabelProvider.toString(); - return super.toString(); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EENavigationLabelProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EENavigationLabelProvider.java deleted file mode 100644 index bf53cc07a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EENavigationLabelProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Nov 21, 2003 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.jst.j2ee.internal.provider.J2EEAdapterFactoryLabelProvider; - -/** - * @author Administrator - * - * To change the template for this generated type comment go to Window - Preferences - Java - Code - * Generation - Code and Comments - */ -public class J2EENavigationLabelProvider extends J2EEAdapterFactoryLabelProvider { - - public J2EENavigationLabelProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java deleted file mode 100644 index 47cce5697..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the - * accompanying materials are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: IBM Corporation - initial API and implementation - **************************************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - - -import org.eclipse.core.resources.IFile; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerSorter; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.internal.common.util.CommonUtil; - - -public class J2EEViewerSorter extends ViewerSorter { - - /** - * Constructor for J2EEViewerSorter. - */ - public J2EEViewerSorter() { - super(); - } - - - - /** - * @see ViewerSorter#compare(Viewer, Object, Object) - */ - public int compare(Viewer viewer, Object e1, Object e2) { - if (shouldSort(e1, e2)) - return super.compare(viewer, e1, e2); - return 0; - } - - protected boolean isEnterpriseBean(Object o) { - return o instanceof EnterpriseBean; - } - - protected boolean isDeploymentDescriptorRoot(Object o) { - return CommonUtil.isDeploymentDescriptorRoot(o); - } - - protected boolean shouldSort(Object e1, Object e2) { - return (isDeploymentDescriptorRoot(e1) && isDeploymentDescriptorRoot(e2)) || (isEnterpriseBean(e1) && isEnterpriseBean(e2)) || ((e1 instanceof IFile) && (e2 instanceof IFile)); - } - - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonFlexibleEMFModelManager.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonFlexibleEMFModelManager.java deleted file mode 100644 index 17ea59e3d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonFlexibleEMFModelManager.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Created on Feb 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.resources.IProject; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.j2ee.internal.J2EEEditModel; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent; -import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class NonFlexibleEMFModelManager extends EMFModelManager implements EditModelListener{ - - private J2EEEditModel editModel; - private Object rootObject; - private static final Object[] EMPTY_OBJECT = new Object[0]; - /** - * @param aProject - * @param provider - */ - public NonFlexibleEMFModelManager(IProject aProject, EMFRootObjectProvider provider) { - super(aProject, provider); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#getModels() - */ - public Object[] getModels() { - // TODO Auto-generated method stub - if (getProject() == null || !getProject().isAccessible()) - return EMPTY_OBJECT; - - //synchronized (rootObject) { - if (rootObject == null || ((EObject) rootObject).eResource() == null) { - J2EEEditModel editModel = getEditModel(); - if (editModel != null) { - rootObject = editModel.getPrimaryRootObject(); - } - } - //} - if (rootObject==null) - return EMPTY_OBJECT; - else { - Object[] objects = new Object[1]; - objects[0] = rootObject; - return objects; - } - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#dispose() - */ - public void dispose() { - if (editModel != null) { - editModel.removeListener(this); - editModel.releaseAccess(this); - editModel = null; - } - } - - /* (non-Javadoc) - * @see org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener#editModelChanged(org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent) - */ - public void editModelChanged(EditModelEvent anEvent) { - IProject affectedProject = anEvent.getEditModel().getProject(); - switch (anEvent.getEventCode()) { - case EditModelEvent.UNLOADED_RESOURCE : - case EditModelEvent.REMOVED_RESOURCE : - if (rootObject != null){ - notifyListeners(affectedProject); - } - break; - case EditModelEvent.SAVE : { - if (rootObject == null) - notifyListeners(affectedProject); - } - break; - case EditModelEvent.PRE_DISPOSE : - dispose(); - break; - default : - break; - } - - } - - - - protected J2EEEditModel getEditModel() { - IProject project = getProject(); - if (project == null) - return null; - - //synchronized (editModel) { - if (editModel == null && project.isAccessible()) { - //System.out.println("getEditModelForProject " + project.getName()); - J2EENature nature = J2EENature.getRegisteredRuntime(project); - if (nature != null) { - editModel = nature.getJ2EEEditModelForRead(this); - if (editModel != null) { - editModel.addListener(this); - } - } - } - //} - return editModel; - } - - protected void disposeCache(IProject affectedProject) { - //synchronized (editModel) { - if (editModel != null) { - editModel.removeListener(this); - editModel.releaseAccess(this); - editModel = null; - } - //} - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddExternalUtilityJarDropAction.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddExternalUtilityJarDropAction.java deleted file mode 100644 index 121f4f07d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddExternalUtilityJarDropAction.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants; -import org.eclipse.swt.dnd.FileTransfer; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility; -import org.eclipse.wst.common.navigator.internal.views.dnd.CommonNavigatorDropAdapter; -import org.eclipse.wst.common.navigator.internal.workbench.ResourceDropAction; - -/** - * @author mdelder - * - */ -public class AddExternalUtilityJarDropAction extends ResourceDropAction { - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.workbench.navigator.dnd.ResourceDropAction#validateDrop(org.eclipse.wst.common.navigator.internal.views.navigator.dnd.CommonNavigatorDropAdapter, - * java.lang.Object, int, org.eclipse.swt.dnd.TransferData) - */ - public boolean validateDrop(CommonNavigatorDropAdapter dropAdapter, Object target, int operation, TransferData transferType) { - if (FileTransfer.getInstance().isSupportedType(transferType)) { - IProject project = (IProject) AdaptabilityUtility.getAdapter(target, IProject.class); - try { - if (project.hasNature(IEARNatureConstants.NATURE_ID)) { - String[] sourceNames = (String[]) FileTransfer.getInstance().nativeToJava(transferType); - if (sourceNames == null) - return true; - - boolean result = true; - for (int i = 0; i < sourceNames.length; i++) - if (!(result = sourceNames[0].endsWith(".jar")))break; //$NON-NLS-1$ - return result; - } - return false; - } catch (CoreException e) { - return false; - } - } - return false; - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddModuleDropAction.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddModuleDropAction.java deleted file mode 100644 index f5f846d04..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddModuleDropAction.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jst.j2ee.application.internal.operations.AddModuleToEARDataModel; -import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel; - -/** - * @author mdelder - * - */ -public class AddModuleDropAction extends AddProjectToEarDropAction { - - public AddModuleDropAction() { - super(); - } - - protected boolean validateProjectToAdd(IProject projectToAdd, int earVersion) { - J2EENature moduleNature = J2EENature.getRegisteredRuntime(projectToAdd); - if (null == moduleNature || moduleNature.getNatureID().equals(IEARNatureConstants.NATURE_ID) || moduleNature.getJ2EEVersion() > earVersion) { - return false; - } - return true; - } - - protected WTPOperationDataModel getDataModel(IProject earProject, IProject projectToAdd) { - //TODO fix up to use module - return AddModuleToEARDataModel.createAddToEARDataModel(null,null); - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEarDropAction.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEarDropAction.java deleted file mode 100644 index 9adf77da8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEarDropAction.java +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import java.lang.reflect.InvocationTargetException; -import java.util.Iterator; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel; -import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.ui.part.PluginTransfer; -import org.eclipse.ui.views.navigator.LocalSelectionTransfer; -import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility; -import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel; -import org.eclipse.wst.common.navigator.internal.views.NavigatorPlugin; -import org.eclipse.wst.common.navigator.internal.views.dnd.CommonNavigatorDropAdapter; -import org.eclipse.wst.common.navigator.internal.views.dnd.IDropValidator; -import org.eclipse.wst.common.navigator.internal.views.dnd.NavigatorDropActionDelegate; - -/** - * @author jsholl - * - */ -public abstract class AddProjectToEarDropAction extends NavigatorDropActionDelegate implements IDropValidator { - - public AddProjectToEarDropAction() { - super(); - } - - public boolean validateDrop(CommonNavigatorDropAdapter dropAdapter, Object target, int operation, TransferData transferType) { - if (LocalSelectionTransfer.getInstance().isSupportedType(transferType) || PluginTransfer.getInstance().isSupportedType(transferType)) { - IProject earProject = (IProject) AdaptabilityUtility.getAdapter(target, IProject.class); - if (null == earProject || !earProject.isAccessible()) { - return false; - } - EARNatureRuntime earNature = (EARNatureRuntime) J2EENature.getRegisteredRuntime(earProject); - if (null == earNature) { - return false; - } - int earVersion = earNature.getApplication().getJ2EEVersionID(); - - ISelection selection = LocalSelectionTransfer.getInstance().getSelection(); - if (selection == null || !(selection instanceof IStructuredSelection)) { - return false; - } - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - if (structuredSelection.isEmpty()) { - return false; - } - Object key = new Object(); - EAREditModel editModel = null; - try { - editModel = earNature.getEarEditModelForRead(key); - Iterator iterator = structuredSelection.iterator(); - while (iterator.hasNext()) { - Object next = iterator.next(); - IProject projectToAdd = (IProject) AdaptabilityUtility.getAdapter(next, IProject.class); - if (null == projectToAdd || !projectToAdd.isAccessible()) { - return false; - } - - if (!validateProjectToAdd(projectToAdd, earVersion)) { - return false; - } - - if (editModel.hasMappingToProject(projectToAdd)) { - return false; - } - } - } finally { - if (null != editModel) { - editModel.releaseAccess(key); - } - } - return true; - } - return false; - } - - protected abstract boolean validateProjectToAdd(IProject projectToAdd, int earVersion); - - protected abstract WTPOperationDataModel getDataModel(IProject earProject, IProject projectToAdd); - - protected void doInit() { - //default nothing - } - - public boolean run(Object source, Object target) { - if (source instanceof IStructuredSelection) - return run((IStructuredSelection) source, (IProject) AdaptabilityUtility.getAdapter(target, IProject.class)); - return false; - } - - public boolean run(CommonNavigatorDropAdapter dropAdapter, Object source, Object target) { - return run(source, target); - } - - protected boolean run(IStructuredSelection selection, IProject earProject) { - if (selection == null || selection.isEmpty() || earProject == null || !earProject.isAccessible()) - return false; - - for (Iterator selectionIterator = selection.iterator(); selectionIterator.hasNext();) { - Object sourceObject = selectionIterator.next(); - - IProject projectToAdd = (IProject) AdaptabilityUtility.getAdapter(sourceObject, IProject.class); - if (projectToAdd != null) { - try { - WTPOperationDataModel dataModel = getDataModel(earProject, projectToAdd); - dataModel.getDefaultOperation().run(null); - } catch (InvocationTargetException e) { - NavigatorPlugin.log(e.toString()); - } catch (InterruptedException e) { - NavigatorPlugin.log(e.toString()); - } - } - } - return true; - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddUtilityJarDropAction.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddUtilityJarDropAction.java deleted file mode 100644 index 5aa9947f8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddUtilityJarDropAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Jun 9, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jst.j2ee.application.internal.operations.AddArchiveToEARDataModel; -import org.eclipse.jst.j2ee.application.internal.operations.AddUtilityProjectToEARDataModel; -import org.eclipse.jst.j2ee.internal.wizard.ServerTargetUIHelper; -import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel; - -/** - * @author jsholl - * - */ -public class AddUtilityJarDropAction extends AddProjectToEarDropAction { - - public AddUtilityJarDropAction() { - super(); - } - - protected boolean validateProjectToAdd(IProject projectToAdd, int earVersion) { - try { - return projectToAdd.hasNature(JavaCore.NATURE_ID); - } catch (CoreException e) { - //Ignore - } - return false; - } - - protected WTPOperationDataModel getDataModel(IProject earProject, IProject projectToAdd) { - WTPOperationDataModel dataModel = null; - boolean syncServerTarget = ServerTargetUIHelper.setModuleServerTargetIfNecessary(earProject, projectToAdd, getShell()); - dataModel = AddUtilityProjectToEARDataModel.createAddToEARDataModel(earProject.getName(), projectToAdd); - dataModel.setBooleanProperty(AddArchiveToEARDataModel.SYNC_TARGET_RUNTIME, syncServerTarget); - return dataModel; - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/J2EEImportDropAction.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/J2EEImportDropAction.java deleted file mode 100644 index 45ee0c6bf..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/J2EEImportDropAction.java +++ /dev/null @@ -1,266 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on May 6, 2004 - * - */ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.jst.ejb.ui.internal.wizard.EJBModuleImportWizard; -import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel; -import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel; -import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleImportDataModel; -import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientModuleImportDataModel; -import org.eclipse.jst.j2ee.applicationclient.internal.creation.IApplicationClientNatureConstants; -import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; -import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile; -import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException; -import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveOptions; -import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl; -import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; -import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; -import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants; -import org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBModuleImportDataModel; -import org.eclipse.jst.j2ee.internal.jca.operations.ConnectorModuleImportDataModel; -import org.eclipse.jst.j2ee.internal.project.IConnectorNatureConstants; -import org.eclipse.jst.j2ee.internal.project.IEJBNatureConstants; -import org.eclipse.jst.j2ee.internal.project.IWebNatureConstants; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.jst.j2ee.internal.web.archive.operations.WebModuleImportDataModel; -import org.eclipse.jst.j2ee.internal.wizard.AppClientModuleImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.ImportUtil; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorModuleImportWizard; -import org.eclipse.jst.servlet.ui.internal.wizard.WebModuleImportWizard; -import org.eclipse.swt.dnd.FileTransfer; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility; -import org.eclipse.wst.common.frameworks.internal.ui.WTPWizard; -import org.eclipse.wst.common.navigator.internal.views.dnd.CommonNavigatorDropAdapter; -import org.eclipse.wst.common.navigator.internal.views.dnd.IDropValidator; -import org.eclipse.wst.common.navigator.internal.views.dnd.NavigatorDropActionDelegate; - -/** - * @author jsholl - * - */ -public class J2EEImportDropAction extends NavigatorDropActionDelegate implements IDropValidator { - private ArchiveOptions readOnlyArchiveOptions; - - public J2EEImportDropAction() { - readOnlyArchiveOptions = new ArchiveOptions(); - readOnlyArchiveOptions.setIsReadOnly(true); - } - - private boolean fileExistsOnDisk(String fileName) { - if (fileName != null && fileName.length() > 0) { - java.io.File file = new java.io.File(fileName); - return file.exists() && !file.isDirectory(); - } - return false; - } - - public boolean validateDrop(CommonNavigatorDropAdapter dropAdapter, Object target, int operation, TransferData transferType) { - if (FileTransfer.getInstance().isSupportedType(transferType)) { - String[] sourceNames = (String[]) FileTransfer.getInstance().nativeToJava(transferType); - if (sourceNames == null || sourceNames.length != 1) { //only handle one file for now - return false; - } - String fileName = sourceNames[0]; - if (!(fileName.endsWith(".ear") || fileName.endsWith(".jar") || fileName.endsWith(".war") || fileName.endsWith(".rar"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - return false; - } - if (!fileExistsOnDisk(fileName)) { - return false; - } - int archiveType = ImportUtil.UNKNOWN; - Archive archive = null; - try { - archive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName); - archiveType = ImportUtil.getArchiveType(archive); - String[] possibleNatures = null; - switch (archiveType) { - case ImportUtil.EARFILE : - possibleNatures = new String[]{IEARNatureConstants.NATURE_ID}; - break; - case ImportUtil.EJBJARFILE : - possibleNatures = new String[]{IEARNatureConstants.NATURE_ID, IEJBNatureConstants.NATURE_ID}; - break; - case ImportUtil.CLIENTJARFILE : - possibleNatures = new String[]{IEARNatureConstants.NATURE_ID, IApplicationClientNatureConstants.NATURE_ID}; - break; - case ImportUtil.WARFILE : - possibleNatures = new String[]{IEARNatureConstants.NATURE_ID, IWebNatureConstants.J2EE_NATURE_ID}; - break; - case ImportUtil.RARFILE : - possibleNatures = new String[]{IEARNatureConstants.NATURE_ID, IConnectorNatureConstants.NATURE_ID}; - break; - default : - return false; - } - - IProject project = (IProject) AdaptabilityUtility.getAdapter(target, IProject.class); - if (null != project) { - try { - boolean foundNature = false; - for (int i = 0; !foundNature && i < possibleNatures.length; i++) { - if (project.hasNature(possibleNatures[i])) { - foundNature = true; - J2EENature nature = (J2EENature) project.getNature(possibleNatures[i]); - int projectJ2EEVersion = nature.getJ2EEVersion(); - int archiveModuleVersion = ArchiveUtil.getFastSpecVersion((ModuleFile) archive); - boolean fail = false; - switch (archiveType) { - case ImportUtil.EARFILE : - case ImportUtil.CLIENTJARFILE : - if (projectJ2EEVersion < archiveModuleVersion) { - fail = true; - } - break; - case ImportUtil.EJBJARFILE : - if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_2_ID && archiveModuleVersion > J2EEVersionConstants.EJB_1_1_ID) { - fail = true; - } else if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_3_ID && archiveModuleVersion > J2EEVersionConstants.EJB_2_0_ID) { - fail = true; - } - break; - case ImportUtil.WARFILE : - if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_2_ID && archiveModuleVersion > J2EEVersionConstants.WEB_2_2_ID) { - fail = true; - } else if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_3_ID && archiveModuleVersion > J2EEVersionConstants.WEB_2_3_ID) { - fail = true; - } - break; - case ImportUtil.RARFILE : - if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_2_ID) { - fail = true; - } else if (projectJ2EEVersion == J2EEVersionConstants.J2EE_1_3_ID && archiveModuleVersion > J2EEVersionConstants.JCA_1_0_ID) { - fail = true; - } - break; - } - if (fail) { - return false; - } - return true; - } - } - if (!foundNature) { - return false; - } - } catch (CoreException e) { - return false; - } - } - - } catch (OpenFailureException e) { - return false; - } finally { - if (null != archive && archive.isOpen()) { - archive.close(); - } - } - return true; - } - return false; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.navigator.dnd.NavigatorDropActionDelegate#run(org.eclipse.wst.common.navigator.internal.views.navigator.dnd.CommonNavigatorDropAdapter, - * java.lang.Object, java.lang.Object) - */ - public boolean run(CommonNavigatorDropAdapter dropAdapter, Object source, Object target) { - TransferData currentTransfer = dropAdapter.getCurrentTransfer(); - if (FileTransfer.getInstance().isSupportedType(currentTransfer)) { - final String[] fileNames = (String[]) source; - final String fileName = fileNames[0]; - WTPWizard wizard = null; - J2EEArtifactImportDataModel dataModel = null; - - int archiveType = ImportUtil.UNKNOWN; - Archive archive = null; - try { - archive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName); - archiveType = ImportUtil.getArchiveType(archive); - switch (archiveType) { - case ImportUtil.EARFILE : - dataModel = new EnterpriseApplicationImportDataModel(); - break; - case ImportUtil.EJBJARFILE : - dataModel = new EJBModuleImportDataModel(); - break; - case ImportUtil.CLIENTJARFILE : - dataModel = new AppClientModuleImportDataModel(); - break; - case ImportUtil.WARFILE : - dataModel = new WebModuleImportDataModel(); - break; - case ImportUtil.RARFILE : - dataModel = new ConnectorModuleImportDataModel(); - break; - default : - return false; - } - } catch (OpenFailureException e) { - return false; - } finally { - if (null != archive && archive.isOpen()) { - archive.close(); - } - } - - dataModel.setProperty(J2EEArtifactImportDataModel.FILE_NAME, fileName); - - IProject project = (IProject) AdaptabilityUtility.getAdapter(target, IProject.class); - if (null != project) { - try { - if (archiveType == ImportUtil.EARFILE || !project.hasNature(IEARNatureConstants.NATURE_ID)) { - dataModel.setProperty(J2EEArtifactImportDataModel.PROJECT_NAME, project.getName()); - } else { - dataModel.setProperty(J2EEModuleImportDataModel.EAR_NAME, project.getName()); - dataModel.setBooleanProperty(J2EEModuleImportDataModel.ADD_TO_EAR, true); - } - } catch (CoreException e) { - return false; - } - } - switch (archiveType) { - case ImportUtil.EARFILE : - wizard = new EnterpriseApplicationImportWizard((EnterpriseApplicationImportDataModel) dataModel); - break; - case ImportUtil.EJBJARFILE : - wizard = new EJBModuleImportWizard((EJBModuleImportDataModel) dataModel); - break; - case ImportUtil.CLIENTJARFILE : - wizard = new AppClientModuleImportWizard((AppClientModuleImportDataModel) dataModel); - break; - case ImportUtil.WARFILE : - wizard = new WebModuleImportWizard((WebModuleImportDataModel) dataModel); - break; - case ImportUtil.RARFILE : - wizard = new ConnectorModuleImportWizard((ConnectorModuleImportDataModel) dataModel); - break; - } - - if (null != wizard) { - WizardDialog dialog = new WizardDialog(getShell(), wizard); - dialog.open(); - return true; - } - } - return false; - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java deleted file mode 100644 index dbe89322c..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility; -import org.eclipse.wst.common.navigator.internal.views.dnd.ISerializer; - - - -/** - * @author mdelder - * - */ -public class ModuleIdentifierSerializer implements ISerializer { - - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.navigator.dnd.ISerializer#toByteArray(java.lang.Object) - */ - public byte[] toByteArray(Object data) { - IProject project = (IProject) AdaptabilityUtility.getAdapter(data, IProject.class); - if (project != null) - return project.getName().getBytes(); - return null; - } - - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.navigator.dnd.ISerializer#fromByteArray(byte[]) - */ - public Object fromByteArray(byte[] data) { - String name = new String(data); - return ResourcesPlugin.getWorkspace().getRoot().getProject(name); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/plugin/J2EENavigatorPlugin.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/plugin/J2EENavigatorPlugin.java deleted file mode 100644 index 20447f27c..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/plugin/J2EENavigatorPlugin.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.plugin; - -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -/** - * The main plugin class to be used in the desktop. - */ -public class J2EENavigatorPlugin extends AbstractUIPlugin { - //The shared instance. - private static J2EENavigatorPlugin plugin; - public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.navigator.ui"; //$NON-NLS-1$ - - - /** - * The constructor. - */ - public J2EENavigatorPlugin() { - super(); - plugin = this; - } - - /** - * Returns the shared instance. - */ - public static J2EENavigatorPlugin getDefault() { - return plugin; - } - - /** - * Returns the workspace instance. - */ - public static IWorkspace getWorkspace() { - return ResourcesPlugin.getWorkspace(); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSet.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSet.java deleted file mode 100644 index 8297bc8a4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSet.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Created on Mar 24, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import java.util.ArrayList; - -import org.eclipse.core.internal.runtime.InternalPlatform; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.util.Assert; -import org.eclipse.jst.common.navigator.internal.ui.workingsets.AbstractWorkingSetManager; -import org.eclipse.jst.common.navigator.internal.ui.workingsets.ICommonWorkingSet; -import org.eclipse.ui.IActionFilter; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.IPersistableElement; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.IWorkingSetManager; -import org.eclipse.ui.internal.IWorkbenchConstants; -import org.eclipse.ui.internal.WorkbenchPlugin; -import org.eclipse.ui.internal.registry.WorkingSetDescriptor; -import org.eclipse.ui.internal.registry.WorkingSetRegistry; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSet implements ICommonWorkingSet,IActionFilter{ - - static final String FACTORY_ID = "org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSetFactory"; //$NON-NLS-1$ - - private static final String COMPONENT_TYPE_ID = "componentTypeId"; //$NON-NLS-1$ - - private static final String EDIT_PAGE_ID = "editPageId"; //$NON-NLS-1$ - - public static final String COMPONENT_WORKING_SET_ID = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage"; - - private String name; - - private ArrayList elements; - - private String editPageId; - - private IMemento workingSetMemento; - - private IWorkingSetManager manager; - - private String typeId; - - public static final String TAG_TYPE_ID = "typeId"; //$NON-NLS-1$ - - - /** - * Creates a new working set. - * - * @param name the name of the new working set. Should not have - * leading or trailing whitespace. - * @param element the content of the new working set. - * May be empty but not <code>null</code>. - */ - public ComponentWorkingSet(String aName, IAdaptable[] elements) { - name = aName; - internalSetElements(elements); - - } - - /** - * Creates a new working set from a memento. - * - * @param name the name of the new working set. Should not have - * leading or trailing whitespace. - * @param memento persistence memento containing the elements of - * the working set. - */ - ComponentWorkingSet(String aName, String aTypeId, IMemento memento) { - name = aName; - typeId = aTypeId; - workingSetMemento = memento; - internalSetElements(new IAdaptable[0]); - } - - /** - * @param descriptor2 - */ - public ComponentWorkingSet(ComponentWorkingSetDescriptor aDescriptor) { - name = aDescriptor.getLabel(); - typeId = aDescriptor.getTypeId(); - editPageId = aDescriptor.getId(); - internalSetElements(new IAdaptable[0]); - } - - /** - * Tests the receiver and the object for equality - * - * @param object object to compare the receiver to - * @return true=the object equals the receiver, the name is the same. - * false otherwise - */ - public boolean equals(Object object) { - if (this == object) { - return true; - } - if (object instanceof ComponentWorkingSet) { - ComponentWorkingSet workingSet = (ComponentWorkingSet) object; - String objectPageId = workingSet.getId(); - String pageId = getId(); - boolean pageIdEqual = (objectPageId == null && pageId == null) - || (objectPageId != null && objectPageId.equals(pageId)); - String objectTypeId = workingSet.getTypeId(); - String typeId = getTypeId(); - boolean typeIdEqual = (objectTypeId == null && typeId == null) - || (objectTypeId != null && objectTypeId.equals(typeId)); - return workingSet.getName().equals(getName()) - && workingSet.getElementsArray().equals(getElementsArray()) - && pageIdEqual - && typeIdEqual; - } - return false; - } - - /** - * {@inheritDoc} - */ - public boolean isEditable() { - WorkingSetRegistry registry = WorkbenchPlugin.getDefault().getWorkingSetRegistry(); - String id= getId(); - if (id == null) - return false; - WorkingSetDescriptor descriptor= registry.getWorkingSetDescriptor(id); - if (descriptor == null) - return false; - return descriptor.isEditable(); - } -// - /** - * Returns the receiver if the requested type is either IWorkingSet - * or IPersistableElement. - * - * @param adapter the requested type - * @return the receiver if the requested type is either IWorkingSet - * or IPersistableElement. - */ - public Object getAdapter(Class adapter) { - if (adapter == IWorkingSet.class - || adapter == IPersistableElement.class) { - return this; - } - return InternalPlatform.getDefault().getAdapterManager().getAdapter(this, adapter); - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public IAdaptable[] getElements() { - ArrayList list = getElementsArray(); - return (IAdaptable[]) list.toArray(new IAdaptable[list.size()]); - } - - /** - * Returns the elements array list. Lazily restores the elements from - * persistence memento. - * - * @return the elements array list - */ - private ArrayList getElementsArray() { - if (elements == null) { - restoreWorkingSet(); - workingSetMemento = null; - } - return elements; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IPersistableElement - */ - public String getFactoryId() { - return FACTORY_ID; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public String getId() { - if (editPageId == null) - editPageId = COMPONENT_WORKING_SET_ID; - return editPageId; - } - - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public String getName() { - return name; - } - - /** - * Returns the hash code. - * - * @return the hash code. - */ - public int hashCode() { - int hashCode = name.hashCode() & typeId.hashCode(); - - if (editPageId != null) { - hashCode &= editPageId.hashCode(); - } - return hashCode; - } - - /** - * Recreates the working set elements from the persistence memento. - */ - private void restoreWorkingSet() { - //updateElements(); - } - - /** - * Implements IPersistableElement. - * Persist the working set name and working set contents. - * The contents has to be either IPersistableElements or provide - * adapters for it to be persistent. - * - * @see org.eclipse.ui.IPersistableElement#saveState(IMemento) - */ - public void saveState(IMemento memento) { - if (workingSetMemento != null) { - // just re-save the previous memento if the working set has - // not been restored - memento.putMemento(workingSetMemento); - } else { - memento.putString(IWorkbenchConstants.TAG_NAME, getName()); - memento.putString(IWorkbenchConstants.TAG_EDIT_PAGE_ID, getId()); - memento.putString(TAG_TYPE_ID,typeId); - } - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public void setElements(IAdaptable[] newElements) { - internalSetElements(newElements); - fireWorkingSetChanged(IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE, null); - } - - /** - * Create a copy of the elements to store in the receiver. - * - * @param elements the elements to store a copy of in the - * receiver. - */ - private void internalSetElements(IAdaptable[] newElements) { - Assert.isNotNull(newElements, - "Working set elements array must not be null"); //$NON-NLS-1$ - - elements = new ArrayList(newElements.length); - for (int i = 0; i < newElements.length; i++) { - elements.add(newElements[i]); - } - } -// - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public void setId(String pageId) { - editPageId = pageId; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSet - */ - public void setName(String newName) { - Assert.isNotNull(newName, "Working set name must not be null"); //$NON-NLS-1$ - - name = newName; - fireWorkingSetChanged(IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE, null); - } - - public void connect(IWorkingSetManager manager) { - Assert.isTrue(this.manager == null, "A working set can only be connected to one manager"); //$NON-NLS-1$ - this.manager= manager; - } - - public void disconnect() { - this.manager= null; - - } - - - private void fireWorkingSetChanged(String property, Object oldValue) { - AbstractWorkingSetManager receiver= manager != null - ? (AbstractWorkingSetManager)manager - : (AbstractWorkingSetManager)WorkbenchPlugin.getDefault().getWorkingSetManager(); - receiver.workingSetChanged(this, property, oldValue); - } - - - - public ImageDescriptor getImage() { - ComponentWorkingSetRegistry registry = ComponentWorkingSetRegistry.getInstance(); - ComponentWorkingSetDescriptor descriptor = null; - - descriptor = registry.getWorkingSetDescriptor(getId(), typeId); - if (descriptor == null) { - return null; - } - return descriptor.getIcon(); - - } - - public String getTypeId() { - return typeId; - } - - - - - - public boolean testAttribute(Object target, String name, String value) { - if (COMPONENT_TYPE_ID.equals(name)) - return getTypeId().equals(value); - if (EDIT_PAGE_ID.equals(name)) - return getId().equals(value); - - return false; - - } - - - - - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetDescriptor.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetDescriptor.java deleted file mode 100644 index 23d48e416..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetDescriptor.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Created on Mar 23, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.WorkbenchException; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSetDescriptor { - - private IConfigurationElement configElement; - public static final String ATT_ID = "id"; //$NON-NLS-1$ - public static final String ATT_LABEL = "label"; //$NON-NLS-1$ - public static final String ATT_ICON = "icon"; //$NON-NLS-1$ - public static final String ATT_MODULE_TYPE = "typeId"; //$NON-NLS-1$ - - private String id ; - private String label ; - private String icon; - private String typeId; - - - /** - * @param anElement - */ - public ComponentWorkingSetDescriptor(IConfigurationElement aConfigElement) throws WorkbenchException{ - super(); - configElement = aConfigElement; - init(); - } - - void init() throws WorkbenchException { - label = configElement.getAttribute(ATT_LABEL); - id = configElement.getAttribute(ATT_ID); - typeId = configElement.getAttribute(ATT_MODULE_TYPE); - icon = configElement.getAttribute(ATT_ICON); - - if (id == null || id.length() == 0) { - throw new WorkbenchException("Missing attribute: " + //$NON-NLS-1$ - ATT_ID + " in common working set extension: " + //$NON-NLS-1$ - configElement.getDeclaringExtension().getUniqueIdentifier()); - } - - if (label == null || label.length() == 0) { - throw new WorkbenchException("Missing attribute: " + //$NON-NLS-1$ - ATT_LABEL + " in common working set extension: " + //$NON-NLS-1$ - configElement.getDeclaringExtension().getUniqueIdentifier()); - } - - if (typeId == null || typeId.length() == 0) { - throw new WorkbenchException("Missing attribute: " + //$NON-NLS-1$ - ATT_MODULE_TYPE + " in common working set extension: " + //$NON-NLS-1$ - configElement.getDeclaringExtension().getUniqueIdentifier()); - } - } - - /** - * @return - */ - public String getTypeId() { - // TODO Auto-generated method stub - return typeId; - } - - public String getId() { - // TODO Auto-generated method stub - return id; - } - - /** - * @return - */ - public String getLabel() { - // TODO Auto-generated method stub - return label; - } - - /** - * Returns the page's icon - * - * @return the page's icon - */ - public ImageDescriptor getIcon() { - if (icon == null) - return null; - - IExtension extension = configElement.getDeclaringExtension(); - String extendingPluginId = extension.getNamespace(); - return AbstractUIPlugin.imageDescriptorFromPlugin(extendingPluginId, - icon); - } - - /** - * @throws BundleException - * - */ -// public void start() throws BundleException { -// Bundle bundle= Platform.getBundle(configElement.getDeclaringExtension().getNamespace()); -// if ( bundle.getState() != Bundle.ACTIVE ) -// bundle.start(); -// -// } -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetFactory.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetFactory.java deleted file mode 100644 index 8fe91a7b6..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Created on Mar 28, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.ui.IElementFactory; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.internal.IWorkbenchConstants; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSetFactory implements IElementFactory { - - /** - * - */ - public ComponentWorkingSetFactory() { - super(); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IElementFactory - */ - public IAdaptable createElement(IMemento memento) { - String workingSetName = memento.getString(IWorkbenchConstants.TAG_NAME); - String typeId = memento.getString(ComponentWorkingSet.TAG_TYPE_ID); - String workingSetEditPageId = memento - .getString(IWorkbenchConstants.TAG_EDIT_PAGE_ID); - - if (workingSetName == null) - return null; - - ComponentWorkingSet workingSet = new ComponentWorkingSet(workingSetName, typeId, memento); - if (workingSetEditPageId != null) { - workingSet.setId(workingSetEditPageId); - } else { - // working sets created with builds 20020418 and 20020419 will not - // have an edit page id. fix this automatically. - workingSet.setId(ComponentWorkingSet.COMPONENT_WORKING_SET_ID); //$NON-NLS-1$ - } - return workingSet; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetProvider.java deleted file mode 100644 index 84ea80489..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetProvider.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Created on Mar 25, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jst.common.navigator.internal.ui.workingsets.ICommonWorkingSetProvider; -import org.eclipse.ui.IWorkingSet; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSetProvider implements ICommonWorkingSetProvider { - - private static final ComponentWorkingSetRegistry COMPONENT_WORKING_SET_REGISTRY = ComponentWorkingSetRegistry.getInstance(); - boolean bInitialized = false; - List workingSets = new ArrayList(); - /** - * - */ - public ComponentWorkingSetProvider() { - super(); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.common.navigator.internal.ui.workingsets.IWorkingSetProvider#getWorkingSets() - */ - public IWorkingSet[] getWorkingSets() { - if (!bInitialized) { - //workingSets.clear(); - synchronized (workingSets) { - ComponentWorkingSetDescriptor[] set = COMPONENT_WORKING_SET_REGISTRY.getComponentWorkingSetDescriptors(); - ComponentWorkingSetDescriptor descriptor = null; - IWorkingSet workingSet = null; - for (int x=0; x<set.length;++ x) { - descriptor = set[x]; - workingSet= new ComponentWorkingSet(descriptor); - workingSets.add(workingSet); - bInitialized = true; - } - } - } - - IWorkingSet[] ws = new IWorkingSet[workingSets.size()]; - return (IWorkingSet[])workingSets.toArray(ws); - } - - /* (non-Javadoc) - * @see org.eclipse.jst.common.navigator.internal.ui.workingsets.IWorkingSetProvider#init(org.eclipse.jst.common.navigator.internal.ui.workingsets.WorkingSetModel) - */ -// public void init(WorkingSetModel workingSetModel) { -// // TODO Auto-generated method stub - -// } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetRegistry.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetRegistry.java deleted file mode 100644 index a9c2a21a3..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetRegistry.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Created on Mar 23, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.ui.WorkbenchException; -import org.eclipse.wst.common.navigator.internal.plugin.WorkbenchNavigatorPlugin; -import org.eclipse.wst.common.navigator.internal.views.extensions.RegistryReader; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSetRegistry { - private static final ComponentWorkingSetRegistry INSTANCE = new ComponentWorkingSetRegistry(); - private static boolean isInitialized = false; - private static final String[] NO_DESCRIPTORS = new String[0]; - private List commonWorkingSetDescriptors = new ArrayList(); - - /** - * - */ - public ComponentWorkingSetRegistry() { - super(); - // TODO Auto-generated constructor stub - } - - public void init() { - new ComponentWorkingSetRegistryReader().readRegistry(); - } - - /** - * - */ - public static ComponentWorkingSetRegistry getInstance() { - if (isInitialized) - return INSTANCE; - synchronized (INSTANCE) { - if (!isInitialized) { - INSTANCE.init(); - isInitialized = true; - } - } - return INSTANCE; - } - - /** - * @param aDesc - */ - private void addCommonWorkingSetDescriptor(ComponentWorkingSetDescriptor aDesc) { - if (aDesc == null) - return; - synchronized (commonWorkingSetDescriptors) { - boolean bValue = commonWorkingSetDescriptors.contains(aDesc); - if (bValue == false) { - commonWorkingSetDescriptors.add(aDesc); - } - } - } - - public ComponentWorkingSetDescriptor[] getComponentWorkingSetDescriptors() { - ComponentWorkingSetDescriptor[] descriptors = new ComponentWorkingSetDescriptor[commonWorkingSetDescriptors.size()]; - return (ComponentWorkingSetDescriptor[])commonWorkingSetDescriptors.toArray(descriptors); - - } - - public boolean containsId(String id) { - ComponentWorkingSetDescriptor descriptor = null; - for (int x=0; x< commonWorkingSetDescriptors.size(); ++x) { - descriptor = (ComponentWorkingSetDescriptor)commonWorkingSetDescriptors.get(x); - if (descriptor.getId().equals(id)) - return true; - } - return false; - } - - class ComponentWorkingSetRegistryReader extends RegistryReader { - - private static final String COMPONENT_WORKING_SET = "componentWorkingSet"; //$NON-NLS-1$ - - - ComponentWorkingSetRegistryReader() { - super(J2EENavigatorPlugin.PLUGIN_ID, COMPONENT_WORKING_SET); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.extensions.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement) - */ - protected boolean readElement(IConfigurationElement anElement) { - if (COMPONENT_WORKING_SET.equals(anElement.getName())) { - try { - addCommonWorkingSetDescriptor(new ComponentWorkingSetDescriptor(anElement)); - return true; - } catch (WorkbenchException e) { - // log an error since its not safe to open a dialog here - WorkbenchNavigatorPlugin.log("Unable to create common working set descriptor.", e.getStatus());//$NON-NLS-1$ - } - } - return false; - } - } - - /** - * @param editPageId - * @param typeId - * @return - */ - public ComponentWorkingSetDescriptor getWorkingSetDescriptor(String editPageId, String typeId) { - ComponentWorkingSetDescriptor[] descriptors = getComponentWorkingSetDescriptors(); - ComponentWorkingSetDescriptor descriptor = null; - for (int x=0; x< descriptors.length ; ++x) { - descriptor = descriptors[x]; - if (descriptor.getId().equals(editPageId) - && descriptor.getTypeId().equals(typeId)) - return descriptor; - } - return null; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetUpdater.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetUpdater.java deleted file mode 100644 index c05d9f1d4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/workingsets/ComponentWorkingSetUpdater.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Created on Mar 24, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.eclipse.jst.j2ee.navigator.internal.workingsets; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.logging.Level; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.ui.IWorkingSet; -import org.eclipse.ui.IWorkingSetUpdater; -import org.eclipse.wst.common.componentcore.internal.ComponentType; -import org.eclipse.wst.common.componentcore.internal.StructureEdit; -import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent; - -/** - * @author Admin - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class ComponentWorkingSetUpdater implements IWorkingSetUpdater, - IResourceChangeListener/*, IResourceDeltaVisitor*/ { - - public static final String ID= "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage"; //$NON-NLS-1$ - - private List fWorkingSets; - - private HashMap projectStructureEdits; - - private static class WorkingSetDelta { - private IWorkingSet fWorkingSet; - private List fElements; - private boolean fChanged; - public WorkingSetDelta(IWorkingSet workingSet) { - fWorkingSet= workingSet; - fElements= new ArrayList(Arrays.asList(workingSet.getElements())); - } - - public IWorkingSet getWorkingSet() { - return fWorkingSet; - } - - public int indexOf(Object element) { - return fElements.indexOf(element); - } - - public void add( Object element) { - synchronized (fWorkingSet) { - if (indexOf(element) ==-1) { - fElements.add(element); - fChanged= true; - } - } - } - public void remove(int index) { - if (fElements.remove(index) != null) { - fChanged= true; - } - } - public void process() { - if (fChanged) { - fWorkingSet.setElements((IAdaptable[])fElements.toArray(new IAdaptable[fElements.size()])); - } - } - } - - /** - * - */ - public ComponentWorkingSetUpdater() { - super(); - fWorkingSets= new ArrayList(); - ResourcesPlugin.getWorkspace().addResourceChangeListener(this); - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSetUpdater#add(org.eclipse.ui.IWorkingSet) - */ - public void add(IWorkingSet workingSet) { - //checkElementExistence(workingSet); - synchronized (fWorkingSets) { - - updateElements(workingSet); - fWorkingSets.add(workingSet); - } - - } - - - /** - * @param project - * @param typeId - * @return - */ - private boolean containsModuleType(IProject project, String typeId) { - boolean bReturn = false; - try { - if (project.isAccessible()) { - synchronized (this) { - StructureEdit moduleCore = null; - moduleCore = getStructureEdit(project); - if (moduleCore == null) return false; - WorkbenchComponent[] workBenchModules = moduleCore.getWorkbenchModules(); - if (workBenchModules != null){ - for (int i = 0; i < workBenchModules.length; i++) { - WorkbenchComponent module = workBenchModules[i]; - ComponentType componentType = module.getComponentType() ; - if (componentType == null) { - String msg = "Component Type is null for the module: " + module.getName() + " in project: " + project.getName(); - Logger.getLogger().log(msg,Level.SEVERE); - continue; - } - if (typeId.equals(componentType.getComponentTypeId())) { - bReturn = true; - break; - } - } - } - - } - } - } catch (Exception ex) { - Logger.getLogger().logError(ex); - } - return bReturn; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSetUpdater#remove(org.eclipse.ui.IWorkingSet) - */ - public boolean remove(IWorkingSet workingSet) { - boolean result; - synchronized(fWorkingSets) { - result= fWorkingSets.remove(workingSet); - } - return result; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSetUpdater#contains(org.eclipse.ui.IWorkingSet) - */ - public boolean contains(IWorkingSet workingSet) { - synchronized(fWorkingSets) { - return fWorkingSets.contains(workingSet); - } - } - - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkingSetUpdater#dispose() - */ - public void dispose() { - synchronized(fWorkingSets) { - fWorkingSets.clear(); - } - disposeStructureEdits(); - ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); - } - - - - - /* (non-Javadoc) - * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent) - */ - public void resourceChanged(IResourceChangeEvent event) { - - IResourceDelta delta= event.getDelta(); - if (delta == null) return; - IResourceDelta[] affectedChildren= delta.getAffectedChildren(IResourceDelta.ADDED | IResourceDelta.REMOVED | IResourceDelta.CHANGED, IResource.PROJECT); - if (affectedChildren.length > 0) { - for (int i= 0; i < affectedChildren.length; i++) { - IResourceDelta projectDelta= affectedChildren[i]; - IProject project = (IProject)projectDelta.getResource(); - - IWorkingSet[] workingSets; - synchronized(fWorkingSets) { - workingSets= (IWorkingSet[])fWorkingSets.toArray(new IWorkingSet[fWorkingSets.size()]); - } - for (int w= 0; w < workingSets.length; w++) { - WorkingSetDelta workingSetDelta= new WorkingSetDelta(workingSets[w]); - processResourceDelta(workingSetDelta,projectDelta, project); - workingSetDelta.process(); - } - } - } - } - - - - - private void processResourceDelta(WorkingSetDelta result, IResourceDelta aDelta, IProject aProject) { - //IResource resource= aDelta.getResource(); - - int index= result.indexOf(aProject); - int kind= aDelta.getKind(); - int flags= aDelta.getFlags(); - - - switch (aDelta.getKind()) { - case IResourceDelta.REMOVED : - if (index != -1) { - result.remove(index) ; - disposeStructureEdits(aProject); - - } - break; - case IResourceDelta.ADDED : { - ComponentWorkingSet workingSet = (ComponentWorkingSet) result.getWorkingSet(); - if (containsModuleType(aProject,workingSet.getTypeId())) { - if (index == -1) - result.add(aProject); - } - break; - } - - - case IResourceDelta.CHANGED : - // boolean natureMayHaveChanged = ((aDelta.getFlags() & IResourceDelta.DESCRIPTION) != 0) && ((aDelta.getFlags() & IResourceDelta.MARKERS) == 0); - boolean projectOpenStateChanged = ((aDelta.getFlags() & IResourceDelta.OPEN) != 0); - if (/*natureMayHaveChanged ||*/ projectOpenStateChanged) { - if (aProject.isOpen()) { - ComponentWorkingSet workingSet = (ComponentWorkingSet) result.getWorkingSet(); - if (containsModuleType(aProject,workingSet.getTypeId())) { - result.add(aProject); - } - } else { - if (index != -1) { - result.remove(index) ; - disposeStructureEdits(aProject); - - } - } - - } else { - ComponentWorkingSet workingSet = (ComponentWorkingSet) result.getWorkingSet(); - if (containsModuleType(aProject,workingSet.getTypeId())) { - if (index == -1) - result.add(aProject); - } else { - if (index != -1) { - result.remove(index) ; - } - } - break; - } - break; - } - - } - - - private void updateElements(IWorkingSet workingSet) { - if (workingSet instanceof ComponentWorkingSet) { - ComponentWorkingSet componentWorkingSet = (ComponentWorkingSet) workingSet; - List result= new ArrayList(); - IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); - for (int i= 0; i < projects.length; i++) { - try { - if (containsModuleType(projects[i],componentWorkingSet.getTypeId())) { - result.add(projects[i]); - } - } catch (Exception ex) { - Logger.getLogger().logError(ex); - } - } - componentWorkingSet.setElements((IAdaptable[])result.toArray(new IAdaptable[result.size()])); - } - } - - - private void disposeStructureEdits() { - Set keys = getProjectStructureEdits().keySet(); - for (Iterator iter = keys.iterator(); iter.hasNext();) { - IProject proj = (IProject) iter.next(); - StructureEdit se =(StructureEdit)getProjectStructureEdits().get(proj); - if (se != null) - se.dispose(); - - } - } - - private void disposeStructureEdits(IProject aProject) { - StructureEdit se =(StructureEdit)getProjectStructureEdits().get(aProject); - if (se != null) - se.dispose(); - getProjectStructureEdits().remove(aProject); - } - - private HashMap getProjectStructureEdits() { - if (projectStructureEdits != null) - return projectStructureEdits; - - synchronized(this) { - if (projectStructureEdits == null) - projectStructureEdits = new HashMap(); - } - return projectStructureEdits; - - } - - public StructureEdit getStructureEdit(IProject aProject) { - if (getProjectStructureEdits().get(aProject) == null) - getProjectStructureEdits().put(aProject,StructureEdit.getStructureEditForRead(aProject)); - return (StructureEdit)getProjectStructureEdits().get(aProject); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.properties b/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.properties deleted file mode 100644 index ed407fc71..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.properties +++ /dev/null @@ -1,30 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2004 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -Plugin.name=J2EE Extensions to Common Navigator -Plugin.providerName=Eclipse.org -Plugin.description=Contains J2EE Extensions built on the Common Navigator Framework -j2ee=J2EE -j2ee.view_ui_=Project Explorer -j2ee.category_ui_=J2EE -Enterprise_Applications=Enterprise Applications -Application_Client_Projects=Application Client Projects -Connector_Projects=Connector Projects -EJB_Projects=EJB Projects -Web_Projects=Dynamic Web Projects -Other_Projects=Other Projects -J2EE_Add_Module=J2EE Add Module -Adds_J2EE_modules_to_EAR_projects=Adds J2EE modules to EAR projects -J2EE_Add_Utility_Jar=J2EE Add Utility Jar -Adds_Utility_Jars_to_EAR_projects=Adds Utility Jars to EAR projects -J2EE_Utility_Jar_Import=J2EE Utility Jar Import -Import_a_jar_file_UI_=Import a jar file into an EAR project as a J2EE Utility Jar -J2EE_Import=J2EE Import -J2EE_IMPORT_MESSAGE=Imports J2EE artifacts: EARs, EJB Jars, Application Client Jars, RARs and WARs diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.xml b/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.xml deleted file mode 100644 index 11b1bb221..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.xml +++ /dev/null @@ -1,685 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin - id="org.eclipse.jst.j2ee.navigator.ui" - name="%Plugin.name" - version="1.0.0" - provider-name="%Plugin.providerName" - description="%Plugin.description" - class="org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin"> - - <runtime> - <library name="j2ee-navigator.jar"> - <export name="*"/> - </library> - </runtime> - <requires> - <import plugin="org.eclipse.ui"/> - <import plugin="org.eclipse.core.resources"/> - <import plugin="org.eclipse.core.runtime"/> - <import plugin="org.eclipse.wst.common.navigator.views"/> - <import plugin="org.eclipse.wst.common.navigator.workbench"/> - <import plugin="org.eclipse.jst.j2ee.core"/> - <import plugin="org.eclipse.jst.j2ee.ui"/> - <import plugin="org.eclipse.emf.edit"/> - <import plugin="org.eclipse.emf.edit.ui"/> - <import plugin="org.eclipse.jem.workbench"/> - <import plugin="org.eclipse.wst.common.emfworkbench.integration"/> - <import plugin="org.eclipse.wst.common.frameworks"/> - <import plugin="org.eclipse.jdt.ui"/> - <import plugin="org.eclipse.jst.j2ee"/> - <import plugin="org.eclipse.jface.text"/> - <import plugin="org.eclipse.jst.j2ee.ejb"/> - <import plugin="org.eclipse.wst.common.frameworks.ui"/> - <import plugin="org.eclipse.jst.j2ee.web"/> - <import plugin="org.eclipse.jst.j2ee.jca"/> - <import plugin="org.eclipse.ui.ide"/> - <import plugin="org.eclipse.jdt.core"/> - <import plugin="org.eclipse.wst.common.emf"/> - <import plugin="org.eclipse.jst.ejb.ui"/> - <import plugin="org.eclipse.jst.servlet.ui"/> - <import plugin="org.eclipse.jst.j2ee.jca.ui"/> - <import plugin="org.eclipse.jst.common.navigator.java"/> - <import plugin="org.eclipse.jst.common.frameworks"/> - <import plugin="org.eclipse.wst.common.modulecore"/> - <import plugin="org.eclipse.jst.j2ee.webservices.ui"/> - </requires> - - <extension-point id="componentWorkingSet" name="Component Working Set" schema="schema/componentWorkingSet.exsd"/> - - -<!--============================--> -<!-- J2EE Filters --> -<!--============================ - <extension - point="org.eclipse.wst.common.navigator.views.navigatorContent"> - <navigatorContent - name="J2EE" - priority="5" - icon="icons/J2EEPerspective.gif" - class="org.eclipse.jst.j2ee.navigator.internal.J2EENavigatorContentExtension" - id="org.eclipse.jst.navigator.j2ee.ui.J2EEContent"> - <enables> - <or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <or> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.EARNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ejb.EJBNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ApplicationClientNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.web.WebNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.jca.ConnectorNature"> - </objectState> - </or> - </and> - </or> - </enables> - <emfEnablement> - <package uri="org.eclipse.emf.ecore.resource" /> - <package uri="common.xmi" /> - <package uri="application.xmi" /> - <package uri="client.xmi" /> - <package uri="modulemap.xmi" /> - <package uri="ejb.xmi" /> - <package uri="jca.xmi" /> - <package uri="webapplication.xmi" /> - <package uri="jsp.xmi" /> - <package uri="wsdd.xmi" /> - <package uri="webservice_client.xmi" /> - <package uri="wscommon.xmi" /> - </emfEnablement> - </navigatorContent> - </extension> - --> - <extension - id="EARGroup" - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%Enterprise_Applications" - sortOrder="0" - icon="icons/eargroup_obj.gif" - natureID="org.eclipse.jst.j2ee.EARNature"> - </navigatorGroup> - </extension> - <extension - id="AppClientGroup" - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%Application_Client_Projects" - sortOrder="1" - icon="icons/appclientgroup_obj.gif" - natureID="org.eclipse.jst.j2ee.ApplicationClientNature"> - </navigatorGroup> - </extension> - <extension - id="ConnectorGroup" - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%Connector_Projects" - sortOrder="2" - icon="icons/connectorgroup_obj.gif" - natureID="org.eclipse.jst.j2ee.jca.ConnectorNature"> - </navigatorGroup> - </extension> - <extension - id="EJBGroup" - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%EJB_Projects" - sortOrder="3" - icon="icons/ejbgroup_obj.gif" - natureID="org.eclipse.jst.j2ee.ejb.EJBNature"> - </navigatorGroup> - </extension> - <extension - id="WebGroup" - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%Web_Projects" - sortOrder="4" - icon="icons/webgroup_obj.gif" - natureID="org.eclipse.jst.j2ee.web.WebNature"> - </navigatorGroup> - </extension> - <extension - point="org.eclipse.wst.common.navigator.workbench.NavigatorGroup"> - <navigatorGroup - displayName="%Other_Projects" - icon="icons/folder.gif" - natureID="nongrouped"> - </navigatorGroup> - </extension> -<!-- Drop Adapter for Adding Modules to EARs --> - <extension - id="org.eclipse.jst.j2ee.internal.ui.navigator.addModule.dropHandler" - point="org.eclipse.wst.common.navigator.views.dropHandler"> - <dropHandler - class="org.eclipse.jst.j2ee.navigator.internal.dnd.AddModuleDropAction" - id="org.eclipse.jst.j2ee.internal.ui.navigator.addModule.dropHandler" - name="%J2EE_Add_Module" - description="%Adds_J2EE_modules_to_EAR_projects"> - <dragEnablement> - <or> - <or> - <objectClass - name="org.eclipse.jst.j2ee.client.ApplicationClient"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.jca.Connector"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.ejb.EJBJar"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.webapplication.WebApp"> - </objectClass> - </or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <or> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.EARNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ejb.EJBNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ApplicationClientNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.web.WebNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.jca.ConnectorNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jdt.core.javanature"> - </objectState> - </or> - </and> - </or> - </dragEnablement> - <dropEnablement - validatorClass="org.eclipse.jst.j2ee.navigator.internal.dnd.AddModuleDropAction"> - <or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.EARNature"> - </objectState> - </and> - <or> - <objectClass - name="org.eclipse.jst.j2ee.application.Application"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.internal.earcreation.modulemap.EARProjectMap"> - </objectClass> - </or> - </or> - </dropEnablement> - <serializers> - <serializer - class="org.eclipse.jst.j2ee.navigator.internal.dnd.ModuleIdentifierSerializer" - id="org.eclipse.jst.j2ee.navigator.internal.dnd.ModuleIdentifierSerializer"> - </serializer> - </serializers> - </dropHandler> - </extension> - <!-- Drop Adapter for Adding Utility Jars to EARs --> - <extension - id="org.eclipse.jst.navigator.j2ee.dnd.addUtilityJar.dropHandler" - point="org.eclipse.wst.common.navigator.views.dropHandler"> - <dropHandler - class="org.eclipse.jst.j2ee.navigator.internal.dnd.AddUtilityJarDropAction" - id="org.eclipse.jst.j2ee.internal.ui.navigator.addUtilityJar.dropHandler" - name="%J2EE_Add_Utility_Jar" - description="%Adds_Utility_Jars_to_EAR_projects"> - <dragEnablement> - <or> - <or> - <objectClass - name="org.eclipse.jst.j2ee.client.ApplicationClient"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.jca.Connector"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.ejb.EJBJar"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.webapplication.WebApp"> - </objectClass> - </or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <objectState - name="projectNature" - value="org.eclipse.jdt.core.javanature"> - </objectState> - </and> - </or> - </dragEnablement> - <dropEnablement - validatorClass="org.eclipse.jst.j2ee.navigator.internal.dnd.AddUtilityJarDropAction"> - <or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.EARNature"> - </objectState> - </and> - <or> - <objectClass - name="org.eclipse.jst.j2ee.application.Application"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.internal.earcreation.modulemap.EARProjectMap"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.internal.provider.J2EEUtilityJarItemProvider"> - </objectClass> - </or> - </or> - </dropEnablement> - <serializers> - <serializer - class="org.eclipse.jst.navigator.j2ee.dnd.ModuleIdentifierSerializer" - id="org.eclipse.jst.navigator.j2ee.dnd.utilityJarIdentifierSerializer"> - </serializer> - </serializers> - </dropHandler> - </extension> - <extension - id="org.eclipse.jst.navigator.j2ee.dnd.utilityJarImport.dropHandler" - point="org.eclipse.wst.common.navigator.views.dropHandler"> - <dropHandler - class="org.eclipse.jst.j2ee.navigator.internal.dnd.AddExternalUtilityJarDropAction" - id="org.eclipse.jst.j2ee.navigator.internal.dnd.utilityJarImport.dropHandler" - name="%J2EE_Utility_Jar_Import" - description="%Import_a_jar_file_UI_"> - <dropEnablement> - <or> - <objectClass - name="org.eclipse.jst.j2ee.application.Application"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.internal.provider.J2EEUtilityJarItemProvider"> - </objectClass> - </or> - </dropEnablement> - </dropHandler> - </extension> - <extension - id="org.eclipse.jst.navigator.j2ee.dnd.j2eeImport.dropHandler" - point="org.eclipse.wst.common.navigator.views.dropHandler"> - <dropHandler - class="org.eclipse.jst.j2ee.navigator.internal.dnd.J2EEImportDropAction" - id="org.eclipse.jst.j2ee.navigator.internal.dnd.j2eeImport.dropHandler" - name="%J2EE_Import" - description="%J2EE_IMPORT_MESSAGE"> - <dropEnablement> - <or> - <and> - <or> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <objectClass - name="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup"> - </objectClass> - </or> - <or> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.EARNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ejb.EJBNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.ApplicationClientNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.web.WebNature"> - </objectState> - <objectState - name="projectNature" - value="org.eclipse.jst.j2ee.jca.ConnectorNature"> - </objectState> - </or> - </and> - <objectClass - name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.application.Application"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.client.ApplicationClient"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.jca.Connector"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.ejb.EJBJar"> - </objectClass> - <objectClass - name="org.eclipse.jst.j2ee.webapplication.WebApp"> - </objectClass> - </or> - </dropEnablement> - </dropHandler> - </extension> - - <!-- Experimental --> - <extension - point="org.eclipse.wst.common.navigator.views.navigatorContent"> - <navigatorContent - name="Experimental J2EE" - priority="higher" - icon="icons/J2EEPerspective.gif" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - actionProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - openListener="org.eclipse.jst.j2ee.internal.actions.J2EEResourceOpenListener" - id="org.eclipse.jst.navigator.j2ee.ui.J2EEContent.experimental"> - <enables> - <or> - <and> - <objectClass - name="org.eclipse.core.resources.IProject"> - </objectClass> - <or> - <objectState - name="nature" - value="org.eclipse.wst.common.modulecore.ModuleCoreNature"> - </objectState> - - </or> - </and> - <objectClass name="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper" /> - </or> - </enables> - - <emfEnablement> - <package uri="org.eclipse.emf.ecore.resource" /> - <package uri="common.xmi" /> - <package uri="application.xmi" /> - <package uri="client.xmi" /> - <package uri="modulemap.xmi" /> - <package uri="ejb.xmi" /> - <package uri="jca.xmi" /> - <package uri="webapplication.xmi" /> - <package uri="jsp.xmi" /> - </emfEnablement> - </navigatorContent> - </extension> - - <extension - point="org.eclipse.wst.common.navigator.views.actionProvider"> - <actionProvider - class="org.eclipse.jst.common.navigator.internal.actions.OpenActionsExtension" > - <enablement> - <or> - <objectClass - adaptable="true" - name="org.eclipse.emf.ecore.EObject" /> - <objectClass - adaptable="true" - name="org.eclipse.emf.edit.provider.ItemProvider" /> - </or> - </enablement> - </actionProvider> - </extension> - - <extension - point="org.eclipse.wst.common.navigator.views.actionProvider"> - <actionProvider - class="org.eclipse.wst.common.navigator.internal.actions.PortingActionExtension"> - <enablement> - <or> - <objectClass - adaptable="true" - name="org.eclipse.emf.ecore.EObject" /> - <objectClass - adaptable="true" - name="org.eclipse.emf.edit.provider.ItemProvider" /> - <objectClass - adaptable="true" - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet" /> - </or> - </enablement> - </actionProvider> - </extension> - <!-- =========================================================================== --> -<!-- Component Working Set --> -<!-- =========================================================================== --> - <extension - point="org.eclipse.ui.workingSets"> - <workingSet - name="Component" - updaterClass="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSetUpdater" - icon="icons/J2EEPerspective.gif" - id="org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage"> - </workingSet> - </extension> - - <extension - point="org.eclipse.jst.j2ee.navigator.ui.componentWorkingSet"> - <componentWorkingSet - id = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage" - typeId = "jst.ejb" - icon = "icons/ejbgroup_obj.gif" - label = "Ejb Projects"> - </componentWorkingSet> - </extension> - <extension - point="org.eclipse.jst.j2ee.navigator.ui.componentWorkingSet"> - <componentWorkingSet - id = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage" - typeId = "jst.web" - icon = "icons/webgroup_obj.gif" - label = "Dynamic Web Projects"> - </componentWorkingSet> - </extension> - <extension - point="org.eclipse.jst.j2ee.navigator.ui.componentWorkingSet"> - <componentWorkingSet - id = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage" - typeId = "jst.ear" - icon = "icons/eargroup_obj.gif" - label = "Enterprise Applications"> - </componentWorkingSet> - </extension> - - <extension - point="org.eclipse.jst.j2ee.navigator.ui.componentWorkingSet"> - <componentWorkingSet - id = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage" - typeId = "jst.appclient" - icon = "icons/appclientgroup_obj.gif" - label = "Application Client Projects"> - </componentWorkingSet> - </extension> - - <extension - point="org.eclipse.jst.j2ee.navigator.ui.componentWorkingSet"> - <componentWorkingSet - id = "org.eclipse.jst.j2ee.navigator.ui.ComponentWorkingSetPage" - typeId = "jst.connector" - icon = "icons/connectorgroup_obj.gif" - label = "Connector Projects"> - </componentWorkingSet> - </extension> - - <extension - point="org.eclipse.jst.common.navigator.java.workingSetProviders"> - <workingSetProviders - class="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSetProvider"> - </workingSetProviders> - </extension> - <extension - point="org.eclipse.ui.elementFactories"> - <factory - class="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSetFactory" - id="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSetFactory"/> - </extension> - -<!-- =========================================================================== --> -<!-- Adding the New to the Component Working Sets --> -<!-- =========================================================================== --> - - <extension - point="org.eclipse.wst.common.navigator.views.actionProvider"> - <actionProvider - class="org.eclipse.jst.common.navigator.internal.actions.OpenActionsExtension" > - <enablement> - <or> - <objectClass - adaptable="true" - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet" /> - </or> - </enablement> - </actionProvider> - </extension> - - - <extension - point="org.eclipse.wst.common.navigator.workbench.commonWizard"> - <!-- EAR New --> - <commonWizard - type="new" - wizardId="org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard"> - <enablement> - <or> - <and> - <objectClass - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet"> - </objectClass> - <objectState - name="componentTypeId" - value="jst.ear"> - </objectState> - - </and> - </or> - </enablement> - </commonWizard> - <!-- AppClient New --> - <commonWizard - type="new" - wizardId="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard"> - <enablement> - <or> - <and> - <objectClass - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet"> - </objectClass> - <objectState - name="componentTypeId" - value="jst.appclient"> - </objectState> - - </and> - </or> - </enablement> - </commonWizard> - <commonWizard - type="new" - wizardId="org.eclipse.jst.servlet.ui.WebComponentCreationWizard"> - <enablement> - <or> - <and> - <objectClass - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet"> - </objectClass> - <objectState - name="componentTypeId" - value="jst.web"> - </objectState> - </and> - </or> - </enablement> - </commonWizard> - <!-- Connector New --> - <commonWizard - type="new" - wizardId="org.eclipse.jst.j2ee.jca.ui.ConnectorComponentCreationWizard"> - <enablement> - <or> - <and> - <objectClass - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet"> - </objectClass> - <objectState - name="componentTypeId" - value="jst.connector"> - </objectState> - </and> - </or> - </enablement> - </commonWizard> - <!-- EJB New --> - <commonWizard - type="new" - wizardId="org.eclipse.jst.ejb.ui.EJBComponentCreationWizard"> - <enablement> - <or> - <and> - <objectClass - name="org.eclipse.jst.j2ee.navigator.internal.workingsets.ComponentWorkingSet"> - </objectClass> - <objectState - name="componentTypeId" - value="jst.ejb"> - </objectState> - </and> - </or> - </enablement> - </commonWizard> - - </extension> - - -</plugin> - - diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/prepareforpii.xml b/plugins/org.eclipse.jst.j2ee.navigator.ui/prepareforpii.xml deleted file mode 100644 index f6732071f..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/prepareforpii.xml +++ /dev/null @@ -1,32 +0,0 @@ -<project name="PrepareForPII" default="main" basedir="."> - - <!-- Setup temp variables --> - <target name="init"> - <property name="nlsDir" value="d:/NLS/Corona/0526"/> - <property name="plugin" value="com.ibm.wtp.j2ee.ui.navigator"/> - <property name="plugindir" value="d:/workspaceCorona/${plugin}"/> - <property name="outputDir" value="${nlsDir}/${plugin}"/> - - - </target> - - <!-- Create the destination dir --> - <target name="nlsDir" depends="init"> - <mkdir dir="${nlsDir}"/> - </target> - - <!-- Create the destination dir --> - <target name="plugindir" depends="nlsDir"> - <delete dir="${outputDir}"/> - <mkdir dir="${outputDir}"/> - </target> - - <!-- Move the files to the correct locations in the workspace. --> - <target name="main" depends="plugindir"> - - <messageIdGen folderPath = "${plugindir}" componentId = "E" /> - - <copy file="${plugindir}/plugin.properties" todir="${outputDir}"/> - - </target> -</project> diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/schema/componentWorkingSet.exsd b/plugins/org.eclipse.jst.j2ee.navigator.ui/schema/componentWorkingSet.exsd deleted file mode 100644 index 29c71236d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/schema/componentWorkingSet.exsd +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!-- Schema file written by PDE --> -<schema targetNamespace="org.eclipse.jst.common.navigator.java"> -<annotation> - <appInfo> - <meta.schema plugin="org.eclipse.jst.common.navigator.java" id="commonWorkingSet" name="Commom Working Set"/> - </appInfo> - <documentation> - [Enter description of this extension point.] - </documentation> - </annotation> - - <element name="extension"> - <complexType> - <sequence> - <element ref="componentWorkingSet"/> - </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> - </annotation> - </attribute> - </complexType> - </element> - - <element name="componentWorkingSet"> - <complexType> - <attribute name="typeId" type="string" use="required"> - <annotation> - <documentation> - - </documentation> - </annotation> - </attribute> - <attribute name="icon" type="string"> - <annotation> - <documentation> - - </documentation> - </annotation> - </attribute> - <attribute name="label" type="string" use="required"> - <annotation> - <documentation> - - </documentation> - </annotation> - </attribute> - <attribute name="id" type="string" use="required"> - <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> - - <annotation> - <appInfo> - <meta.section type="copyright"/> - </appInfo> - <documentation> - - </documentation> - </annotation> - -</schema> |