|
Lines 30-36
Link Here
|
| 30 |
import org.eclipse.jface.viewers.StructuredViewer; |
30 |
import org.eclipse.jface.viewers.StructuredViewer; |
| 31 |
import org.eclipse.jst.servlet.ui.internal.plugin.ServletUIPlugin; |
31 |
import org.eclipse.jst.servlet.ui.internal.plugin.ServletUIPlugin; |
| 32 |
import org.eclipse.jst.servlet.ui.internal.plugin.WEBUIMessages; |
32 |
import org.eclipse.jst.servlet.ui.internal.plugin.WEBUIMessages; |
| 33 |
import org.eclipse.osgi.util.NLS; |
|
|
| 34 |
import org.eclipse.swt.graphics.Image; |
33 |
import org.eclipse.swt.graphics.Image; |
| 35 |
|
34 |
|
| 36 |
public class CompressedJavaProject implements ICompressedNode, IAdaptable { |
35 |
public class CompressedJavaProject implements ICompressedNode, IAdaptable { |
|
Lines 60-71
Link Here
|
| 60 |
} |
59 |
} |
| 61 |
|
60 |
|
| 62 |
private String determineLabel() { |
61 |
private String determineLabel() { |
| 63 |
List nonextSourceFolders = getNonExternalSourceFolders(); |
62 |
return WEBUIMessages.Compressed_JavaResources; |
| 64 |
IPackageFragmentRoot singleRoot = null; |
|
|
| 65 |
if (nonextSourceFolders.size() == 1) { |
| 66 |
singleRoot = (IPackageFragmentRoot) nonextSourceFolders.get(0); |
| 67 |
} |
| 68 |
return NLS.bind(WEBUIMessages.Compressed_JavaResources, ((singleRoot != null) ? ": " + singleRoot.getElementName() : "")); //$NON-NLS-1$ //$NON-NLS-2$ |
| 69 |
} |
63 |
} |
| 70 |
|
64 |
|
| 71 |
public IProject getProject() { |
65 |
public IProject getProject() { |
|
Lines 75-85
Link Here
|
| 75 |
public Object[] getChildren(ITreeContentProvider delegateContentProvider) { |
69 |
public Object[] getChildren(ITreeContentProvider delegateContentProvider) { |
| 76 |
|
70 |
|
| 77 |
List nonExternalSourceFolders = getNonExternalSourceFolders(); |
71 |
List nonExternalSourceFolders = getNonExternalSourceFolders(); |
| 78 |
if (nonExternalSourceFolders.size() == 1) { |
|
|
| 79 |
Object[] sourceFolderChildren = delegateContentProvider.getChildren(nonExternalSourceFolders.get(0)); |
| 80 |
nonExternalSourceFolders.clear(); |
| 81 |
nonExternalSourceFolders.addAll(Arrays.asList(sourceFolderChildren)); |
| 82 |
} |
| 83 |
nonExternalSourceFolders.add(getCompressedJavaLibraries()); |
72 |
nonExternalSourceFolders.add(getCompressedJavaLibraries()); |
| 84 |
return nonExternalSourceFolders.toArray(); |
73 |
return nonExternalSourceFolders.toArray(); |
| 85 |
} |
74 |
} |