click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From take...@apache.org
Subject svn commit: r795887 - in /incubator/click/trunk/tools/eclipse/org.apache.click.eclipse: .settings/ src/org/apache/click/eclipse/ src/org/apache/click/eclipse/core/facet/ src/org/apache/click/eclipse/ui/wizard/
Date Mon, 20 Jul 2009 16:02:53 GMT
Author: takezoe
Date: Mon Jul 20 16:02:52 2009
New Revision: 795887

URL: http://svn.apache.org/viewvc?rev=795887&view=rev
Log: (empty)

Modified:
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/.settings/org.eclipse.jdt.core.prefs
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.properties
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin_ja.properties
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDataModelProvider.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDelegate.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/ClickFacetWizardPage.java

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/.settings/org.eclipse.jdt.core.prefs?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/.settings/org.eclipse.jdt.core.prefs
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/.settings/org.eclipse.jdt.core.prefs
Mon Jul 20 16:02:52 2009
@@ -1,21 +1,21 @@
-#Sat Jul 08 10:17:24 JST 2006
+#Tue Jul 21 00:11:51 JST 2009
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -54,4 +54,4 @@
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.properties
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.properties?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.properties
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.properties
Mon Jul 20 16:02:52 2009
@@ -96,6 +96,7 @@
 wizard.facet.useSpring=Use Spring Framework
 wizard.facet.useCayenne=Use Apache Cayenne
 wizard.facet.usePerformanceFilter=Use PerformanceFilter
+wizard.facet.rootPackage=Root Package\uff1a
 
 # for preference pages
 preferences.template=Wizard Template

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin_ja.properties
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin_ja.properties?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin_ja.properties
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin_ja.properties
Mon Jul 20 16:02:52 2009
@@ -96,6 +96,7 @@
 wizard.facet.useSpring=Spring Framework\u3092\u4f7f\u7528\u3059\u308b
 wizard.facet.useCayenne=Apache Cayenne\u3092\u4f7f\u7528\u3059\u308b
 wizard.facet.usePerformanceFilter=PerformanceFilter\u3092\u4f7f\u7528\u3059\u308b
+wizard.facet.rootPackage=\u30eb\u30fc\u30c8\u30d1\u30c3\u30b1\u30fc\u30b8\uff1a
 
 # for preference pages
 preferences.template=\u30a6\u30a3\u30b6\u30fc\u30c9\u30fb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDataModelProvider.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDataModelProvider.java?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDataModelProvider.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDataModelProvider.java
Mon Jul 20 16:02:52 2009
@@ -28,6 +28,7 @@
  */
 public class ClickFacetInstallDataModelProvider extends FacetInstallDataModelProvider {
 	
+	public static final String ROOT_PACKAGE = "rootPackage";
 	public static final String USE_SPRING = "useSpring";
 	public static final String USE_CAYENNE = "useCayenne";
 	public static final String USE_PERFORMANCE_FILTER = "usePerformanceFilter";
@@ -38,6 +39,7 @@
 		names.add(USE_SPRING);
 		names.add(USE_CAYENNE);
 		names.add(USE_PERFORMANCE_FILTER);
+		names.add(ROOT_PACKAGE);
 		return names;
 	}
 
@@ -50,6 +52,8 @@
 			return new Boolean(false);
 		} else if(propertyName.equals(USE_PERFORMANCE_FILTER)){
 			return new Boolean(false);
+		} else if(propertyName.equals(ROOT_PACKAGE)){
+			return "";
 		}
 		return super.getDefaultProperty(propertyName);
 	}

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDelegate.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDelegate.java?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDelegate.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/facet/ClickFacetInstallDelegate.java
Mon Jul 20 16:02:52 2009
@@ -24,7 +24,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-
 import org.apache.click.eclipse.ClickPlugin;
 import org.apache.click.eclipse.ClickUtils;
 import org.apache.click.eclipse.core.builder.ClickProjectNature;
@@ -42,6 +41,7 @@
 import org.eclipse.jst.j2ee.common.ParamValue;
 import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
 import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
+import org.eclipse.jst.j2ee.webapplication.ContextParam;
 import org.eclipse.jst.j2ee.webapplication.Filter;
 import org.eclipse.jst.j2ee.webapplication.FilterMapping;
 import org.eclipse.jst.j2ee.webapplication.InitParam;
