diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.navigator.ui')
97 files changed, 0 insertions, 5040 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 025428e05..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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <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 e8246ca0f..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -bin -temp.folder -build.xml -j2ee-navigator.jar -@dot -src.zip -javaCompiler...args 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/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jst.j2ee.navigator.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a8c3583f7..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,94 +0,0 @@ -#Mon Jun 08 16:18:46 EDT 2009 -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.comparingIdentical=error -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.emptyStatement=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -org.eclipse.jdt.core.compiler.problem.unusedParameter=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=error -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.nullReference=error -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=error -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error -eclipse.preferences.version=1 -org.eclipse.jdt.core.incompleteClasspath=error -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.deadCode=error -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.codeComplete.fieldPrefixes= -org.eclipse.jdt.core.compiler.problem.fallthroughCase=error -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.autoboxing=warning -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.compiler.problem.parameterAssignment=error -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 68de2d93a..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,41 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Plugin.name -Bundle-SymbolicName: org.eclipse.jst.j2ee.navigator.ui; singleton:=true -Bundle-Version: 1.1.400.qualifier -Bundle-Activator: org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin -Bundle-Vendor: %Plugin.providerName -Bundle-Localization: plugin -Export-Package: org.eclipse.jst.j2ee.navigator.internal;x-internal:=true, - org.eclipse.jst.j2ee.navigator.internal.dnd;x-internal:=true, - org.eclipse.jst.j2ee.navigator.internal.plugin;x-internal:=true -Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", - org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", - org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", - org.eclipse.jst.j2ee.core;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jst.j2ee.ui;bundle-version="[1.1.0,1.2.0)", - org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)", - org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)", - org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.0,1.2.0)", - org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)", - org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)", - org.eclipse.wst.common.frameworks.ui;bundle-version="[1.1.0,1.2.0)", - org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)", - org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)", - org.eclipse.jst.j2ee.jca.ui;bundle-version="[1.1.0,1.2.0)", - org.eclipse.wst.common.modulecore;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jem.util;bundle-version="[2.0.0,3.0.0)", - org.eclipse.jst.common.frameworks;bundle-version="[1.1.0,1.2.0)", - org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", - org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)", - org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)", - org.eclipse.wst.common.emf;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jst.j2ee.jca;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.0,1.2.0)", - org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)" -Eclipse-LazyStart: true; exceptions="org.eclipse.jst.j2ee.navigator.internal" -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/about.html b/plugins/org.eclipse.jst.j2ee.navigator.ui/about.html deleted file mode 100644 index 2199df3f0..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>June, 2008</P> - -<H3>License</H3> - -<P>The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. -For purposes of the EPL, "Program" will mean the Content.</P> - -<P>If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor’s license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> - -</BODY> -</HTML> 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 7d56e5bd4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/build.properties +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2007 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -bin.includes = plugin.xml,\ - *.jar,\ - .,\ - icons/,\ - plugin.properties,\ - META-INF/,\ - about.html -source.. = 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/etool16/loading1.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading1.gif Binary files differdeleted file mode 100644 index eae118ad1..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading1.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading2.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading2.gif Binary files differdeleted file mode 100644 index c37f13d7c..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading2.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading3.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading3.gif Binary files differdeleted file mode 100644 index 10a87c200..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading3.gif +++ /dev/null diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading4.gif b/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading4.gif Binary files differdeleted file mode 100644 index 7c6cfa8a4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/icons/full/etool16/loading4.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/internal/navigator/ui/Messages.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/internal/navigator/ui/Messages.java deleted file mode 100644 index 6595b40c4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/internal/navigator/ui/Messages.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.internal.navigator.ui; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - - public static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.navigator.ui.messages"; //$NON-NLS-1$ - public static String LoadingDDNode_Loading_0_; - public static String ClearPlaceHolderJob_Removing_place_holder_; - public static String AddProjectToEARDropAssistant_The_dragged_project_cannot_be_added_; - public static String AddModuleToEarDropAssistant_Adding_module_to_ea_; - public static String AddUtilityJarToEarDropAssistant_Add_Utility_Jar_to_0_; - public static String ImportJ2EEModuleDropAssistant_Importing_Java_Enterprise_Edition_artifacts; - public static String ImportJ2EEModuleDropAssistant_Could_not_recognize_extension_0_; - public static String AddProjectToEARDropAssistant_The_project_0_cannot_be_accesse_; - public static String AddProjectToEARDropAssistant_Could_not_add_module_to_Enterprise_; - - static { - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/internal/navigator/ui/messages.properties b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/internal/navigator/ui/messages.properties deleted file mode 100644 index 0f7889167..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/internal/navigator/ui/messages.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################### -# Copyright (c) 2005, 2006 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 -############################################################################### -#String externalization, key=value -#Sat Apr 15 16:12:10 EDT 2006 -AddModuleToEarDropAssistant_Adding_module_to_ea_=Adding module to {0} -ClearPlaceHolderJob_Removing_place_holder_=Removing place holder ... -ImportJ2EEModuleDropAssistant_Could_not_recognize_extension_0_=Could not recognize extension "{0}" as a Java Enterprise Edition artifact. -AddUtilityJarToEarDropAssistant_Add_Utility_Jar_to_0_=Add Utility Jar to {0} -ImportJ2EEModuleDropAssistant_Importing_Java_Enterprise_Edition_artifacts=Importing Java Enterprise Edition artifacts ... -AddProjectToEARDropAssistant_The_project_0_cannot_be_accesse_=The project "{0}" cannot be accessed -AddProjectToEARDropAssistant_The_dragged_project_cannot_be_added_=The dragged project cannot be added to the *.ear because it is closed. -AddProjectToEARDropAssistant_Could_not_add_module_to_Enterprise_=Could not add module to Enterprise Application. -LoadingDDNode_Loading_0_=Loading descriptor for {0}. diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ApplicationViewerSorter.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ApplicationViewerSorter.java deleted file mode 100644 index 5692e635d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ApplicationViewerSorter.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.jface.viewers.Viewer; -import org.eclipse.jst.j2ee.internal.provider.J2EEBinaryModulesItemProvider; - -public class ApplicationViewerSorter extends J2EEViewerSorter { - - public ApplicationViewerSorter() { - super(); - } - - @Override - public int compare(Viewer viewer, Object e1, Object e2) { - if(e1 instanceof J2EEBinaryModulesItemProvider){ - return 1; - } else if(e2 instanceof J2EEBinaryModulesItemProvider){ - return -1; - } - return super.compare(viewer, e1, e2); - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ClearPlaceHolderJob.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ClearPlaceHolderJob.java deleted file mode 100644 index 48e0627e1..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/ClearPlaceHolderJob.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.viewers.AbstractTreeViewer; -import org.eclipse.jst.j2ee.internal.navigator.ui.Messages; -import org.eclipse.ui.progress.UIJob; - -public class ClearPlaceHolderJob extends UIJob { - - private AbstractTreeViewer viewer; - private LoadingDDNode placeHolder; - private Object[] children; - private Object parent; - - public ClearPlaceHolderJob(AbstractTreeViewer viewer, LoadingDDNode placeHolder, Object parent, Object[] children) { - super(Messages.ClearPlaceHolderJob_Removing_place_holder_); - this.viewer = viewer; - this.placeHolder = placeHolder; - this.parent = parent; - this.children = children; - setRule(new NonConflictingRule()); - } - - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - - try { - if( !viewer.getControl().isDisposed() ){ - viewer.getControl().setRedraw(false); - viewer.remove(placeHolder); - viewer.add(parent, children); - } - } finally { - if( !viewer.getControl().isDisposed() ){ - viewer.getControl().setRedraw(true); - } - } - return Status.OK_STATUS; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EARContentProvider.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EARContentProvider.java deleted file mode 100644 index 97396aca4..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EARContentProvider.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.emf.ecore.EObject; -import org.eclipse.jst.j2ee.application.ApplicationPackage; -import org.eclipse.jst.j2ee.common.CommonPackage; - -/** - * This class handles the EAR navigator content to the project explorer - */ -public class EARContentProvider extends J2EEContentProvider { - - /** - * Default constructor - */ - public EARContentProvider() { - super(); - } - - /** - * Constructor - * @param aViewerId - */ - public EARContentProvider(String aViewerId) { - super(aViewerId); - } - - /** - * This method will filter out any non Application DD objects so as not to duplicate meta nodes in - * the binary modules case. - */ - @Override - public Object[] getChildren(Object aParentElement) { - if (aParentElement instanceof EObject) { - EObject eObject = (EObject)aParentElement; - String emfPackage = eObject.eClass().getEPackage().getNsURI(); - if (!emfPackage.equals(ApplicationPackage.eNS_URI)&& - !emfPackage.equals(CommonPackage.eNS_URI)) - return new Object[]{}; - } - return super.getChildren(aParentElement); - } -} 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 e42c31e7f..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManager.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on 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 bbbda1414..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFModelManagerFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on 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 163345659..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectManager.java +++ /dev/null @@ -1,253 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.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.jem.util.logger.proxy.Logger; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.SWTException; -import org.eclipse.wst.common.componentcore.ArtifactEdit; -import org.eclipse.wst.common.componentcore.ComponentCore; -import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -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; - -/** - * <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); - EditModel editModel = null; - Object[] keys = projectEditModels.keySet().toArray(); - for (int i = 0; i < keys.length; i++) { - editModel = (EditModel) 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) { - EditModel editModel = getEditModelForProject(project); - if (editModel != null) { - rootObject = editModel.getPrimaryRootObject(); - projectRootObjects.put(project, rootObject); - } - } - } - return rootObject; - } - - - protected EditModel getEditModelForProject(IProject project) { - if (project == null) - return null; - EditModel editModel = null; - synchronized (projectEditModels) { - editModel = (EditModel) projectEditModels.get(project); - IVirtualComponent component = ComponentCore.createComponent(project); - ArtifactEdit artifactEdit = null; - try { - if (editModel == null && project.isAccessible()) { - artifactEdit = ArtifactEdit.getArtifactEditForRead(component); - if (artifactEdit != null) { - editModel = (EditModel) artifactEdit.getAdapter(EditModel.class); - if (editModel != null) { - editModel.addListener(this); - addMapping(project, editModel); - } - } - } - } finally { - if (artifactEdit!=null) - artifactEdit.dispose(); - } - } - return editModel; - } - - protected void addMapping(IProject project, EditModel 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()); - EditModel editModel = (EditModel) 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 4efa02b3e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/EMFRootObjectProvider.java +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 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 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 synchronized 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; - } - } - - public synchronized boolean hasLoadedModels(IProject project) { - return emfModelCache.get(project) != 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(); - modelManager = null; - } - } - 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 472a8c8d5..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/FlexibleEMFModelManager.java +++ /dev/null @@ -1,236 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * 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.wst.common.componentcore.ArtifactEdit; -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 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() - */ - @Override - 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) { - flexibleObjects.add(contentModelRoot); - if (!rootObjects.contains(contentModelRoot)) - rootObjects.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()) { - ArtifactEdit artifactEdit = null; - try{ - artifactEdit = ArtifactEdit.getArtifactEditForRead(project); - if(artifactEdit != null) { - artifactEdits.add(artifactEdit); - artifactEdit.addListener(this); - } - } catch(Exception e){ - e.printStackTrace(); - } - } - } - return artifactEdits; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#dispose() - */ - @Override - 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(); - } - - } - } - rootObjects.clear(); - - } - - /* (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); - getRootObjects(); - 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) { - rootObjects.remove(artifactEditToRootObject.get(artifactEdit)); - 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 57d0b038f..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, 2006 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 = "org.eclipse.ui.navigator.ProjectExplorer";//$NON-NLS-1$ -} 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 05943c218..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/IJ2EEWizardConstants.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.j2ee.internal.wizard.AppClientComponentExportWizard; -import org.eclipse.jst.j2ee.internal.wizard.AppClientComponentImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.EARComponentExportWizard; -import org.eclipse.jst.j2ee.internal.wizard.EARComponentImportWizard; -import org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizardNew; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorComponentExportWizard; -import org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorComponentImportWizard; - -/** - * <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 = EARComponentImportWizard.class.getName(); - - String IMPORT_APPCLIENT_WIZARD_ID = AppClientComponentImportWizard.class.getName(); - - String IMPORT_CONNECTOR_WIZARD_ID = ConnectorComponentImportWizard.class.getName(); - - String IMPORT_ENTERPRISE_BEAN_WIZARD_ID = "org.eclipse.jst.ejb.ui.internal.wizard.EJBComponentImportWizard"; //$NON-NLS-1$ - - String IMPORT_WEB_MODULE_WIZARD_ID = "org.eclipse.jst.servlet.ui.internal.wizard.WebComponentImportWizard"; //$NON-NLS-1$ - - String EXPORT_WEB_MODULE_WIZARD_ID = "org.eclipse.jst.servlet.ui.internal.wizard.WebComponentExportWizard"; //$NON-NLS-1$ - - String IMPORT_UTILITY_JAR_WIZARD_ID = J2EEUtilityJarImportWizardNew.class.getName(); - - String EXPORT_EAR_WIZARD_ID = EARComponentExportWizard.class.getName(); - - String EXPORT_APPCLIENT_WIZARD_ID = AppClientComponentExportWizard.class.getName(); - - String EXPORT_CONNECTOR_WIZARD_ID = ConnectorComponentExportWizard.class.getName(); - - String EXPORT_ENTERPRISE_BEAN_WIZARD_ID = "org.eclipse.jst.ejb.ui.internal.wizardEJBComponentExportWizard"; //$NON-NLS-1$ - - -} 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 8986d0514..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, 2006 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.core.resources.IResource; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -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.actions.ActionContext; -import org.eclipse.ui.navigator.CommonActionProvider; -import org.eclipse.ui.navigator.ICommonActionConstants; -import org.eclipse.ui.navigator.ICommonActionExtensionSite; -import org.eclipse.ui.navigator.ICommonMenuConstants; - -public class J2EEActionProvider extends CommonActionProvider { - - private static final Class IRESOURCE_CLASS = IResource.class; - - private OpenJ2EEResourceAction openAction; - - /** - * - */ - 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) - */ - @Override - public void init(ICommonActionExtensionSite aConfig) { - openAction = new OpenJ2EEResourceAction(); - -// renameAction = new J2EERenameAction(aConfig.getViewSite(), aConfig.getViewSite().getShell()); - - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#setActionContext(org.eclipse.ui.actions.ActionContext) - */ - @Override - public void setContext(ActionContext aContext) { - - if (aContext != null && 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); - } - super.setContext(aContext); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#fillActionBars(org.eclipse.ui.IActionBars) - */ - @Override - public void fillActionBars(IActionBars theActionBars) { -// if (genericDelete.isEnabled()) -// theActionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), genericDelete); - if(openAction.isEnabled()) - theActionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openAction); - return; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.navigator.internal.views.actions.ICommonActionProvider#fillContextMenu(org.eclipse.jface.action.IMenuManager) - */ - @Override - public void fillContextMenu(IMenuManager aMenu) { - if (getContext()==null || getContext().getSelection().isEmpty()) - return; - IStructuredSelection selection = (IStructuredSelection) getContext().getSelection(); - if(!adaptsToResource(selection.toArray())) { - openAction.selectionChanged(selection); - if (openAction.isEnabled()) - aMenu.insertAfter(ICommonMenuConstants.GROUP_OPEN, openAction); - } - } - - private boolean adaptsToResource(Object[] objects) { - for (int i = 0; i < objects.length; i++) { - if(objects[i] instanceof IResource) { - return true; - } else if (objects[i] instanceof IAdaptable && (((IAdaptable)objects[i]).getAdapter(IRESOURCE_CLASS) != null)) { - return true; - } - } - return false; - } - 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; - } - -} 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 587e52c8e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEComparator.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on Jan 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) - */ - @Override - public boolean equals(Object obj) { - return obj instanceof J2EEComparator; - } - - @Override - public int hashCode() { - return J2EEComparator.class.hashCode(); - } - -}
\ 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 356b58f1d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEContentProvider.java +++ /dev/null @@ -1,245 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.ecore.resource.Resource; -import org.eclipse.emf.edit.provider.ItemProvider; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; -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.j2ee.internal.ejb.provider.BeanClassProviderHelper; -import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper; -import org.eclipse.jst.j2ee.internal.provider.MethodsProviderDelegate; -import org.eclipse.jst.j2ee.navigator.internal.EMFRootObjectProvider.IRefreshHandlerListener; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.navigator.CommonViewer; -import org.eclipse.ui.progress.UIJob; -import org.eclipse.wst.common.internal.emfworkbench.integration.DynamicAdapterFactory; - -/** - * <p> - * The following class is experimental until fully documented. - * </p> - */ -public class J2EEContentProvider implements ITreeContentProvider, IRefreshHandlerListener { - - private final EMFRootObjectProvider rootObjectProvider; - - private AdapterFactoryContentProvider delegateContentProvider; - private MethodsProviderDelegate delegateMethodsProvider; - - private String viewerId = null; - private AbstractTreeViewer 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 IAdaptable && !(aParentElement instanceof EObject) && !(aParentElement instanceof ItemProvider) - && !(aParentElement instanceof J2EEJavaClassProviderHelper)) { - project = ProjectUtilities.getProject(aParentElement); - - if (project != null) { - // Verify if the model *is being* - // loaded and just return the place holder - if (LoadingDDNode.isBeingLoaded(project)) { - children.add(LoadingDDNode.createPlaceHolder(project)); - - // Verify if the model has been loaded, just return it - } else if (rootObjectProvider.hasLoadedModels(project)) { - /* model already loaded, just return the model */ - children.addAll(Arrays.asList(rootObjectProvider.getModels(project))); - - // Otherwise return a place holder node and start loading - // job - } else { - LoadingDDNode placeHolder = LoadingDDNode.createPlaceHolder(project); - /* - * we need to load the model; possible long running - * operation - */ - if (LoadingDDNode.canBeginLoading(project)) - new LoadingDDJob(viewer, placeHolder, (IAdaptable) aParentElement, rootObjectProvider).schedule(); - children.add(placeHolder); - } - - } - } else if (MethodsProviderDelegate.providesContentFor(aParentElement)) - return delegateMethodsProvider.getChildren(aParentElement); - else /* if (isEMFEditObject(aParentElement)) */{ - Object[] siblings = null; - try { - siblings = delegateContentProvider.getChildren(aParentElement); - } catch (Exception e) { - J2EENavigatorPlugin.logError(0, e.getMessage(), e); } - 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 instanceof Resource) { - parent = ProjectUtilities.getProject((EObject) object); - } else if (parent == null) { - if(object instanceof BeanClassProviderHelper) - parent = ((BeanClassProviderHelper) object).getEjb(); - else if (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)) */ - if(element instanceof ItemProvider) - return true; - 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 = (AbstractTreeViewer) 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 AdapterFactoryContentProvider(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 (Display.getCurrent() != null) { - (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$ - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - (viewer).refresh(element, true); - return Status.OK_STATUS; - } - }; - ISchedulingRule rule = new ISchedulingRule() { - public boolean contains(ISchedulingRule rule) { - return rule == this; - } - public boolean isConflicting(ISchedulingRule rule) { - return rule == this; - } - }; - job.setRule(rule); - job.schedule(); - } - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEEMFAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEEMFAdapterFactory.java deleted file mode 100644 index 451280e51..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEEMFAdapterFactory.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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 Feb 25, 2004 - * - */ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper; - -/** - * @author mdelder - * - */ -public class J2EEEMFAdapterFactory implements IAdapterFactory { - - protected static final Class IPROJECT_CLASS = IProject.class; - protected static final Class IRESOURCE_CLASS = IResource.class; - protected static final Class IFILE_CLASS = IFile.class; - protected static final Class EOBJECT_CLASS = EObject.class; - - /** - * - */ - public J2EEEMFAdapterFactory() { - super(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) - */ - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adaptableObject instanceof EObject) { - if (adapterType == IFILE_CLASS || adapterType == IRESOURCE_CLASS) - return WorkbenchResourceHelper.getFile((EObject) adaptableObject); - //else if (adapterType == IPROJECT_CLASS) - // return ProjectUtilities.getProject((EObject) adaptableObject); - } - return null; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() - */ - public Class[] getAdapterList() { - return new Class[]{IRESOURCE_CLASS, IFILE_CLASS}; - } - -} 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 0e37e61c8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EELabelProvider.java +++ /dev/null @@ -1,261 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.io.File; - -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.jdt.core.IJavaProject; -import org.eclipse.jem.util.emf.workbench.ProjectUtilities; -import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.jst.j2ee.common.internal.util.CommonUtil; -import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper; -import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin; -import org.eclipse.jst.j2ee.internal.provider.J2EEAdapterFactoryLabelProvider; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.navigator.ICommonContentExtensionSite; -import org.eclipse.ui.navigator.ICommonLabelProvider; -import org.eclipse.wst.common.internal.emfworkbench.integration.DynamicAdapterFactory; - -/** - * <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 J2EEAdapterFactoryLabelProvider(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 != null && anElement instanceof EObject) { - EObject eObj = (EObject) anElement; - if (CommonUtil.isDeploymentDescriptorRoot(eObj, true /* include ears */)) { - IProject parent = ProjectUtilities.getProject(eObj); - if(eObj.eResource() != null) { - 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 getText(eObj); - } - } - 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) - */ - @Override - 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 (element instanceof File) - return J2EEUIPlugin.getDefault().getImage("jar_obj"); //$NON-NLS-1$ - if(element instanceof LoadingDDNode) - return ((LoadingDDNode)element).getImage(); - if (element instanceof IProject || element instanceof IJavaProject) - return null; - 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 (element instanceof File) - return ((File)element).getName(); - if (element instanceof IProject) - return ((IProject)element).getName(); - if(element instanceof LoadingDDNode) - return ((LoadingDDNode)element).getText(); - if (delegateLabelProvider != null) - return delegateLabelProvider.getText(element); - return null; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - 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() - */ - @Override - public String toString() { - if (delegateLabelProvider != null) - return delegateLabelProvider.toString(); - return super.toString(); - } - - public void init(ICommonContentExtensionSite aSite) { - initialize(IJ2EENavigatorConstants.VIEWER_ID); - - } - - public void restoreState(IMemento aMemento) { - // TODO Auto-generated method stub - - } - - public void saveState(IMemento aMemento) { - // TODO Auto-generated method stub - - } -} 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 0820d939a..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, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on 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); - } -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEProjectDecorator.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEProjectDecorator.java deleted file mode 100644 index feed0a0c9..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEProjectDecorator.java +++ /dev/null @@ -1,142 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 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.net.URL; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.IDecoration; -import org.eclipse.jface.viewers.ILightweightLabelDecorator; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework; - -/** - * J2EEProjectDecorator - */ -public class J2EEProjectDecorator extends LabelProvider implements ILightweightLabelDecorator { - - private static ImageDescriptor EAR; - private static ImageDescriptor APPCLIENT; - private static ImageDescriptor DYNAMICWEB; - private static ImageDescriptor EJB; - private static ImageDescriptor CONNECTOR; - - /* The constants are duplicated here to avoid plugin loading. */ - private static final String EAR_FACET = "jst.ear"; //$NON-NLS-1$ - private static final String APPCLIENT_FACET = "jst.appclient"; //$NON-NLS-1$ - private static final String WEB_FACET = "jst.web"; //$NON-NLS-1$ - private static final String EJB_FACET = "jst.ejb"; //$NON-NLS-1$ - private static final String CONNECTOR_FACET = "jst.connector"; //$NON-NLS-1$ - private static final String STATIC_WEB_FACET = "wst.web"; //$NON-NLS-1$ - - private static final String ICON_DIR = "icons/full/ovr16"; //$NON-NLS-1$ - - - public J2EEProjectDecorator() { - super(); - } - - public void decorate(Object element, IDecoration decoration) { - IProject project = null; - if(element instanceof IProject) { - project = (IProject) element; - } else if(element instanceof IJavaProject) { - project = ((IJavaProject)element).getProject(); - } - if (project != null) { - ImageDescriptor overlay = null; - if (hasFacet(project, EAR_FACET)) - overlay=getEAR(); - else if (hasFacet(project, APPCLIENT_FACET)) - overlay=getAPPCLIENT(); - else if (hasFacet(project, WEB_FACET)) - overlay=getDYNAMICWEB(); - else if (hasFacet(project, EJB_FACET)) - overlay=getEJB(); - else if (hasFacet(project, CONNECTOR_FACET)) - overlay=getCONNECTOR(); - else if (hasFacet(project, STATIC_WEB_FACET)) - overlay=getDYNAMICWEB(); - // keep it null for if (hasFacet(project, UTILITY_FACET)) - if (overlay != null) - decoration.addOverlay(overlay); - } - } - - private boolean hasFacet(IProject project, String facet) { - try { - return FacetedProjectFramework.hasProjectFacet(project, facet); - } catch (CoreException e) { - J2EENavigatorPlugin.logError(0, e.getMessage(), e); - return false; - } - } - - /** - * This gets a .gif from the icons folder. - */ - private static ImageDescriptor getImageDescriptor(String key) { - ImageDescriptor imageDescriptor = null; - if (key != null) { - String gif = "/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$ - IPath path = new Path(ICON_DIR).append(gif); - URL gifImageURL = FileLocator.find(Platform.getBundle(J2EENavigatorPlugin.PLUGIN_ID), path, null); - if (gifImageURL != null) - imageDescriptor = ImageDescriptor.createFromURL(gifImageURL); - } - return imageDescriptor; - } - - private static ImageDescriptor getEAR() { - if (EAR == null) { - EAR = getImageDescriptor("enterprise_app_ovr"); //$NON-NLS-1$ - } - return EAR; - } - - private static ImageDescriptor getAPPCLIENT() { - if (APPCLIENT == null) { - APPCLIENT = getImageDescriptor("client_app_ovr"); //$NON-NLS-1$ - } - return APPCLIENT; - } - - private static ImageDescriptor getDYNAMICWEB() { - if (DYNAMICWEB == null) { - DYNAMICWEB = getImageDescriptor("web_module_ovr"); //$NON-NLS-1$ - } - return DYNAMICWEB; - } - - private static ImageDescriptor getEJB() { - if (EJB == null) { - EJB = getImageDescriptor("ejb_module_ovr"); //$NON-NLS-1$ - } - return EJB; - } - - private static ImageDescriptor getCONNECTOR() { - if (CONNECTOR == null) { - CONNECTOR = getImageDescriptor("connector_ovr"); //$NON-NLS-1$ - } - return CONNECTOR; - } - -} - 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 d094b9da1..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/J2EEViewerSorter.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.common.internal.util.CommonUtil; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; - - -public class J2EEViewerSorter extends ViewerSorter { - - /** - * Constructor for J2EEViewerSorter. - */ - public J2EEViewerSorter() { - super(); - } - - private static final String WST = "org.eclipse.wst"; //$NON-NLS-1$ - private static final String JST = "org.eclipse.jst"; //$NON-NLS-1$ - - /** - * @see ViewerSorter#compare(Viewer, Object, Object) - */ - @Override - public int compare(Viewer viewer, Object e1, Object e2) { - // Check to see if each object is a base WST or JST core contribution - boolean e1_isCore = isCore(e1); - boolean e2_isCore = isCore(e2); - // If both elements are from the same category, do default comparison - if (e1_isCore == e2_isCore) - return super.compare(viewer, e1, e2); - // If e1 is core, but not e2, e1 is less than e2 - else if (e1_isCore) - return -1; - // If e1 is not core, but e2 is, e1 is greater than e2 - else - return 1; - } - - /** - * Any contribution from the base JST or WST packages is considered core, everything else is - * an extension - * @param element - * @return boolean is Contribution Core? - */ - private boolean isCore(Object element) { - if (element != null) { - Class clazz = element.getClass(); - if (clazz != null) { - Package pack = clazz.getPackage(); - if (pack != null) { - String packageName = pack.getName(); - return packageName!=null && (packageName.startsWith(WST) || packageName.startsWith(JST)); - } - } - } - return false; - } - - 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)); - } - - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDJob.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDJob.java deleted file mode 100644 index fde69bc7e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDJob.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.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.Job; -import org.eclipse.jface.viewers.AbstractTreeViewer; - -public class LoadingDDJob extends Job { - - private static final Class IPROJECT_CLASS = IProject.class; - - private EMFRootObjectProvider rootObjectProvider; - private LoadingDDNode placeHolder; - private AbstractTreeViewer viewer; - private IAdaptable parent; - - public LoadingDDJob(AbstractTreeViewer viewer, LoadingDDNode placeHolder, IAdaptable parent, EMFRootObjectProvider rootObjectProvider) { - super(placeHolder.getText()); - this.viewer = viewer; - this.placeHolder = placeHolder; - this.parent = parent; - this.rootObjectProvider = rootObjectProvider; - setRule(new NonConflictingRule()); - } - - @Override - protected IStatus run(IProgressMonitor monitor) { - - LoadingDDUIJob updateUIJob = new LoadingDDUIJob(viewer, placeHolder); - updateUIJob.schedule(); - - List children = new ArrayList(); - - try { - IProject project = (IProject) parent.getAdapter(IPROJECT_CLASS); - Object[] rootObjects = (rootObjectProvider != null) ? rootObjectProvider.getModels(project) : null; - if (rootObjects != null) { - for (int x=0; x< rootObjects.length ; ++x) { - children.add(rootObjects[x]); - } - - } - } finally { - /* dispose of the place holder, causes the termination of the animation job */ - placeHolder.dispose(); - new ClearPlaceHolderJob(viewer, placeHolder, parent, children.toArray()).schedule(); - } - - - return Status.OK_STATUS; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDNode.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDNode.java deleted file mode 100644 index 99bee87b9..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDNode.java +++ /dev/null @@ -1,159 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jst.j2ee.internal.navigator.ui.Messages; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.graphics.Image; - -public class LoadingDDNode { - - private static ImageDescriptor loadingOne; - private static ImageDescriptor loadingTwo; - private static ImageDescriptor loadingThree; - private static ImageDescriptor loadingFour; - - - private static final Set loadingFiles = new HashSet(); - private static final Map placeHolders = new HashMap(); - - static { - try { - loadingOne = J2EENavigatorPlugin.getDefault().getImageDescriptor("full/etool16/loading1.gif"); //$NON-NLS-1$ - loadingTwo = J2EENavigatorPlugin.getDefault().getImageDescriptor("full/etool16/loading2.gif"); //$NON-NLS-1$ - loadingThree = J2EENavigatorPlugin.getDefault().getImageDescriptor("full/etool16/loading3.gif"); //$NON-NLS-1$ - loadingFour = J2EENavigatorPlugin.getDefault().getImageDescriptor("full/etool16/loading4.gif"); //$NON-NLS-1$ - } catch (RuntimeException e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - J2EENavigatorPlugin.logError(0, msg, e); - loadingOne = ImageDescriptor.getMissingImageDescriptor(); - loadingTwo = ImageDescriptor.getMissingImageDescriptor(); - loadingThree = ImageDescriptor.getMissingImageDescriptor(); - loadingFour = ImageDescriptor.getMissingImageDescriptor(); - } - } - - private String text; - private String text1; - private String text2; - private String text3; - private int count = 0; - - private boolean disposed = false; - private IProject modelProject; - - - /** - * Return a place holder node to sit in the tree until data is available. - * This place holder node will be animated for the user's enjoyment. - * - * @param modelFile The modelFile to be loaded - * @return A new unique place holder for this file for a given load cycle - */ - public static LoadingDDNode createPlaceHolder(IProject modelFile) { - LoadingDDNode node = null; - synchronized (LoadingDDNode.class) { - if(placeHolders.containsKey(modelFile)) - node = (LoadingDDNode) placeHolders.get(modelFile); - else - placeHolders.put(modelFile, node = new LoadingDDNode(modelFile)); - } - return node; - } - - public LoadingDDNode(IProject model) { - text = NLS.bind(Messages.LoadingDDNode_Loading_0_, model.getName()); - text1 = text + "."; //$NON-NLS-1$ - text2 = text + ".."; //$NON-NLS-1$ - text3 = text + "..."; //$NON-NLS-1$ - modelProject = model; - } - - public String getText() { - - switch ( count % 4) { - case 0 : - return text; - case 1 : - return text1; - case 2 : - return text2; - case 3 : - default : - return text3; - } - } - - public Image getImage() { - switch ( count = (++count % 4)) { - case 0 : - return J2EENavigatorPlugin.getDefault().getImage(loadingOne); - case 1 : - return J2EENavigatorPlugin.getDefault().getImage(loadingTwo); - case 2 : - return J2EENavigatorPlugin.getDefault().getImage(loadingThree); - case 3 : - default : - return J2EENavigatorPlugin.getDefault().getImage(loadingFour); - } - } - - - - public boolean isDisposed() { - return disposed; - } - - public void dispose() { - synchronized (LoadingDDNode.class) { - disposed = true; - placeHolders.remove(modelProject); - loadingFiles.remove(modelProject); - } - } - - /** - * Employ a Test and Set (TST) primitive to ensure - * that only job is spawned to load the model file - * - * - * @return True only if no other jobs are trying to load this model. - */ - public static boolean canBeginLoading(IProject modelProject) { - synchronized (LoadingDDNode.class) { - if(loadingFiles.contains(modelProject)) - return false; - loadingFiles.add(modelProject); - return true; - } - - } - - /** - * Return true if a job has requested permission to load the model file - * @param modelFile The model file that should be loaded - * @return True only if a job is trying to load the model. - */ - public static boolean isBeingLoaded(IProject modelProject) { - synchronized (LoadingDDNode.class) { - return loadingFiles.contains(modelProject); - } - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDUIJob.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDUIJob.java deleted file mode 100644 index 29eab0b4f..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/LoadingDDUIJob.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.viewers.StructuredViewer; -import org.eclipse.ui.progress.UIJob; - -public class LoadingDDUIJob extends UIJob { - - private static final long DELAY = 200; - - private LoadingDDNode placeHolder; - private StructuredViewer viewer; - - public LoadingDDUIJob(StructuredViewer viewer, LoadingDDNode placeHolder) { - super(placeHolder.getText()); - this.viewer = viewer; - this.placeHolder = placeHolder; - setSystem(true); - setRule(new NonConflictingRule()); - } - - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - - if(!placeHolder.isDisposed()) { - viewer.refresh(placeHolder, true); - schedule(DELAY); - } - return Status.OK_STATUS; - - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonConflictingRule.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonConflictingRule.java deleted file mode 100644 index a02990cd8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonConflictingRule.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.runtime.jobs.ISchedulingRule; - -public class NonConflictingRule implements ISchedulingRule { - - public static final NonConflictingRule INSTANCE = new NonConflictingRule(); - - public boolean contains(ISchedulingRule rule) { - return rule == this; - } - - public boolean isConflicting(ISchedulingRule rule) { - return rule == this; - } - -} 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 699cff4f1..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/NonFlexibleEMFModelManager.java +++ /dev/null @@ -1,141 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on 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.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 NonFlexibleEMFModelManager extends EMFModelManager implements EditModelListener{ - - private EditModel 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() - */ - @Override - 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) { - EditModel editModel = getEditModel(); - if (editModel != null) { - rootObject = editModel.getPrimaryRootObject(); - } - } - //} - if (rootObject==null) - return EMPTY_OBJECT; - Object[] objects = new Object[1]; - objects[0] = rootObject; - return objects; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.j2ee.navigator.internal.EMFModelManager#dispose() - */ - @Override - 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 EditModel getEditModel() { - IProject project = getProject(); - if (project == null) - return null; - - //TODO fix up - //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/WebResourcePropertyTester.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/WebResourcePropertyTester.java deleted file mode 100644 index 4553f5098..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/WebResourcePropertyTester.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.eclipse.jst.j2ee.navigator.internal; - -import org.eclipse.core.expressions.PropertyTester; -import org.eclipse.core.resources.IResource; -import org.eclipse.jst.j2ee.project.WebUtilities; - -public class WebResourcePropertyTester extends PropertyTester { - - private static final String WEB_RESOURCE = "webResource"; //$NON-NLS-1$ - - public WebResourcePropertyTester() { - } - - public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { - if (!(receiver instanceof IResource)) - return false; - - IResource resource = (IResource) receiver; - if (WEB_RESOURCE.equals(property)) { - return WebUtilities.isWebResource(resource); - } - - return false; - } - -} 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 9afcaab3d..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddExternalUtilityJarDropAction.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.swt.dnd.TransferData; -import org.eclipse.ui.navigator.CommonDropAdapter; -import org.eclipse.ui.navigator.resources.ResourceDropAdapterAssistant; - -/** - * @author mdelder - * - */ -public class AddExternalUtilityJarDropAction extends ResourceDropAdapterAssistant { - - /* - * (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(CommonDropAdapter dropAdapter, Object target, int operation, TransferData transferType) { - //TODO redo with components -// 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; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEARDropAssistant.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEARDropAssistant.java deleted file mode 100644 index b85431f93..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/AddProjectToEARDropAssistant.java +++ /dev/null @@ -1,316 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.operations.IUndoableOperation; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jem.util.emf.workbench.ProjectUtilities; -import org.eclipse.jface.util.LocalSelectionTransfer; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider; -import org.eclipse.jst.j2ee.application.internal.operations.IAddComponentToEnterpriseApplicationDataModelProperties; -import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; -import org.eclipse.jst.j2ee.internal.navigator.ui.Messages; -import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; -import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities; -import org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.jst.j2ee.project.EarUtilities; -import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities; -import org.eclipse.jst.j2ee.project.facet.EARFacetUtils; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.dnd.DropTargetEvent; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.navigator.CommonDropAdapter; -import org.eclipse.ui.navigator.CommonDropAdapterAssistant; -import org.eclipse.ui.part.PluginTransfer; -import org.eclipse.ui.progress.IProgressService; -import org.eclipse.wst.common.componentcore.ComponentCore; -import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties; -import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory; -import org.eclipse.wst.common.frameworks.datamodel.IDataModel; -import org.eclipse.wst.common.project.facet.core.IFacetedProject; -import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; -import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; - -public class AddProjectToEARDropAssistant extends CommonDropAdapterAssistant { - - private static final Class IPROJECT_CLASS = IProject.class; - - public AddProjectToEARDropAssistant() { - super(); - } - - @Override - public boolean isSupportedType(TransferData aTransferType) { - return LocalSelectionTransfer.getTransfer().isSupportedType(aTransferType); - } - - @Override - public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, final Object aTarget) { - - if (LocalSelectionTransfer.getTransfer().isSupportedType(aDropAdapter.getCurrentTransfer())) { - - final IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection(); - IProgressService service = PlatformUI.getWorkbench().getProgressService(); - - IProject earProject = getProject(aTarget); - IVirtualComponent earComponent = ComponentCore.createComponent(earProject); - - Job addProjectToEarJob = new Job(getJobTitle(earComponent)) { - @Override - protected IStatus run(IProgressMonitor monitor) { - - IStatus status = null; - try { - IProject earProject = getProject(aTarget); - - List projects = new ArrayList(); - - for (Iterator selectionIterator = selection.iterator(); selectionIterator.hasNext();) { - Object sourceObject = selectionIterator.next(); - - IProject projectToAdd = getProject(sourceObject); - if (projectToAdd != null) - projects.add(projectToAdd); - } - - IDataModel dataModel = getAddModuleDataModel(earProject, projects); - IUndoableOperation dropOperation = dataModel.getDefaultOperation(); - status = dropOperation.execute(monitor, null); - - if (!status.isOK()) - return status; - } catch (ExecutionException e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - status = J2EENavigatorPlugin.createErrorStatus(0, msg, e); - } - return status; - } - }; - service.showInDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), addProjectToEarJob); - addProjectToEarJob.setRule(ResourcesPlugin.getWorkspace().getRoot()); - addProjectToEarJob.schedule(); - } - return Status.OK_STATUS; - } - - @Override - public IStatus validateDrop(Object target, int operation, TransferData transferType) { - - if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType) || PluginTransfer.getInstance().isSupportedType(transferType)) { - ISelection selection = LocalSelectionTransfer.getTransfer().getSelection(); - if (selection != null && !selection.isEmpty() && (selection instanceof IStructuredSelection)) { - - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - IProject earProject = getProject(target); - int earVersion = getEarVersion(earProject); - IStatus status = null; - for(Iterator iterator = structuredSelection.iterator(); iterator.hasNext();) { - Object next = iterator.next(); - IProject projectToAdd = getProject(next); - if( (status = validateProjectMayBeAdded(earProject, projectToAdd, earVersion)).isOK()) - return status; - } - } - - } - return Status.CANCEL_STATUS; - } - - /** - * @param target - */ - private IStatus validateProjectMayBeAdded(IProject earProject, IProject projectToAdd, int earVersion) { - - if (earProject == null || projectToAdd == null || earVersion < 0) - return J2EENavigatorPlugin.createErrorStatus(0, Messages.AddProjectToEARDropAssistant_Could_not_add_module_to_Enterprise_, null); - else if (!earProject.isAccessible()) { - return J2EENavigatorPlugin.createErrorStatus(0, NLS.bind(Messages.AddProjectToEARDropAssistant_The_project_0_cannot_be_accesse_, earProject.getName()), null); - } else if (!projectToAdd.isAccessible()) { - return J2EENavigatorPlugin.createErrorStatus(0, Messages.AddProjectToEARDropAssistant_The_dragged_project_cannot_be_added_, null); - } - else if (earVersion > 14){ - return J2EENavigatorPlugin.createErrorStatus(0, Messages.AddProjectToEARDropAssistant_Could_not_add_module_to_Enterprise_, null); - } - - IStatus isValid = validateProjectToAdd(projectToAdd, earVersion); - if (!isValid.isOK()) { - return isValid; - } - // TODO Check if the project is already attached to the *.ear - // if (editModel.hasMappingToProject(projectToAdd)) { - // return false; - // } - return Status.OK_STATUS; - } - - /** - * - * @return -1 on error - */ - protected final int getEarVersion(IProject earProject) { - int earVersion = -1; - - IFacetedProject facetedProject; - try { - facetedProject = ProjectFacetsManager.create(earProject); - IProjectFacetVersion version = facetedProject.getProjectFacetVersion(EarUtilities.ENTERPRISE_APPLICATION_FACET); - earVersion = J2EEVersionUtil.convertVersionStringToInt(version.getVersionString()); - } catch (CoreException e) { - //nothing to do version cannot be determined since there is a problem with faceted project. - J2EENavigatorPlugin.logError(0, e.getMessage(), e); - } - return earVersion; - } - - /** - * @param facetedProject - * @return - */ - protected final boolean hasEarFacet(IProject project) { - IFacetedProject facetedProject = null; - try { - facetedProject = ProjectFacetsManager.create(project); - } catch (CoreException e1) { - } - return facetedProject != null && facetedProject.hasProjectFacet(EARFacetUtils.EAR_FACET); - } - - protected final String calculateValidProjectName(final String originalName) { - - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - String validName = originalName; - int count = 1; - while (root.getProject(validName).exists()) { - validName = originalName + count++; - } - return validName; - } - - protected IDataModel getAddModuleDataModel(IProject earProject, List projects) { - IDataModel datamodel = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider()); - - IVirtualComponent earComponent = ComponentCore.createComponent(earProject); - Map componentToURIMap = new HashMap(); - List components = new ArrayList(); - IVirtualComponent moduleComponent = null; - for(Iterator itr = projects.iterator(); itr.hasNext(); ) { - moduleComponent = ComponentCore.createComponent((IProject)itr.next()); - components.add(moduleComponent); - componentToURIMap.put(moduleComponent, getDefaultURI(moduleComponent)); - } - datamodel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent); - datamodel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, components); - datamodel.setProperty(IAddComponentToEnterpriseApplicationDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, componentToURIMap); - return datamodel; - } - - protected String getJobTitle(IVirtualComponent earComponent) { - return NLS.bind(Messages.AddModuleToEarDropAssistant_Adding_module_to_ea_, earComponent.getName()); - } - - protected IStatus validateProjectToAdd(IProject projectToAdd, int earVersion) { - IStatus status = null; - try { - // check if the project to add is not an EAR itself - IFacetedProject facetedProject = ProjectFacetsManager.create(projectToAdd); - if( facetedProject.hasProjectFacet(EARFacetUtils.EAR_FACET) ) - status = Status.CANCEL_STATUS; - else - status = Status.OK_STATUS; - - // check if the project to add is with Java EE version equal or lesser than that of the EAR - String verStr = J2EEProjectUtilities.getJ2EEProjectVersion(projectToAdd); - if (verStr != null) { - int version; - if (JavaEEProjectUtilities.isApplicationClientProject(projectToAdd)) - version = J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(verStr); - else if (JavaEEProjectUtilities.isEJBProject(projectToAdd)) - version = J2EEVersionUtil.convertEJBVersionStringToJ2EEVersionID(verStr); - else if (JavaEEProjectUtilities.isDynamicWebProject(projectToAdd)) - version = J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(verStr); - else if (JavaEEProjectUtilities.isJCAProject(projectToAdd)) - version = J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(verStr); - else - version = J2EEVersionUtil.convertVersionStringToInt(verStr); - - if (version > earVersion) - status = Status.CANCEL_STATUS; - else - status = Status.OK_STATUS; - } - } catch (CoreException e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - status = J2EENavigatorPlugin.createErrorStatus(0, msg, e); - } - return status; - - } - - protected static IProject getProject(Object element) { - if (element == null) - return null; - IProject project = null; - if (element instanceof IAdaptable) - project = (IProject) ((IAdaptable) element).getAdapter(IPROJECT_CLASS); - else - project = (IProject) Platform.getAdapterManager().getAdapter(element, IPROJECT_CLASS); - if (project == null) { - if(element instanceof EObject) { - project = ProjectUtilities.getProject((EObject) element); - } else if (element instanceof J2EEItemProvider) { - IFile associatedFile = ((J2EEItemProvider)element).getAssociatedFile(); - if(associatedFile != null) - project = associatedFile.getProject(); - } - } - return project; - } - - protected static String getDefaultURI(IVirtualComponent component) { - IProject project = component.getProject(); - String name = component.getName(); - - if (JavaEEProjectUtilities.isDynamicWebProject(project)) { - name += IJ2EEModuleConstants.WAR_EXT; - } else if (JavaEEProjectUtilities.isEARProject(project)) { - name += IJ2EEModuleConstants.EAR_EXT; - } else if (JavaEEProjectUtilities.isJCAProject(project)) { - name += IJ2EEModuleConstants.RAR_EXT; - } else { - name += IJ2EEModuleConstants.JAR_EXT; - } - return name; - } - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/IModuleExtensions.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/IModuleExtensions.java deleted file mode 100644 index e0af2782e..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/IModuleExtensions.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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.jst.j2ee.internal.plugin.IJ2EEModuleConstants; - -//@deprecated @see org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants - -public interface IModuleExtensions { - - public String DOT_WAR = IJ2EEModuleConstants.WAR_EXT; - public String DOT_JAR = IJ2EEModuleConstants.JAR_EXT; - public String DOT_RAR = IJ2EEModuleConstants.RAR_EXT; - public String DOT_EAR = IJ2EEModuleConstants.EAR_EXT; - -} diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ImportJ2EEModuleDropAssistant.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ImportJ2EEModuleDropAssistant.java deleted file mode 100644 index bf3d67905..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ImportJ2EEModuleDropAssistant.java +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.dnd; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.operations.IUndoableOperation; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.MultiStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.jst.j2ee.application.internal.operations.EARComponentImportDataModelProvider; -import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientComponentImportDataModelProvider; -import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; -import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory; -import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties; -import org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBComponentImportDataModelProvider; -import org.eclipse.jst.j2ee.internal.jca.operations.ConnectorComponentImportDataModelProvider; -import org.eclipse.jst.j2ee.internal.navigator.ui.Messages; -import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; -import org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentImportDataModelProvider; -import org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.dnd.DropTargetEvent; -import org.eclipse.swt.dnd.FileTransfer; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.CopyFilesAndFoldersOperation; -import org.eclipse.ui.navigator.CommonDropAdapter; -import org.eclipse.ui.progress.IProgressService; -import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory; -import org.eclipse.wst.common.frameworks.datamodel.IDataModel; - -public class ImportJ2EEModuleDropAssistant extends AddProjectToEARDropAssistant { - - @Override - public boolean isSupportedType(TransferData aTransferType) { - return FileTransfer.getInstance().isSupportedType(aTransferType); - } - - @Override - public IStatus handleDrop(CommonDropAdapter aDropAdapter, final DropTargetEvent aDropTargetEvent, final Object aTarget) { - - if(FileTransfer.getInstance().isSupportedType(aDropAdapter.getCurrentTransfer())) { - - final Shell shell = getShell(); - - IProgressService service = PlatformUI.getWorkbench().getProgressService(); - Job importArtifactsJob = new Job(Messages.ImportJ2EEModuleDropAssistant_Importing_Java_Enterprise_Edition_artifacts) { - @Override - protected IStatus run(IProgressMonitor monitor) { - - IProject targetEARProject = getProject(aTarget); - if(targetEARProject != null) { - /* If this isn't an ear project, we can't add the newly created modules to it. */ - if(!hasEarFacet(targetEARProject)) - targetEARProject = null; - } /* otherwise we assume the IWorkspaceRoot and just don't add the new modules an an existing ear */ - - String[] names = (String[]) aDropTargetEvent.data; - - monitor.beginTask(Messages.ImportJ2EEModuleDropAssistant_Importing_Java_Enterprise_Edition_artifacts, names.length); - final MultiStatus status = new MultiStatus(J2EENavigatorPlugin.PLUGIN_ID, 0, Messages.ImportJ2EEModuleDropAssistant_Importing_Java_Enterprise_Edition_artifacts, null); - - SubProgressMonitor submonitor = new SubProgressMonitor(monitor, 10); - IDataModel importDataModel = null; - boolean performSimpleJarCopy = false; - List simpleJarsToCopyList = null; - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - List createdComponents = new ArrayList(); - for(int i=0; i<names.length && !monitor.isCanceled(); i++) { - try { - importDataModel = null; - performSimpleJarCopy = false; - int separatorIndex = names[i].lastIndexOf(File.separatorChar); - int dotIndex = names[i].lastIndexOf('.'); - if(separatorIndex > 0 && separatorIndex+1 < dotIndex) { - String filename = names[i].substring(separatorIndex+1, dotIndex); - if(root.getProject(filename).exists()) { - filename = calculateValidProjectName(filename); - } - String extension = names[i].substring(dotIndex); - if(IJ2EEModuleConstants.WAR_EXT.equals(extension)) { - importDataModel = DataModelFactory.createDataModel(new WebComponentImportDataModelProvider()); - } else if(IJ2EEModuleConstants.RAR_EXT.equals(extension)) { - importDataModel = DataModelFactory.createDataModel(new ConnectorComponentImportDataModelProvider()); - } else if(IJ2EEModuleConstants.EAR_EXT.equals(extension)) { - importDataModel = DataModelFactory.createDataModel(new EARComponentImportDataModelProvider()); - } else if(IJ2EEModuleConstants.JAR_EXT.equals(extension)) { - Archive archive = null; - try { - archive = CommonarchiveFactory.eINSTANCE.openArchive(names[i]); - if(archive.isApplicationClientFile()) - importDataModel = DataModelFactory.createDataModel(new AppClientComponentImportDataModelProvider()); - else if(archive.isEJBJarFile()) - importDataModel = DataModelFactory.createDataModel(new EJBComponentImportDataModelProvider()); - else { - performSimpleJarCopy = true; //handle Utility jars as regular jars. - if(simpleJarsToCopyList == null){ - simpleJarsToCopyList = new ArrayList(); - simpleJarsToCopyList.add(names[i]); - } - } - - } finally { - if(archive != null) - archive.close(); - } - } - - if(importDataModel != null) { - importDataModel.setStringProperty(IJ2EEComponentImportDataModelProperties.FILE_NAME, names[i]); - importDataModel.setStringProperty(IJ2EEComponentImportDataModelProperties.PROJECT_NAME, filename); - importDataModel.getDefaultOperation().execute(submonitor, null); - - createdComponents.add(importDataModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT)); - - } else if(!performSimpleJarCopy){ - status.add(J2EENavigatorPlugin.createErrorStatus(0, NLS.bind(Messages.ImportJ2EEModuleDropAssistant_Could_not_recognize_extension_0_, extension), null)); - } - - } - } catch (Throwable e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - status.add(J2EENavigatorPlugin.createErrorStatus(0, msg, e)); - } - } - - if(targetEARProject != null) { - List createdModuleProjects = new ArrayList(); - for(int i=0; i<createdComponents.size(); i++) { - IVirtualComponent component = (IVirtualComponent) createdComponents.get(i); - /* If this isn't an ear project, we can't add the newly created modules to it. */ - if(!hasEarFacet(component.getProject())) { - createdModuleProjects.add(component.getProject()); - } - } - IDataModel dataModel = getAddModuleDataModel(targetEARProject, createdModuleProjects); - IUndoableOperation dropOperation = dataModel.getDefaultOperation(); - IStatus addProjectsStatus = null; - try { - addProjectsStatus = dropOperation.execute(monitor, null); - if(addProjectsStatus != null) - status.add(addProjectsStatus); - } catch (ExecutionException e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - status.add(J2EENavigatorPlugin.createErrorStatus(0, msg, null)); - } - //copy the simpleJarsOver - if(simpleJarsToCopyList != null ){ - try{ - final String [] jarsToCopyArray = new String[simpleJarsToCopyList.size()]; - simpleJarsToCopyList.toArray(jarsToCopyArray); - - CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(shell); - operation.copyFilesInCurrentThread(jarsToCopyArray, targetEARProject, monitor); - }catch (Throwable e) { - String msg = e.getMessage() != null ? e.getMessage() : e.toString(); - status.add(J2EENavigatorPlugin.createErrorStatus(0, msg, e)); - } - } - } - - return status; - } - - }; - - service.showInDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), importArtifactsJob); - importArtifactsJob.setRule(ResourcesPlugin.getWorkspace().getRoot()); - importArtifactsJob.schedule(); - return Status.OK_STATUS; - } - return Status.CANCEL_STATUS; - } - - - @Override - public IStatus validateDrop(Object target, int operation, TransferData transferType) { - IStatus status = Status.CANCEL_STATUS; - if(FileTransfer.getInstance().isSupportedType(transferType)) { - IProject project = null; - if(target instanceof IWorkspaceRoot) - status = Status.OK_STATUS; - else if( (project = getProject(target)) != null && hasEarFacet(project)) - status = Status.OK_STATUS; - } - return status; - } - -} 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 173c287c8..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2006 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; - - - -/** - * @author mdelder - * - */ -public class ModuleIdentifierSerializer { - - - /* - * (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); - } -} 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 68f2b52a3..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/plugin/J2EENavigatorPlugin.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.navigator.internal.plugin; - -import java.net.URL; -import java.util.Collections; - -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * 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$ - private static final String ICONS = "icons/"; //$NON-NLS-1$ - - private ImageRegistry images; - - - /** - * 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(); - } - - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - images = new ImageRegistry(Display.getDefault()); - } - - public ImageDescriptor getImageDescriptor(String relativePath) { - ImageDescriptor descriptor = images.getDescriptor(relativePath); - if(descriptor == null) { - synchronized (this) { - descriptor = images.getDescriptor(relativePath); - if(descriptor == null) { - URL imageUrl = FileLocator.find(getBundle(), new Path(ICONS+relativePath), Collections.EMPTY_MAP); - descriptor = ImageDescriptor.createFromURL(imageUrl); - } - } - } - return descriptor; - } - - - public Image getImage(ImageDescriptor descriptor) { - - Image image = images.get(descriptor.toString()); - if(image == null) { - synchronized (this) { - image = images.get(descriptor.toString()); - if(image == null) { - images.put(descriptor.toString(), (image = descriptor.createImage(true))); - } - } - } - return image; - } - - @Override - public void stop(BundleContext context) throws Exception { - super.stop(context); - images.dispose(); - } - - - /** - * Record an error against this plugin's log. - * - * @param aCode - * @param aMessage - * @param anException - */ - public static void logError(int aCode, String aMessage, - Throwable anException) { - getDefault().getLog().log( - createErrorStatus(aCode, aMessage, anException)); - } - - /** - * - * Record a message against this plugin's log. - * - * @param severity - * @param aCode - * @param aMessage - * @param exception - */ - public static void log(int severity, int aCode, String aMessage, - Throwable exception) { - log(createStatus(severity, aCode, aMessage, exception)); - } - - /** - * - * Record a status against this plugin's log. - * - * @param aStatus - */ - public static void log(IStatus aStatus) { - getDefault().getLog().log(aStatus); - } - - /** - * Create a status associated with this plugin. - * - * @param severity - * @param aCode - * @param aMessage - * @param exception - * @return A status configured with this plugin's id and the given parameters. - */ - public static IStatus createStatus(int severity, int aCode, - String aMessage, Throwable exception) { - return new Status(severity, PLUGIN_ID, aCode, - aMessage != null ? aMessage : "No message.", exception); //$NON-NLS-1$ - } - - /** - * - * @param aCode - * @param aMessage - * @param exception - * @return A status configured with this plugin's id and the given parameters. - */ - public static IStatus createErrorStatus(int aCode, String aMessage, - Throwable exception) { - return createStatus(IStatus.ERROR, aCode, aMessage, exception); - } -} 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 0025ca404..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.properties +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2006 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 -j2eeProjectDecorator=J2EE Project Decorator -j2eeProjectDecorator.description=Adds a version decorator to J2EE projects. -extension.j2ee.name=J2EE Deployment Descriptors -extension.application.name=J2EE Application Deployment Descriptors -extension.appclient.name=J2EE Application Client Deployment Descriptors -extension.connector.name=J2EE Connector Deployment Descriptors -extension.ejb.name=J2EE EJB Deployment Descriptors -extension.web.name=J2EE Web Deployment Descriptors -filter.jetemitters.name=.JETEmitters -filter.jetemitters.description=Hide .JETEmitters project -PROBLEM_MARKER_LABEL_RESOURCE_DECORATOR=Problem Marker Resource Decorator 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 6fbecf240..000000000 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/plugin.xml +++ /dev/null @@ -1,1365 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <extension - point="org.eclipse.ui.navigator.viewer"> - <viewerContentBinding - viewerId="org.eclipse.ui.navigator.ProjectExplorer"> - <includes> - <contentExtension pattern="org.eclipse.jst.navigator.j2ee.ui.*"/> - <contentExtension pattern="org.eclipse.jst.j2ee.navigator.ui.filters.*"/> - </includes> - </viewerContentBinding> - </extension> - - <extension - point="org.eclipse.ui.navigator.navigatorContent"> - <navigatorContent name="%extension.application.name" - priority="highest" icon="icons/eargroup_obj.gif" - activeByDefault="true" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.EARContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - id="org.eclipse.jst.navigator.j2ee.ui.EARDDContent"> - <triggerPoints> - <or> - <instanceof value="java.io.File" /> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="common.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="application.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="modulemap.xmi" /> - </or> - </and> - <and> - <adapt type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear:1.4]" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider"> - </instanceof> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.J2EEUtilityJarItemProvider"> - </instanceof> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.UtilityModuleProjectItemProvider"> - </instanceof> - </or> - </triggerPoints> - <!-- The possibleChildren is more verbose to allow the drop handlers to be invoked for - children not provided by this extension - --> - <possibleChildren> - <or> - <instanceof value="java.io.File" /> - <adapt type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.utility" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.appclient" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - </or> - </adapt> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="common.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="application.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="client.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="modulemap.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="ejb.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jca.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="webapplication.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jsp.xmi" /> - </or> - </and> - </or> - </possibleChildren> - <commonSorter - id="org.eclipse.jst.j2ee.navigator.internal.ApplicationViewerSorter" - class="org.eclipse.jst.j2ee.navigator.internal.ApplicationViewerSorter" /> - <!-- Handle open requests --> - <actionProvider - class="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - id="org.eclipse.jst.j2ee.navigator.ui.EARActionProvider"> - <enablement> - <or> - <and> - <instanceof - value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="common.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="application.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="modulemap.xmi" /> - </or> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider" /> - </or> - </enablement> - </actionProvider> - <dropAssistant - class="org.eclipse.jst.j2ee.navigator.internal.dnd.AddProjectToEARDropAssistant" - id="org.eclipse.jst.j2ee.navigator.ui.AddModulesToEAR"> - <possibleDropTargets> - <or> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </adapt> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - </or> - </possibleDropTargets> - </dropAssistant> - <dropAssistant - class="org.eclipse.jst.j2ee.navigator.internal.dnd.ImportJ2EEModuleDropAssistant" - id="org.eclipse.jst.j2ee.navigator.ui.ImportJ2EEModule"> - <possibleDropTargets> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </adapt> - </or> - </possibleDropTargets> - </dropAssistant> - - <!-- EAR New --> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.utility" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- EAR Import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.j2ee.internal.wizard.EARComponentImportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- Utility Jar Import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizardNew"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.application.Module" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - - <!-- EAR export --> - <commonWizard type="export" - wizardId="org.eclipse.jst.j2ee.internal.wizard.EARComponentExportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - </or> - </enablement> - </commonWizard> - - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.wst.web.ui.internal.wizards.SimpleWebProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </or> - </adapt> - </and> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jpt.ui.wizard.newJpaProject"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </or> - </adapt> - </and> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - </navigatorContent> - - <navigatorContent name="%extension.appclient.name" priority="highest" - icon="icons/appclientgroup_obj.gif" activeByDefault="true" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - id="org.eclipse.jst.navigator.j2ee.ui.AppClientContent"> - <triggerPoints> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="client.xmi" /> - </or> - </and> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.appclient:1.4]" /> - </adapt> - </or> - </triggerPoints> - <possibleChildren> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="client.xmi" /> - </or> - </and> - </possibleChildren> - <commonSorter - id="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" /> - <!-- Handle open requests --> - <actionProvider - class="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - id="org.eclipse.jst.j2ee.navigator.ui.AppClientActionProvider"> - <enablement> - <or> - <and> - <instanceof - value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="client.xmi" /> - </or> - </and> - </or> - </enablement> - </actionProvider> - - <!-- AppClient New --> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.appclient" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- App Client Import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentImportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- App Client export --> - <commonWizard type="export" - wizardId="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentExportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.appclient" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.client.ApplicationClient" /> - </or> - </enablement> - </commonWizard> - </navigatorContent> - - <navigatorContent name="%extension.web.name" priority="highest" - icon="icons/webgroup_obj.gif" activeByDefault="true" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - id="org.eclipse.jst.navigator.j2ee.ui.WebDDContent"> - <triggerPoints> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="webapplication.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jsp.xmi" /> - </or> - </and> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web:2.4]" /> - </adapt> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebGroupItemProvider"> - </instanceof> - </or> - </triggerPoints> - <possibleChildren> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject"/> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="webapplication.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jsp.xmi" /> - </or> - </and> - </or> - </possibleChildren> - <commonSorter - id="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" /> - <!-- Handle open requests --> - <actionProvider - class="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - id="org.eclipse.jst.j2ee.navigator.ui.WebActionProvider"> - <enablement> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="webapplication.xmi" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jsp.xmi" /> - </or> - </and> - </enablement> - </actionProvider> - <actionProvider - class="org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider" - id="org.eclipse.jst.j2ee.navigator.internal.WebNewActionProvider"> - <enablement> - <instanceof value="org.eclipse.jst.j2ee.internal.war.ui.util.WebGroupItemProvider"/> - </enablement> - </actionProvider> - - <!-- Web New --> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - - <!-- Web Import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentImportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- Web Export --> - <commonWizard type="export" - wizardId="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentExportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebGroupItemProvider" /> - </or> - </enablement> - </commonWizard> - - <!-- The contribution of the New *.jsp wizard to Files, Folders, and Projects - is handled in org.eclipse.jst.jsp.ui. This contribution adds the - wizard to the model elements contributed by the J2EE Content Provider --> - <commonWizard - menuGroupId="org.eclipse.wst.web.ui" - type="new" - wizardId="org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebGroupItemProvider" /> - - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp" /> - - </or> - </enablement> - </commonWizard> - - <!-- The contribution of the New *.html wizard to Files, Folders, and Projects - is handled in org.eclipse.jst.html.ui. This contribution adds the - wizard to the model elements contributed by the J2EE Content Provider --> - <commonWizard - menuGroupId="org.eclipse.wst.web.ui" - type="new" - wizardId="org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebGroupItemProvider" /> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp" /> - </or> - </enablement> - </commonWizard> - - <!-- New Servlet --> - <commonWizard - menuGroupId="org.eclipse.wst.web.ui.webclass" - type="new" - wizardId="org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard"> - <enablement> - <or> - <and> - <adapt - type="org.eclipse.core.resources.IResource"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web"/> - </or> - </adapt> - <or> - <instanceof value="org.eclipse.core.resources.IProject"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragment"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/> - <instanceof value="org.eclipse.jdt.core.ICompilationUnit"/> - <instanceof - value="org.eclipse.jdt.core.IType"> - </instanceof> - <adapt - type="org.eclipse.core.resources.IResource"> - <and> - <test - forcePluginActivation="true" - property="org.eclipse.core.resources.webResource"> - </test> - <test - forcePluginActivation="true" - property="org.eclipse.core.resources.extension" - value="jsp"> - </test> - </and> - </adapt> - </or> - </and> - <instanceof - value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp"/> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebServletGroupItemProvider"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.Servlet"/> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebServletMappingGroupItemProvider"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.ServletMapping"/> - </or> - </enablement> - </commonWizard> - - <!-- New Filter --> - <commonWizard - menuGroupId="org.eclipse.wst.web.ui.webclass" - type="new" - wizardId="org.eclipse.jst.servlet.ui.internal.wizard.AddFilterWizard"> - <enablement> - <or> - <and> - <adapt - type="org.eclipse.core.resources.IResource"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web"/> - </or> - </adapt> - <or> - <instanceof value="org.eclipse.core.resources.IProject"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragment"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/> - <instanceof value="org.eclipse.jdt.core.ICompilationUnit"/> - <instanceof - value="org.eclipse.jdt.core.IType"> - </instanceof> - <adapt - type="org.eclipse.core.resources.IResource"> - <test - forcePluginActivation="true" - property="org.eclipse.core.resources.webResource"> - </test> - </adapt> - </or> - </and> - <instanceof - value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp"/> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebFiltersGroupItemProvider"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.Filter"/> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebFilterMappingGroupItemProvider"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.FilterMapping"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.Servlet"> - </instanceof> - </or> - </enablement> - </commonWizard> - - <!-- New Listener --> - <commonWizard - menuGroupId="org.eclipse.wst.web.ui.webclass" - type="new" - wizardId="org.eclipse.jst.servlet.ui.internal.wizard.AddListenerWizard"> - <enablement> - <or> - <and> - <adapt - type="org.eclipse.core.resources.IResource"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.web"/> - </or> - </adapt> - <or> - <instanceof value="org.eclipse.core.resources.IProject"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragment"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/> - <instanceof value="org.eclipse.jdt.core.ICompilationUnit"/> - <instanceof - value="org.eclipse.jdt.core.IType"> - </instanceof> - </or> - </and> - <instanceof - value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode"/> - <instanceof - value="org.eclipse.jst.j2ee.webapplication.WebApp"/> - <instanceof - value="org.eclipse.jst.j2ee.internal.war.ui.util.WebListenerGroupItemProvider"/> - <instanceof - value="org.eclipse.jst.j2ee.common.Listener"/> - </or> - </enablement> - </commonWizard> - </navigatorContent> - <navigatorContent name="%extension.ejb.name" priority="highest" - icon="icons/ejbgroup_obj.gif" activeByDefault="true" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - id="org.eclipse.jst.navigator.j2ee.ui.EJBDDContent"> - <triggerPoints> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="ejb.xmi" /> - </and> - <and> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb:2.1]" /> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper"> - </instanceof> - <instanceof - value="org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBItemProvider"> - </instanceof> - <instanceof - value="org.eclipse.jst.j2ee.navigator.internal.LoadingDDNode"> - </instanceof> - </or> - </triggerPoints> - <possibleChildren> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="ejb.xmi" /> - </or> - </and> - <instanceof value="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper"/> - <instanceof value="org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBItemProvider"/> - </or> - <instanceof value="org.eclipse.jst.j2ee.navigator.internal.LoadingDDNode"/> - </possibleChildren> - <commonSorter - id="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" /> - <!-- Handle open requests --> - <actionProvider - class="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - id="org.eclipse.jst.j2ee.navigator.ui.EJBActionProvider"> - <enablement> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="ejb.xmi" /> - </and> - <instanceof value="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper"/> - </or> - </enablement> - </actionProvider> - <!-- By default, anything that can adapt to an IResource gets New Action Provider (from the Resources extension), - so we just need to add one for the EJB Item Providers (the groupings in the tree) - --> - <actionProvider - class="org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider" - id="org.eclipse.jst.j2ee.navigator.internal.EjbNewActionProvider"> - <enablement> - <instanceof - value="org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBItemProvider" /> - </enablement> - </actionProvider> - - <!-- EJB New --> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jst.ejb.ui.project.facet.EjbProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- EJB Import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.ejb.ui.internal.wizard.EJBComponentImportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- EJB Export --> - <commonWizard type="export" - wizardId="org.eclipse.jst.ejb.ui.internal.wizard.EJBComponentExportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb" /> - </or> - </adapt> - </and> - <instanceof value="org.eclipse.jst.j2ee.ejb.EJBJar" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBItemProvider" /> - </or> - </enablement> - </commonWizard> - - <!-- Add Enterprise Bean --> - <commonWizard - menuGroupId="org.eclipse.jst.ejb.ui" - type="new" - wizardId="org.eclipse.jst.j2ee.ejb.annotation.ui.internal.wizards.AddEjbWizard"> - <enablement> - <or> - <adapt - type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb.xdoclet" /> - </adapt> - <and> - <instanceof - value="org.eclipse.jst.j2ee.ejb.EJBJar" /> - <adapt - type="org.eclipse.core.resources.IResource"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb.xdoclet" /> - </adapt> - </and> - <and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider" /> - <test forcePluginActivation="true" - property="org.eclipse.jst.j2ee.provider.projectFacet" - value="jst.ejb.xdoclet" /> - </and> - </or> - </enablement> - </commonWizard> - <commonWizard - menuGroupId="org.eclipse.jst.ejb.ui" - type="new" - wizardId="org.eclipse.jst.ejb.ui.internal.wizard.AddSessionBeanWizard"> - <enablement> - <or> - <and> - <adapt - type="org.eclipse.core.resources.IResource"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb:3.0"/> - </or> - </adapt> - <or> - <instanceof value="org.eclipse.core.resources.IProject"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragment"/> - <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/> - <instanceof value="org.eclipse.jdt.core.ICompilationUnit"/> - </or> - </and> - <and> - <instanceof - value="org.eclipse.jst.j2ee.ejb.EJBJar" /> - <adapt - type="org.eclipse.core.resources.IResource"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb:3.0" /> - </adapt> - </and> - <and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider" /> - <test forcePluginActivation="true" - property="org.eclipse.jst.j2ee.provider.projectFacet" - value="jst.ejb.xdoclet" /> - </and> - </or> - </enablement> - </commonWizard> - <commonWizard - menuGroupId="org.eclipse.jst.ejb.ui" - type="new" - wizardId="org.eclipse.jst.ejb.ui.internal.wizard.AddMessageDrivenBeanWizard"> - <enablement> - <or> - <and> - <adapt - type="org.eclipse.core.resources.IResource"> - <or> - <test - forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb:3.0"> - </test> - </or> - </adapt> - <or> - <instanceof - value="org.eclipse.core.resources.IProject"> - </instanceof> - <instanceof - value="org.eclipse.jdt.core.IPackageFragment"> - </instanceof> - <instanceof - value="org.eclipse.jdt.core.IPackageFragmentRoot"> - </instanceof> - <instanceof - value="org.eclipse.jdt.core.ICompilationUnit"> - </instanceof> - </or> - </and> - <and> - <instanceof - value="org.eclipse.jst.j2ee.ejb.EJBJar"> - </instanceof> - <adapt - type="org.eclipse.core.resources.IResource"> - <test - forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ejb:3.0"> - </test> - </adapt> - </and> - <and> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider"> - </instanceof> - <test - forcePluginActivation="true" - property="org.eclipse.jst.j2ee.provider.projectFacet" - value="jst.ejb.xdoclet"> - </test> - </and> - </or> - </enablement> - </commonWizard> - </navigatorContent> - <navigatorContent name="%extension.connector.name" - priority="highest" icon="icons/connectorgroup_obj.gif" - activeByDefault="true" - contentProvider="org.eclipse.jst.j2ee.navigator.internal.J2EEContentProvider" - labelProvider="org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider" - id="org.eclipse.jst.navigator.j2ee.ui.ConnectorDDContent"> - <triggerPoints> - <or> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jca.xmi" /> - </and> - <adapt type="org.eclipse.core.resources.IProject"> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - </adapt> - </or> - </triggerPoints> - <possibleChildren> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jca.xmi" /> - </and> - </possibleChildren> - <commonSorter - id="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEViewerSorter" /> - <!-- Handle open requests --> - <actionProvider - class="org.eclipse.jst.j2ee.navigator.internal.J2EEActionProvider" - id="org.eclipse.jst.j2ee.navigator.ui.ConnectorActionProvider"> - <enablement> - <and> - <instanceof value="org.eclipse.emf.ecore.EObject" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.emfworkbench.integration.emfPackage" - value="jca.xmi" /> - </and> - </enablement> - </actionProvider> - - <!-- Connector New --> - <commonWizard - menuGroupId="org.eclipse.jst.j2ee.ui.newProjects" - type="new" - wizardId="org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorProjectWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- Connector import --> - <commonWizard type="import" - wizardId="org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorComponentImportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.ear" /> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.application.Application" /> - <instanceof - value="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider" /> - <instanceof - value="org.eclipse.jst.j2ee.jca.internal.impl.ResourceAdapterImpl" /> - <and> - <instanceof value="java.util.Collection"/> - <count value="0" /> - </and> - </or> - </enablement> - </commonWizard> - <!-- Connector Export --> - <commonWizard type="export" - wizardId="org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorComponentExportWizard"> - <enablement> - <or> - <instanceof - value="org.eclipse.core.resources.IWorkspaceRoot" /> - <and> - <adapt - type="org.eclipse.core.resources.IProject"> - <or> - <test forcePluginActivation="true" - property="org.eclipse.wst.common.project.facet.core.projectFacet" - value="jst.connector" /> - </or> - </adapt> - </and> - <instanceof - value="org.eclipse.jst.j2ee.jca.Connector" /> - <instanceof - value="org.eclipse.jst.j2ee.jca.internal.impl.ResourceAdapterImpl" /> - </or> - </enablement> - </commonWizard> - </navigatorContent> - <commonFilter - activeByDefault="true" - description="%filter.jetemitters.description" - id="org.eclipse.jst.j2ee.navigator.ui.filters.jetemitters" - name="%filter.jetemitters.name"> - <filterExpression> - <adapt type="org.eclipse.core.resources.IProject"> - <test - forcePluginActivation="true" - property="org.eclipse.core.resources.name" - value=".JETEmitters"/> - </adapt> - </filterExpression> - </commonFilter> - - </extension> - - <extension - point="org.eclipse.core.runtime.adapters"> - <factory - adaptableType="org.eclipse.jst.j2ee.common.J2EEEObject" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEEMFAdapterFactory"> - <adapter type="org.eclipse.core.resources.IFile"/> - <adapter type="org.eclipse.core.resources.IResource"/> - </factory> - <factory - adaptableType="org.eclipse.jst.j2ee.common.J2EEEAttribute" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEEMFAdapterFactory"> - <adapter type="org.eclipse.core.resources.IFile"/> - <adapter type="org.eclipse.core.resources.IResource"/> - </factory> - </extension> - -<!-- ====================================================== --> -<!-- Label Decorators --> -<!-- ====================================================== --> - <extension - point="org.eclipse.ui.decorators"> - <decorator - adaptable="true" - location="TOP_LEFT" - lightweight="true" - label="%j2eeProjectDecorator" - state="true" - class="org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator" - id="org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator"> - <enablement> - <or> - <objectClass name="org.eclipse.core.resources.IProject"/> - <objectClass name="org.eclipse.jdt.core.IJavaProject"/> - </or> - </enablement> - <description> - %j2eeProjectDecorator.description - </description> - </decorator> - </extension> - - <extension - point="org.eclipse.ui.decorators"> - <decorator - adaptable="true" - label="%PROBLEM_MARKER_LABEL_RESOURCE_DECORATOR" - state="true" - class="org.eclipse.jdt.ui.ProblemsLabelDecorator" - id="org.eclipse.jst.j2ee.navigator.ui.java.resource.decorator"> - <enablement> - <objectClass name="org.eclipse.core.resources.IResource"/> - </enablement> - </decorator> - </extension> - <extension - point="org.eclipse.core.expressions.propertyTesters"> - <propertyTester - class="org.eclipse.jst.j2ee.navigator.internal.WebResourcePropertyTester" - id="org.eclipse.jst.j2ee.navigator.webResourcePropertyTester" - namespace="org.eclipse.core.resources" - properties="webResource" - type="org.eclipse.core.resources.IResource"> - </propertyTester> - </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> |