|
Lines 1-5
Link Here
|
| 1 |
/*********************************************************************** |
1 |
/*********************************************************************** |
| 2 |
* Copyright (c) 2008, 2010 by SAP AG, Walldorf. |
2 |
* Copyright (c) 2008, 2013 by SAP AG, Walldorf. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 7-12
Link Here
|
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* SAP AG - initial API and implementation |
9 |
* SAP AG - initial API and implementation |
|
|
10 |
* IBM - Java EE 7 support |
| 10 |
***********************************************************************/ |
11 |
***********************************************************************/ |
| 11 |
package org.eclipse.jst.jee.ui.internal.navigator.ear; |
12 |
package org.eclipse.jst.jee.ui.internal.navigator.ear; |
| 12 |
|
13 |
|
|
Lines 30-35
Link Here
|
| 30 |
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants; |
31 |
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants; |
| 31 |
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; |
32 |
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; |
| 32 |
import org.eclipse.wst.common.project.facet.core.IFacetedProject; |
33 |
import org.eclipse.wst.common.project.facet.core.IFacetedProject; |
|
|
34 |
import org.eclipse.wst.common.project.facet.core.IProjectFacet; |
| 33 |
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; |
35 |
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; |
| 34 |
|
36 |
|
| 35 |
/** |
37 |
/** |
|
Lines 44-49
Link Here
|
| 44 |
public final static String EAR_DEFAULT_LIB = "lib"; //$NON-NLS-1$ |
46 |
public final static String EAR_DEFAULT_LIB = "lib"; //$NON-NLS-1$ |
| 45 |
private static Image ear50Image; |
47 |
private static Image ear50Image; |
| 46 |
private static Image ear60Image; |
48 |
private static Image ear60Image; |
|
|
49 |
private static Image ear70Image; |
| 47 |
private EARVirtualComponent earComponent; |
50 |
private EARVirtualComponent earComponent; |
| 48 |
private IFile ddFile; |
51 |
private IFile ddFile; |
| 49 |
|
52 |
|
|
Lines 75-87
Link Here
|
| 75 |
|
78 |
|
| 76 |
try { |
79 |
try { |
| 77 |
IFacetedProject facetedProject = ProjectFacetsManager.create(project); |
80 |
IFacetedProject facetedProject = ProjectFacetsManager.create(project); |
|
|
81 |
IProjectFacet earFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE); |
| 78 |
//EE6TODO |
82 |
//EE6TODO |
| 79 |
if (facetedProject != null && |
83 |
if (facetedProject != null && |
| 80 |
(facetedProject.hasProjectFacet( |
84 |
(facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionConstants.VERSION_5_0_TEXT)) |
| 81 |
ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE).getVersion( |
85 |
|| facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionConstants.VERSION_6_0_TEXT)) |
| 82 |
J2EEVersionConstants.VERSION_5_0_TEXT)) || facetedProject.hasProjectFacet( |
86 |
|| facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionConstants.VERSION_7_0_TEXT)))) { |
| 83 |
ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE).getVersion( |
|
|
| 84 |
J2EEVersionConstants.VERSION_6_0_TEXT)))) { |
| 85 |
|
87 |
|
| 86 |
if (bundledLibsNode == null) { |
88 |
if (bundledLibsNode == null) { |
| 87 |
BundledNode bundledLibsDirectoryNode = new BundledNode(project, Messages.LIBRARY_DIRECTORY + ": " + EarUtilities.getEARLibDir(earComponent), null);//$NON-NLS-1$ |
89 |
BundledNode bundledLibsDirectoryNode = new BundledNode(project, Messages.LIBRARY_DIRECTORY + ": " + EarUtilities.getEARLibDir(earComponent), null);//$NON-NLS-1$ |
|
Lines 112-117
Link Here
|
| 112 |
return getEar50Image(); |
114 |
return getEar50Image(); |
| 113 |
} else if (J2EEVersionConstants.VERSION_6_TEXT.equals(version)) { |
115 |
} else if (J2EEVersionConstants.VERSION_6_TEXT.equals(version)) { |
| 114 |
return getEar60Image(); |
116 |
return getEar60Image(); |
|
|
117 |
} else if (J2EEVersionConstants.VERSION_7_TEXT.equals(version)) { |
| 118 |
return getEar70Image(); |
| 115 |
} |
119 |
} |
| 116 |
return getEar50Image(); |
120 |
return getEar50Image(); |
| 117 |
} |
121 |
} |
|
Lines 146-149
Link Here
|
| 146 |
return ear60Image; |
150 |
return ear60Image; |
| 147 |
} |
151 |
} |
| 148 |
|
152 |
|
|
|
153 |
private Image getEar70Image() { |
| 154 |
if (ear70Image == null) { |
| 155 |
ear70Image = JEEUIPlugin.getDefault().getImageDescriptor(JEEUIPluginIcons.EAR7_IMAGE).createImage(); |
| 156 |
} |
| 157 |
return ear70Image; |
| 158 |
} |
| 149 |
} |
159 |
} |