Author: dgolovin
Date: 2007-07-03 12:34:03 -0400 (Tue, 03 Jul 2007)
New Revision: 2260
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetUninstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java
Log:
http://jira.jboss.org/jira/browse/EXIN-221
remove System.out and main from code
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/AntCopyUtils.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -7,8 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
+ ******************************************************************************/
package org.jboss.tools.seam.core.internal.project.facet;
import java.io.File;
import java.io.IOException;
@@ -31,16 +30,6 @@
*/
public class AntCopyUtils {
- public static void main(String[] args) {
- Project prj = new Project();
- prj.setBaseDir(new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view"));
- Resource folder = new FileResource(new
File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view\\action.xhtml"));
- Resource dest = new FileResource();
- FilterSet set = new FilterSet();
- set.addFilter("methodName", "testValue");
- copyFilesAndFolders(new
File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view"), new
File("C:\\temp\\WebContent"), new FilterSetCollection(set),true);
- }
-
public static void copyFilesAndFolders(File sourceFolder, File destinationFolder,
FilterSetCollection set, boolean override) {
copyFilesAndFolders(sourceFolder, destinationFolder, null, set, override);
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/ISeamFacetDataModelProperties.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -16,6 +16,11 @@
import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+/**
+ * Seam facet properties
+ * @author eskimo
+ *
+ */
public interface ISeamFacetDataModelProperties extends IActionConfigFactory {
public static final String PREFIX = "ISeamFacetDataModelProperties.";
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDataModelProvider.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -18,6 +18,7 @@
import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
/**
+ * Data model provider for Seam facet wizard page
* @author eskimo
*
*/
@@ -28,10 +29,11 @@
static {
SEAM_LIBRARIES.put("1.2",new String[] {
-
});
}
-
+ /**
+ * Returns set of facet properties for facet wizard page
+ */
@Override
public Set getPropertyNames() {
Set<String> names = super.getPropertyNames();
@@ -67,6 +69,9 @@
return names;
}
+ /**
+ * Returns default value for a given property
+ */
public Object getDefaultProperty(String propertyName) {
if(JBOSS_AS_HOME.equals(propertyName)) {
return "Jboss_AS_HOME";
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetInstallDelegete.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -269,37 +269,7 @@
return set.isIncluded(pathname.getAbsolutePath());
}
}
-
-
- public static void main(String[] args) {
- System.out.println(Pattern.matches(".[^\\\\]*\\.jar",
"tt\\test.jar"));
-// Properties props = new Properties();
-// props.put("hibernate.connection.username", "rooy");
-// FilterSet jdbcFs = FilterSetFactory.createJdbcFilterSet(props);
-// System.out.println(jdbcFs);
- FileSet include = VIEW_FILESET;
-// .dir("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view")
-// .include("home\\.xhtml")
-// .include("error\\.xhtml")
-// .include("login\\.xhtml")
-// .include("login\\.page.xml")
-// .include("index\\.html")
-// .include("layout\\.*")
-// .include("stylesheet\\.*")
-// .include("img\\.*")
-// .exclude(".*\\\\.*\\.ftl");
-//
- File file1 = new File("C:\\java\\jboss-seam-1.2.1.GA\\seam-gen\\view");
- FileSetFileFilter fileSetFilter = new FileSetFileFilter(include.dir(file1));
-// File[] copy = file1.listFiles(fileSetFilter);
-// for (File file : copy) {
-// System.out.println(file.getAbsolutePath());
-// }
-// copyFiles(file1,new File("c:\\temp\\4"),fileSetFilter);
- AntCopyUtils.copyFilesAndFolders(file1, new
File("c:\\temp\\15"),fileSetFilter, new FilterSetCollection(), true);
- }
-
public static class FilterSetFactory {
public static FilterSet JDBC_TEMPLATE;
@@ -359,7 +329,6 @@
private static FilterSet aplayProperties(FilterSet template,IDataModel values) {
FilterSet result = new FilterSet();
for (Object filter : template.getFilterHash().keySet()) {
- System.out.println(filter + "=" +template.getFilterHash().get(filter));
String value = template.getFilterHash().get(filter).toString();
for (Object property : values.getAllProperties()) {
if(value.contains("${"+property.toString()+"}")) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetUninstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetUninstallDelegate.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/internal/project/facet/SeamFacetUninstallDelegate.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -17,11 +17,17 @@
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+/**
+ * This delegate uninstalls facet from project
+ * @author eskimo
+ */
public class SeamFacetUninstallDelegate extends Object implements IDelegate {
+ /**
+ * @see IDelegate.execute(IProject,IProjectFacetVersion,Object,IProgressMonitor)
+ */
public void execute(IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
-
}
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java 2007-07-03
16:32:34 UTC (rev 2259)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java 2007-07-03
16:34:03 UTC (rev 2260)
@@ -50,29 +50,5 @@
* @see
org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
- // TODO Auto-generated method stub
-
}
-
- public static void main(String[] args) {
- Display d = new Display();
- Shell shell = new Shell(d);
- shell.setText("test");
- shell.open();
- GridLayout gl = new GridLayout(3,false);
- shell.setLayout(gl);
- IFieldEditor editor =
IFieldEditorFactory.INSTANCE.createBrowseFolderEditor("test", "test1",
"test2");
- editor.doFillIntoGrid(shell);
- editor = IFieldEditorFactory.INSTANCE.createTextEditor("test",
"test1", "test2");
- editor.doFillIntoGrid(shell);
- editor = IFieldEditorFactory.INSTANCE.createComboEditor("test",
"test1", Arrays.asList(new
String[]{"war","ear"}),"test2");
- editor.doFillIntoGrid(shell);
- shell.update();
-
- while(!shell.isDisposed()) {
- if(!d.readAndDispatch()) d.sleep();
- }
-
- d.dispose();
- }
}