forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r106715 - /forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java /forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java
Date Sat, 27 Nov 2004 14:39:13 GMT
Author: rgardler
Date: Sat Nov 27 06:39:12 2004
New Revision: 106715

URL: http://svn.apache.org/viewcvs?view=rev&rev=106715
Log:
Move some values into variables so they may be overridden in subclasses
Modified:
   forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java
   forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java?view=diff&rev=106715&p1=forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java&r1=106714&p2=forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java&r2=106715
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java	(original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXDoc.java	Sat Nov
27 06:39:12 2004
@@ -53,8 +53,8 @@
  */
 
 public class NewXDoc extends Wizard implements INewWizard {
-	private NewXdocPage page;
-	private ISelection selection;
+	protected NewXdocPage page;
+	protected ISelection selection;
 	protected String resourceAntScript = "/src/org/apache/forrest/template/template_build.xml";
 
 	/**
@@ -68,7 +68,6 @@
 	/**
 	 * Adding the page to the wizard.
 	 */
-
 	public void addPages() {
 		page = new NewXdocPage(selection);
 		addPage(page);

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java?view=diff&rev=106715&p1=forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java&r1=106714&p2=forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java&r2=106715
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java	(original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java	Sat
Nov 27 06:39:12 2004
@@ -35,10 +35,11 @@
 public class NewXdocPage extends WizardPage {
     // FIXME: get these config settings from forrest.properties
 	public String projectXDocsDir = "/src/documentation/content/xdocs";
-	
+	public String default_filename = "new_file.xml"; 
+	public String required_file_extension = "xml"; 
 	private Text containerText;
 	private Text fileText;
-	private ISelection selection;
+	protected ISelection selection;
 
 	/**
 	 * Create the new page.
@@ -115,7 +116,7 @@
 				containerText.setText(container.getFullPath().toString());
 			}
 		}
-		fileText.setText("new_file.xml");
+		fileText.setText(default_filename);
 	}
 	
 	/**
@@ -157,8 +158,8 @@
 		int dotLoc = fileName.lastIndexOf('.');
 		if (dotLoc != -1) {
 			String ext = fileName.substring(dotLoc + 1);
-			if (ext.equalsIgnoreCase("xml") == false) {
-				updateStatus("File extension must be \"xml\"");
+			if (ext.equalsIgnoreCase(required_file_extension) == false) {
+				updateStatus("File extension must be \"" + required_file_extension + "\"");
 				return;
 			}
 		}

Mime
View raw message