[jboss-cvs] jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages ...

Robert Stryker rob.stryker at jboss.com
Mon Mar 5 14:44:33 EST 2007


  User: rawb    
  Date: 07/03/05 14:44:33

  Modified:    as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages 
                        WARInfoWizardPage.java
  Log:
  no comment
  
  Revision  Changes    Path
  1.5       +16 -3     jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/WARInfoWizardPage.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WARInfoWizardPage.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosside/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/WARInfoWizardPage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- WARInfoWizardPage.java	4 Mar 2007 01:07:51 -0000	1.4
  +++ WARInfoWizardPage.java	5 Mar 2007 19:44:33 -0000	1.5
  @@ -125,11 +125,10 @@
   				if( dialog.open() == Window.OK) {
   					ArrayList selectedFolders = new ArrayList();
   					Object[] o = dialog.getResult();
  -					String imploded = "";
   					for( int i = 0; i < o.length; i++ ) {
   						selectedFolders.add(((IResource)o[i]).getFullPath().toOSString());
  -						imploded += ((IResource)o[i]).getFullPath() + ",";
   					}
  +
   					IPackageFolder webinf = getFolder(wizard.getPackage(), ObscurelyNamedPackageTypeSuperclass.WEBINF);
   					IPackageFileSet[] sets = webinf.getFileSets();
   					for( int i = 0; i < sets.length; i++ ) {
  @@ -187,6 +186,8 @@
       			String path = filesets[i].getSourceContainer().getFullPath().toOSString();
       			s += path + ",";
       		}
  +    		if( s.length() > 0 ) 
  +    			s = s.substring(0, s.length()-1);
       	}
       	webinfFolders.setText(s);
       }
  @@ -215,12 +216,24 @@
      		 super(parent, new FolderLabelProvider(), new FolderContentProvider());
      		 setAllowMultiple(allowMultiple);
      		 setupDestinationList();
  +   		 setupInitialSelections(selectedPaths);
      	}
      	 
      	 private void setupDestinationList () {
      		 List projects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());
      		 setInput(projects);
      	 }
  +   	 private void setupInitialSelections(String initialSelection) {
  +   		 ArrayList resources = new ArrayList();
  +   		 String[] paths = initialSelection.split(",");
  +   		 // find IResources
  +   		 IResource res;
  +   		 for( int i = 0; i < paths.length; i++ ) {
  +   			 res = ResourcesPlugin.getWorkspace().getRoot().findMember(paths[i]);
  +   			 resources.add(res);
  +   		 }
  +   		 setInitialSelections((IResource[]) resources.toArray(new IResource[resources.size()]));
  +   	 }
      	 
      	 private static class FolderContentProvider implements ITreeContentProvider {
      		private static final Object[] NO_CHILDREN = new Object[0];
  
  
  



More information about the jboss-cvs-commits mailing list