Author: max.andersen(a)jboss.com
Date: 2008-08-18 13:11:56 -0400 (Mon, 18 Aug 2008)
New Revision: 9777
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java
Log:
JBIDE-2651 and JBIDE-2652
- version were not set for new archives resulting in relative calculations being bad
- translated path were passed into dialog instead of the raw path resulting in the
destination directory to grow constantly
- the validation were constantly setting values into destination dir resetting the cursor
to the beginning so I made it only update the field if it actually would change it.
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2008-08-18
13:55:02 UTC (rev 9776)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2008-08-18
17:11:56 UTC (rev 9777)
@@ -183,6 +183,7 @@
}
} else {
packages = new XbPackages();
+ packages.setVersion(1.2);
}
// Fill the model
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-08-18
13:55:02 UTC (rev 9776)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/util/composites/ArchiveSourceDestinationComposite.java 2008-08-18
17:11:56 UTC (rev 9777)
@@ -216,8 +216,13 @@
PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER) :
ArchivesSharedImages.getImage(ArchivesSharedImages.IMG_PACKAGE));
pathImage.setImage(image);
- text.setText(destinationNode == null ?
- (path == null ? "" : path) :
((INamedContainerArchiveNode)destinationNode).getName());
+
+ String destText = destinationNode == null ?
+ (path == null ? "" : path) :
((INamedContainerArchiveNode)destinationNode).getName();
+ if(!text.getText().equals(destText)) {
+ text.setText(destText);
+ }
+
String translated;
Image img=null;
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java 2008-08-18
13:55:02 UTC (rev 9776)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java 2008-08-18
17:11:56 UTC (rev 9777)
@@ -150,7 +150,7 @@
if( parent != null && !(parent instanceof IArchiveModelRootNode)) {
destinationComposite.init(parent);
} else {
- destinationComposite.init(PathUtils.getGlobalLocation(archive).toString(),
archive.isDestinationInWorkspace());
+ destinationComposite.init(archive.getRawDestinationPath(),
archive.isDestinationInWorkspace());
}
} else {
if(wizard.getInitialNode() != null )
Show replies by date