Author: rob.stryker(a)jboss.com
Date: 2009-01-26 22:46:18 -0500 (Mon, 26 Jan 2009)
New Revision: 13285
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
Log:
JBIDE-3573
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesLabelProvider.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesLabelProvider.java 2009-01-27
00:38:54 UTC (rev 13284)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesLabelProvider.java 2009-01-27
03:46:18 UTC (rev 13285)
@@ -34,8 +34,19 @@
*
*/
public class ArchivesLabelProvider extends BaseLabelProvider implements ILabelProvider {
+ public static final int IGNORE_FULL_PATHS = 1;
+ public static final int SHOW_FULL_PATHS = 2;
+ public static final int FOLLOW_PREFS_FULL_PATHS = 3;
+
+ private int showFullPaths;
+ public ArchivesLabelProvider() {
+ this(FOLLOW_PREFS_FULL_PATHS);
+ }
+
+ public ArchivesLabelProvider(int showFullPaths) {
+ this.showFullPaths = showFullPaths;
+ }
-
/*
* Important snippets to save
* image = PlatformUI.getWorkbench().getDecoratorManager().decorateImage(image,
element);
@@ -124,7 +135,9 @@
}
private String getPackageText (IArchive pkg) {
String text = pkg.getName();
- if (PrefsInitializer.getBoolean( PrefsInitializer.PREF_SHOW_PACKAGE_OUTPUT_PATH)) {
+ if (showFullPaths == SHOW_FULL_PATHS ||
+ (showFullPaths == FOLLOW_PREFS_FULL_PATHS &&
+ PrefsInitializer.getBoolean( PrefsInitializer.PREF_SHOW_PACKAGE_OUTPUT_PATH))) {
text += " [" + PathUtils.getAbsoluteLocation(pkg) + "]";
//$NON-NLS-1$ //$NON-NLS-2$
}
return text;
@@ -135,8 +148,10 @@
}
private String getPackageFileSetText (IArchiveFileSet fileset) {
- boolean showFullPath = PrefsInitializer.getBoolean(
- PrefsInitializer.PREF_SHOW_FULL_FILESET_ROOT_DIR);
+ boolean showFullPath = showFullPaths == SHOW_FULL_PATHS ||
+ (showFullPaths == FOLLOW_PREFS_FULL_PATHS &&
+ PrefsInitializer.getBoolean(
+ PrefsInitializer.PREF_SHOW_FULL_FILESET_ROOT_DIR));
boolean inWorkspace = fileset.isInWorkspace();
String text = ""; //$NON-NLS-1$
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2009-01-27
00:38:54 UTC (rev 13284)
+++
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2009-01-27
03:46:18 UTC (rev 13285)
@@ -109,6 +109,8 @@
if( type == null ) {
childPack = createGenericIArchive(child.getProject(), null,
child.getProject().getName() + JAR_EXTENSION);
} else {
+ if( new Path(childModules[i].getName()).segmentCount() > 1 )
+ continue;
childPack = type.createDefaultConfiguration(child.getProject().getName(), new
NullProgressMonitor());
}
topLevel.addChild(childPack);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2009-01-27
00:38:54 UTC (rev 13284)
+++
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2009-01-27
03:46:18 UTC (rev 13285)
@@ -94,7 +94,7 @@
previewGroup.setLayoutData(previewData);
previewGroup.setLayout(new FormLayout());
previewViewer = new TreeViewer(previewGroup);
- previewViewer.setLabelProvider(new ArchivesLabelProvider());
+ previewViewer.setLabelProvider(new
ArchivesLabelProvider(ArchivesLabelProvider.IGNORE_FULL_PATHS));
previewViewer.setContentProvider(new ArchivesContentProviderDelegate(false));
FormData warPreviewData = new FormData();
warPreviewData.left = new FormAttachment(0,5);
Show replies by date