Author: rob.stryker(a)jboss.com
Date: 2008-10-01 14:15:35 -0400 (Wed, 01 Oct 2008)
New Revision: 10611
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
Log:
JBIDE-2649
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01
18:03:21 UTC (rev 10610)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/PathUtils.java 2008-10-01
18:15:35 UTC (rev 10611)
@@ -72,7 +72,7 @@
return new Path(translated).makeAbsolute().toString();
}
} catch( CoreException ce ) {
- ce.printStackTrace();
+ // ignore, just return null ce.printStackTrace();
}
return null;
}
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01
18:03:21 UTC (rev 10610)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-10-01
18:15:35 UTC (rev 10611)
@@ -246,12 +246,10 @@
}
- String translated;
+ String translated=""; //$NON-NLS-1$
Image img=null;
try {
- if( destinationNode != null ) {
- translated=""; img=null; //$NON-NLS-1$
- } else {
+ if( destinationNode == null ) {
translated = getTranslatedGlobalPath();
if( translated == null || !new Path(translated).toFile().exists()) {
translated= NLS.bind(ArchivesUIMessages.PathDoesNotExistInFilesystem,translated);
@@ -269,6 +267,7 @@
} else if( ce.getStatus().getSeverity() == IStatus.WARNING)
img =
PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
}
+
translatedPathImage.setImage(img);
translatedPath.setText(translated);
fireChange();
@@ -281,11 +280,11 @@
if( workspaceRelative ) {
IPath p = ArchivesCore.getInstance().getVFS().workspacePathToAbsolutePath(new
Path(postSub));
if( p != null ) return p.toString();
- return NLS.bind(postSub, ArchivesUIMessages.ErrorConvertingPaths);
+ return NLS.bind(ArchivesUIMessages.ErrorConvertingPaths, postSub);
}
return postSub;
} catch( CoreException e ) {
- return NLS.bind(e.getMessage(), ArchivesUIMessages.ErrorStringSubstitution);
+ return NLS.bind(ArchivesUIMessages.ErrorStringSubstitution, e.getMessage());
}
}
@@ -294,12 +293,12 @@
try {
IPath p = PathUtils.getGlobalLocation(path, projectName, workspaceRelative,
getDescriptorVersion());
if( p != null ) return p.toString();
- String ERROR = NLS.bind(p.toOSString(), ArchivesUIMessages.ErrorConvertingPaths);
+ String ERROR = NLS.bind(ArchivesUIMessages.ErrorConvertingPaths, path);
Status s = new Status(IStatus.WARNING, PackagesUIPlugin.PLUGIN_ID, ERROR);
throw new CoreException(s);
} catch( CoreException e ) {
- String ERROR = NLS.bind(e.getMessage(), ArchivesUIMessages.ErrorStringSubstitution);
+ String ERROR = NLS.bind(ArchivesUIMessages.ErrorStringSubstitution, e.getMessage());
Status s = new Status(IStatus.ERROR, PackagesUIPlugin.PLUGIN_ID, ERROR, e);
throw new CoreException(s);
}