@@ -177,20 +177,16 @@
 			}
 		}
 
-		IJavaProject javaProject = JavaCore.create(project);
-		IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
-		for(int i=0;i<roots.length;i++){
-			if(roots[i].getResource() instanceof IFolder){
-				IFile file = ((IFolder) roots[i].getResource()).getFile("applicationContext.xml");
-				try {
-					file.create(ClickPlugin.getDefault().getBundle().getEntry(
-							ClickFacetUtil.SPRING_DIR + "/applicationContext.xml").openStream(),
-							true, monitor);
-				} catch(Exception ex){
-					ClickPlugin.log(ex);
-				}
-				break;
+		File file = new File(webInf, "spring-beans.xml");
+		try {
+			if(!file.exists()){
+				file.createNewFile();
 			}
+			ClickUtils.copyStream(ClickPlugin.getDefault().getBundle().getEntry(
+					ClickFacetUtil.SPRING_DIR + "/spring-beans.xml").openStream(),
+					new FileOutputStream(file));
+		} catch(Exception ex){
+			ClickPlugin.log(ex);
 		}
 	}
 
@@ -292,6 +288,13 @@
 
 			servlet = ClickUtils.createOrUpdateServletRef(webApp, config, servlet, useSpring);
 			
+			if(useSpring){
+				ContextParam contextParam = WebapplicationFactory.eINSTANCE.createContextParam();
+				contextParam.setParamName("contextConfigLocation");
+				contextParam.setParamValue("WEB-INF/spring-beans.xml");
+				webApp.getContextParams().add(contextParam);
+			}
+			
 			// Add PerformanceFilter
 			if(usePerformanceFilter){
 				Filter filter = WebapplicationFactory.eINSTANCE.createFilter();

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/ClickFacetWizardPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/ClickFacetWizardPage.java?rev=795887&r1=795886&r2=795887&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/ClickFacetWizardPage.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/ClickFacetWizardPage.java
Mon Jul 20 16:02:52 2009
@@ -19,11 +19,14 @@
 package org.apache.click.eclipse.ui.wizard;
 
 import org.apache.click.eclipse.ClickPlugin;
+import org.apache.click.eclipse.ClickUtils;
 import org.apache.click.eclipse.core.facet.ClickFacetInstallDataModelProvider;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
 
@@ -35,6 +38,7 @@
 public class ClickFacetWizardPage extends AbstractFacetWizardPage {
 	
 	private IDataModel model;
+	private Text rootPackage;
 	private Button useSpring;
 	private Button useCayenne;
 	private Button usePerformanceFilter;
@@ -51,16 +55,23 @@
 
 	public void createControl(Composite parent) {
 		Composite composite = new Composite(parent, SWT.NULL);
-		composite.setLayout(new GridLayout());
+		composite.setLayout(new GridLayout(2, false));
+		
+		ClickUtils.createLabel(composite, ClickPlugin.getString("wizard.facet.rootPackage"));
+		rootPackage = new Text(composite, SWT.BORDER);
+		rootPackage.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		
 		usePerformanceFilter = new Button(composite, SWT.CHECK);
 		usePerformanceFilter.setText(ClickPlugin.getString("wizard.facet.usePerformanceFilter"));
+		usePerformanceFilter.setLayoutData(ClickUtils.createGridData(2, GridData.FILL_HORIZONTAL));
 		
 		useSpring = new Button(composite, SWT.CHECK);
 		useSpring.setText(ClickPlugin.getString("wizard.facet.useSpring"));
+		useSpring.setLayoutData(ClickUtils.createGridData(2, GridData.FILL_HORIZONTAL));
 		
 		useCayenne = new Button(composite, SWT.CHECK);
 		useCayenne.setText(ClickPlugin.getString("wizard.facet.useCayenne"));
+		useCayenne.setLayoutData(ClickUtils.createGridData(2, GridData.FILL_HORIZONTAL));
 		
 		setControl(composite);
 	}
@@ -72,5 +83,7 @@
 				useSpring.getSelection());
 		model.setBooleanProperty(ClickFacetInstallDataModelProvider.USE_CAYENNE, 
 				useCayenne.getSelection());
+		model.setStringProperty(ClickFacetInstallDataModelProvider.ROOT_PACKAGE, 
+				rootPackage.getText());
 	}
 }



Mime
View raw message