woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards WOApplicationWizard.java,1.3,1.4 WOComponentCreator.java,1.6,1.7 WOSubprojectCreationWizard.java,1.4,1.5 EOModelCreator.java,1.4,1.5 WOSubprojectCreator.java,1.4,1.5 WizardsPlugin.java,1.2,1.3 SelectTemplatePage.java,1.2,1.3 JarProjectWizard.java,1.2,1.3 Messages.java,1.2,1.3 WOFrameworkWizard.java,1.4,1.5 D2WApplicationWizard.java,1.3,1.4
[email protected] Sat, 11 Feb 2006 05:10:04 -0800 (PST)
| Newsgroups | gmane.comp.web.webobjects.woproject.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20603/java/org/objectstyle/wolips/wizards
Modified Files:
WOApplicationWizard.java WOComponentCreator.java
WOSubprojectCreationWizard.java EOModelCreator.java
WOSubprojectCreator.java WizardsPlugin.java
SelectTemplatePage.java JarProjectWizard.java Messages.java
WOFrameworkWizard.java D2WApplicationWizard.java
Log Message:
Make it compatible with 3.2M5 tested with M4 and M5.
Index: WOApplicationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WOApplicationWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- WOApplicationWizard.java 18 Sep 2005 17:26:59 -0000 1.3
+++ WOApplicationWizard.java 11 Feb 2006 13:09:07 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -67,13 +68,13 @@
import org.objectstyle.wolips.templateengine.TemplateDefinition;
import org.objectstyle.wolips.templateengine.TemplateEngine;
import org.objectstyle.wolips.templateengine.TemplateEnginePlugin;
+
/**
* @author mnolte
- * @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type
- * comments go to Window>Preferences>Java>Code Generation.
+ * @author uli To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public class WOApplicationWizard extends AbstractProjectWizard {
/**
@@ -82,6 +83,7 @@
public WOApplicationWizard() {
super(TemplateEnginePlugin.WOApplicationProject);
}
+
/*
* (non-Javadoc)
*
@@ -93,6 +95,7 @@
private class Operation extends WorkspaceModifyOperation {
IProject project = null;
+
/**
* @param project
*/
@@ -100,6 +103,7 @@
super();
this.project = project;
}
+
protected void execute(IProgressMonitor monitor) throws CoreException,
InvocationTargetException, InterruptedException {
String projectName = this.project.getName();
@@ -112,24 +116,26 @@
src.mkdirs();
File bin = new File(path + File.separator + "bin");
bin.mkdirs();
-// File xcode = new File(path + File.separator + projectName
-// + ".xcode");
-// xcode.mkdirs();
-// File xcodeproj = new File(path + File.separator + projectName
-// + ".xcodeproj");
-// xcodeproj.mkdirs();
- File ant = new File(path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME);
+ // File xcode = new File(path + File.separator + projectName
+ // + ".xcode");
+ // xcode.mkdirs();
+ // File xcodeproj = new File(path + File.separator + projectName
+ // + ".xcodeproj");
+ // xcodeproj.mkdirs();
+ File ant = new File(path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME);
ant.mkdirs();
- //project.close(nullProgressMonitor);
+ // project.close(nullProgressMonitor);
TemplateEngine templateEngine = new TemplateEngine();
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(projectName);
- templateEngine.getWolipsContext().setAntFolderName(ProjectPatternsets.ANT_FOLDER_NAME);
+ templateEngine.getWolipsContext().setAntFolderName(
+ ProjectPatternsets.ANT_FOLDER_NAME);
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/Main.html.vm", path + File.separator
+ "Main.wo", "Main.html", "Main.html"));
@@ -162,33 +168,39 @@
templateEngine
.addTemplate(new TemplateDefinition(
"woapplication/ant.classpaths.user.home.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.user.home",
"ant.classpaths.user.home"));
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/ant.classpaths.wo.wolocalroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.wo.wolocalroot",
"ant.classpaths.wo.wolocalroot"));
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/ant.classpaths.wo.wosystemroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.wo.wosystemroot",
"ant.classpaths.wo.wosystemroot"));
templateEngine
.addTemplate(new TemplateDefinition(
"woapplication/ant.frameworks.user.home.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.user.home",
"ant.frameworks.user.home"));
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/ant.frameworks.wo.wolocalroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.wo.wolocalroot",
"ant.frameworks.wo.wolocalroot"));
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/ant.frameworks.wo.wosystemroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.wo.wosystemroot",
"ant.frameworks.wo.wosystemroot"));
templateEngine.addTemplate(new TemplateDefinition(
@@ -218,15 +230,15 @@
templateEngine.addTemplate(new TemplateDefinition(
"woapplication/Properties.vm", path, "Properties",
"Properties"));
-// templateEngine.addTemplate(new TemplateDefinition(
-// "woapplication/project.pbxproj.vm", path
-// + File.separator + projectName + ".xcode",
-// "project.pbxproj", "project.pbxproj"));
+ // templateEngine.addTemplate(new TemplateDefinition(
+ // "woapplication/project.pbxproj.vm", path
+ // + File.separator + projectName + ".xcode",
+ // "project.pbxproj", "project.pbxproj"));
templateEngine.run(nullProgressMonitor);
- //project.open(nullProgressMonitor);
- //RunAnt runAnt = new RunAnt();
- //runAnt.asAnt(path + File.separator
- // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
+ // project.open(nullProgressMonitor);
+ // RunAnt runAnt = new RunAnt();
+ // runAnt.asAnt(path + File.separator
+ // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
this.project.refreshLocal(IResource.DEPTH_INFINITE,
nullProgressMonitor);
} catch (Exception e) {
@@ -234,6 +246,7 @@
}
}
}
+
/**
* (non-Javadoc) Method declared on IWizard
*
@@ -247,10 +260,10 @@
try {
operation.run(new NullProgressMonitor());
} catch (InvocationTargetException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
} catch (InterruptedException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
}
}
Index: WOComponentCreator.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WOComponentCreator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- WOComponentCreator.java 3 Jul 2005 16:26:31 -0000 1.6
+++ WOComponentCreator.java 11 Feb 2006 13:09:07 -0000 1.7
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002, 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IFolder;
@@ -71,38 +72,48 @@
import org.objectstyle.wolips.datasets.adaptable.Project;
import org.objectstyle.wolips.datasets.resources.IWOLipsModel;
import org.objectstyle.wolips.templateengine.ComponentEngine;
+
/**
* @author mnolte
* @author uli
*/
public class WOComponentCreator implements IRunnableWithProgress {
private String componentName;
- private String packageName;
+
+ private String packageName;
+
private boolean createBodyTag;
+
private boolean createApiFile;
+
private boolean createWooFile;
+
private IResource parentResource;
+
private WOComponentCreationPage page;
+
/**
* Constructor for WOComponentCreator.
*
* @param parentResource
* @param componentName
- * @param packageName
+ * @param packageName
* @param createBodyTag
* @param createApiFile
* @param createWooFile
*/
- public WOComponentCreator(IResource parentResource, String componentName, String packageName,
- boolean createBodyTag, boolean createApiFile, boolean createWooFile, WOComponentCreationPage page) {
+ public WOComponentCreator(IResource parentResource, String componentName,
+ String packageName, boolean createBodyTag, boolean createApiFile,
+ boolean createWooFile, WOComponentCreationPage page) {
this.parentResource = parentResource;
this.componentName = componentName;
- this.packageName = packageName;
+ this.packageName = packageName;
this.createBodyTag = createBodyTag;
this.createApiFile = createApiFile;
this.createWooFile = createWooFile;
this.page = page;
}
+
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
createWOComponent(monitor);
@@ -110,6 +121,7 @@
throw new InvocationTargetException(e);
}
}
+
/**
* Method createWOComponent.
*
@@ -123,60 +135,65 @@
IPath componentJavaPath = null;
IPath apiPath = null;
IFolder componentFolderToReveal = null;
- IJavaProject iJavaProject = JavaCore.create(
- this.parentResource.getProject());
- JavaProject javaProject = (JavaProject) iJavaProject.getAdapter(JavaProject.class);
- Project project = (Project)this.parentResource.getProject().getAdapter(Project.class);
+ IJavaProject iJavaProject = JavaCore.create(this.parentResource
+ .getProject());
+ JavaProject javaProject = (JavaProject) iJavaProject
+ .getAdapter(JavaProject.class);
+ Project project = (Project) this.parentResource.getProject()
+ .getAdapter(Project.class);
switch (this.parentResource.getType()) {
- case IResource.PROJECT :
- componentFolder = ((IProject) this.parentResource)
- .getFolder(this.componentName + "."
- + IWOLipsModel.EXT_COMPONENT);
- componentFolderToReveal = (IFolder)javaProject.getProjectSourceFolder();
- componentJavaPath =
- componentFolderToReveal.getLocation();
- apiPath = this.parentResource.getProject().getLocation();
- break;
- case IResource.FOLDER :
- componentFolder = ((IFolder) this.parentResource)
- .getFolder(this.componentName + "."
- + IWOLipsModel.EXT_COMPONENT);
+ case IResource.PROJECT:
+ componentFolder = ((IProject) this.parentResource)
+ .getFolder(this.componentName + "."
+ + IWOLipsModel.EXT_COMPONENT);
+ componentFolderToReveal = (IFolder) javaProject
+ .getProjectSourceFolder();
+ componentJavaPath = componentFolderToReveal.getLocation();
+ apiPath = this.parentResource.getProject().getLocation();
+ break;
+ case IResource.FOLDER:
+ componentFolder = ((IFolder) this.parentResource)
+ .getFolder(this.componentName + "."
+ + IWOLipsModel.EXT_COMPONENT);
componentFolderToReveal = javaProject.getSubprojectSourceFolder(
- (IFolder) this.parentResource, true);
- componentJavaPath = componentFolderToReveal.getLocation();
- apiPath = componentFolder.getParent().getLocation();
- IFolder pbFolder = project.getParentFolderWithPBProject((IFolder)this.parentResource);
- if(pbFolder != null) {
- apiPath = pbFolder.getLocation();
- }
- break;
- default :
- throw new InvocationTargetException(new Exception(
- "Wrong parent resource - check validation"));
+ (IFolder) this.parentResource, true);
+ componentJavaPath = componentFolderToReveal.getLocation();
+ apiPath = componentFolder.getParent().getLocation();
+ IFolder pbFolder = project
+ .getParentFolderWithPBProject((IFolder) this.parentResource);
+ if (pbFolder != null) {
+ apiPath = pbFolder.getLocation();
+ }
+ break;
+ default:
+ throw new InvocationTargetException(new Exception(
+ "Wrong parent resource - check validation"));
}
- if (packageName != null && packageName.length() > 0) {
- componentJavaPath = componentJavaPath.append(new Path(packageName.replace('.', '/')));
- }
- //IFolder componentJavaFolder = ((IProject) this.parentResource).getFolder(componentJavaPath);
- //System.out.println("WOComponentCreator.createWOComponent: " + componentJavaFolder);
- //componentJavaFolder.create(false, true, monitor);
+ if (packageName != null && packageName.length() > 0) {
+ componentJavaPath = componentJavaPath.append(new Path(packageName
+ .replace('.', '/')));
+ }
+ // IFolder componentJavaFolder = ((IProject)
+ // this.parentResource).getFolder(componentJavaPath);
+ // System.out.println("WOComponentCreator.createWOComponent: " +
+ // componentJavaFolder);
+ // componentJavaFolder.create(false, true, monitor);
componentFolder.create(false, true, monitor);
String projectName = this.parentResource.getProject().getName();
IPath path = componentFolder.getLocation();
- IPath projectPath = this.parentResource.getProject().getLocation();
ComponentEngine componentEngine = new ComponentEngine();
try {
componentEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
- //TODO: select template in the user interface
+ // TODO: select template in the user interface
componentEngine.setSelectedTemplateName(componentEngine.names()[0]);
componentEngine.setProjectName(projectName);
componentEngine.setCreateBodyTag(this.createBodyTag);
componentEngine.setComponentName(this.componentName);
- componentEngine.setPackageName(this.packageName);
+ componentEngine.setPackageName(this.packageName);
componentEngine.setComponentPath(path);
componentEngine.setApiPath(apiPath);
componentEngine.setJavaPath(componentJavaPath);
@@ -186,11 +203,13 @@
componentEngine.run(new NullProgressMonitor());
this.parentResource.getProject().refreshLocal(
IResource.DEPTH_INFINITE, monitor);
- page.setResourceToReveal(componentFolderToReveal.findMember(this.componentName + "." + IWOLipsModel.EXT_JAVA));
+ page.setResourceToReveal(componentFolderToReveal
+ .findMember(this.componentName + "."
+ + IWOLipsModel.EXT_JAVA));
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
}
-
+
}
\ No newline at end of file
Index: WOSubprojectCreationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WOSubprojectCreationWizard.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- WOSubprojectCreationWizard.java 15 Sep 2005 15:47:47 -0000 1.4
+++ WOSubprojectCreationWizard.java 11 Feb 2006 13:09:07 -0000 1.5
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,17 +63,13 @@
/**
* @author mnolte
* @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
*/
public class WOSubprojectCreationWizard extends BasicNewFolderResourceWizard {
private IStructuredSelection selection;
- private IWorkbench workbench;
+
private WOSubprojectCreationPage mainPage;
+
/**
* Constructor for WOSubprojectCreationWizard.
*/
@@ -81,28 +77,26 @@
super();
}
- /** (non-Javadoc)
- * Method declared on INewWizard
+ /**
+ * (non-Javadoc) Method declared on INewWizard
*/
public void init(IWorkbench _workbench, IStructuredSelection _selection) {
- this.workbench = _workbench;
this.selection = _selection;
setWindowTitle(Messages.getString("WOSubprojectCreationWizard.title"));
- setDefaultPageImageDescriptor(WizardsPlugin
- .WOCOMPONENT_WIZARD_BANNER());
+ setDefaultPageImageDescriptor(WizardsPlugin.WOCOMPONENT_WIZARD_BANNER());
}
- /** (non-Javadoc)
- * Method declared on Wizard.
+ /**
+ * (non-Javadoc) Method declared on Wizard.
*/
public void addPages() {
mainPage = new WOSubprojectCreationPage(selection);
addPage(mainPage);
}
- /** (non-Javadoc)
- * Method declared on IWizard
- */
+ /**
+ * (non-Javadoc) Method declared on IWizard
+ */
public boolean performFinish() {
return mainPage.createSubproject();
}
Index: EOModelCreator.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/EOModelCreator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- EOModelCreator.java 11 Dec 2004 10:25:23 -0000 1.4
+++ EOModelCreator.java 11 Feb 2006 13:09:07 -0000 1.5
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002, 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.lang.reflect.InvocationTargetException;
import java.util.Vector;
@@ -72,6 +73,7 @@
import org.objectstyle.wolips.datasets.resources.IWOLipsModel;
import org.objectstyle.wolips.templateengine.TemplateDefinition;
import org.objectstyle.wolips.templateengine.TemplateEngine;
+
/**
* @author mnolte
* @author uli Creates new eo model file resources from values gathered by
@@ -79,11 +81,16 @@
*/
public class EOModelCreator implements IRunnableWithProgress {
private String modelName;
+
private String adaptorName;
+
private IResource parentResource;
+
private EOModelCreationPage page;
+
/**
* Constructor for EOModelCreator.
+ *
* @param parentResource
* @param modelName
* @param adaptorName
@@ -95,7 +102,7 @@
this.adaptorName = adaptorName;
this.page = page;
}
-
+
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
createEOModel(monitor);
@@ -103,13 +110,15 @@
throw new InvocationTargetException(e);
}
}
+
/**
* Method createEOModelNamed. Creates eo model file resources. All file
* resource changes are registered in ResourceChangeListener where the
- * project file is updated. <br>All folder resource changes are registered
- * in @link WOProjectResourceCreator#createResourceFolderInProject(IFolder,
- * IProgressMonitor). <br>
+ * project file is updated. <br>
+ * All folder resource changes are registered in
*
+ * @link WOProjectResourceCreator#createResourceFolderInProject(IFolder,
+ * IProgressMonitor). <br>
* @param monitor
* @throws CoreException
* @throws InvocationTargetException
@@ -118,17 +127,17 @@
InvocationTargetException {
IFolder modelFolder = null;
switch (this.parentResource.getType()) {
- case IResource.PROJECT :
- modelFolder = ((IProject) this.parentResource).getFolder(this.modelName
- + "." + IWOLipsModel.EXT_EOMODEL);
- break;
- case IResource.FOLDER :
- modelFolder = ((IFolder) this.parentResource).getFolder(this.modelName
- + "." + IWOLipsModel.EXT_EOMODEL);
- break;
- default :
- throw new InvocationTargetException(new Exception(
- "Wrong parent resource - check validation"));
+ case IResource.PROJECT:
+ modelFolder = ((IProject) this.parentResource)
+ .getFolder(this.modelName + "." + IWOLipsModel.EXT_EOMODEL);
+ break;
+ case IResource.FOLDER:
+ modelFolder = ((IFolder) this.parentResource)
+ .getFolder(this.modelName + "." + IWOLipsModel.EXT_EOMODEL);
+ break;
+ default:
+ throw new InvocationTargetException(new Exception(
+ "Wrong parent resource - check validation"));
}
modelFolder.create(false, true, monitor);
String projectName = this.parentResource.getProject().getName();
@@ -137,19 +146,21 @@
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(projectName);
templateEngine.getWolipsContext().setAdaptorName(this.adaptorName);
templateEngine.addTemplate(new TemplateDefinition(
- "eomodel/index.eomodeld.vm", path, "index.eomodeld", "index.eomodeld"));
+ "eomodel/index.eomodeld.vm", path, "index.eomodeld",
+ "index.eomodeld"));
templateEngine.addTemplate(new TemplateDefinition(
- "eomodel/DiagramLayout.vm", path, "DiagramLayout", "DiagramLayout"));
+ "eomodel/DiagramLayout.vm", path, "DiagramLayout",
+ "DiagramLayout"));
try {
templateEngine.run(new NullProgressMonitor());
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
modelFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
@@ -161,9 +172,10 @@
Vector newAdaptorFrameworkList = new Vector();
newAdaptorFrameworkList.add("Java" + this.adaptorName + "Adaptor."
+ IWOLipsModel.EXT_FRAMEWORK);
- JavaProject javaProject = (JavaProject)projectToUpdate.getAdapter(JavaProject.class);
- IClasspathEntry[] newClasspathEntries = javaProject.addFrameworkListToClasspathEntries(
- newAdaptorFrameworkList);
+ JavaProject javaProject = (JavaProject) projectToUpdate
+ .getAdapter(JavaProject.class);
+ IClasspathEntry[] newClasspathEntries = javaProject
+ .addFrameworkListToClasspathEntries(newAdaptorFrameworkList);
try {
projectToUpdate.setRawClasspath(newClasspathEntries, null);
} catch (JavaModelException e) {
Index: WOSubprojectCreator.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WOSubprojectCreator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- WOSubprojectCreator.java 15 Sep 2005 15:47:47 -0000 1.4
+++ WOSubprojectCreator.java 11 Feb 2006 13:09:07 -0000 1.5
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -74,11 +74,10 @@
/**
* @author mnolte
- * @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type
- * comments go to Window>Preferences>Java>Code Generation.
+ * @author uli To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public class WOSubprojectCreator implements IRunnableWithProgress {
@@ -116,8 +115,7 @@
* @throws InterruptedException
*/
public void createSubproject(IProgressMonitor monitor)
- throws CoreException, InvocationTargetException
- {
+ throws CoreException, InvocationTargetException {
IFolder subprojectFolder = null;
switch (parentResource.getType()) {
case IResource.PROJECT:
@@ -140,7 +138,7 @@
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(subprojectName);
@@ -149,12 +147,12 @@
try {
templateEngine.run(new NullProgressMonitor());
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
-
+
subprojectFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
-
+
IFolder sourceFolder;
sourceFolder = subprojectFolder.getFolder(IWOLipsModel.EXT_SRC);
if (!sourceFolder.exists()) {
@@ -166,10 +164,12 @@
}
}
IJavaProject javaProject = JavaCore.create(parentResource.getProject());
- IClasspathEntry classpathEntry = JavaCore.newSourceEntry(sourceFolder.getFullPath());
+ IClasspathEntry classpathEntry = JavaCore.newSourceEntry(sourceFolder
+ .getFullPath());
IClasspathEntry[] classpathEntries = javaProject.getRawClasspath();
IClasspathEntry[] newClasspathEntries = new IClasspathEntry[classpathEntries.length + 1];
- System.arraycopy(classpathEntries, 0, newClasspathEntries, 0, classpathEntries.length);
+ System.arraycopy(classpathEntries, 0, newClasspathEntries, 0,
+ classpathEntries.length);
newClasspathEntries[classpathEntries.length] = classpathEntry;
javaProject.setRawClasspath(newClasspathEntries, monitor);
}
Index: WizardsPlugin.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WizardsPlugin.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- WizardsPlugin.java 11 Dec 2004 10:25:24 -0000 1.2
+++ WizardsPlugin.java 11 Feb 2006 13:09:07 -0000 1.3
@@ -56,125 +56,78 @@
package org.objectstyle.wolips.wizards;
-import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.objectstyle.wolips.commons.logging.PluginLogger;
+import org.objectstyle.wolips.ui.plugins.AbstractWOLipsUIPlugin;
+import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
*/
-public class WizardsPlugin extends AbstractUIPlugin {
- //The shared instance.
+public class WizardsPlugin extends AbstractWOLipsUIPlugin {
+ // The shared instance.
private static WizardsPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
+
private static ImageDescriptor WOCOMPONENT_WIZARD_BANNER;
+
private static ImageDescriptor WOPROJECT_WIZARD_BANNER;
- private static String pluginID ="org.objectstyle.wolips.wizards";
-
- private PluginLogger pluginLogger = new PluginLogger(pluginID, false);
+
/**
* The constructor.
*/
public WizardsPlugin() {
super();
plugin = this;
- try {
- resourceBundle= ResourceBundle.getBundle("org.objectstyle.wolips.wizards.WizardsPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * Returns the shared instance.
- * @return
- */
- public static WizardsPlugin getDefault() {
- return plugin;
}
- /**
- * Returns the workspace instance.
- * @return
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
}
/**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- * @param key
- * @return
+ * This method is called when the plug-in is stopped
*/
- public static String getResourceString(String key) {
- ResourceBundle bundle= WizardsPlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
}
/**
- * Returns the plugin's resource bundle,
- * @return
+ * Returns the shared instance.
*/
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
+ public static WizardsPlugin getDefault() {
+ return plugin;
}
/**
- * Method baseURL.
- * @return URL
- */
- public static URL baseURL() {
- return WizardsPlugin.getDefault().getDescriptor().getInstallURL();
- }
-
- /**
- * @return Returns the pluginLogger.
- */
- public PluginLogger getPluginLogger() {
- return pluginLogger;
- }
-
- /**
- * Utility method to create an <code>ImageDescriptor</code>
- * from a path to a file.
+ * Returns an image descriptor for the image file at the given plug-in
+ * relative path.
+ *
* @param path
- * @return
+ * the path
+ * @return the image descriptor
*/
- private static ImageDescriptor createImageDescriptor(String path) {
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginID, path);
- if(imageDescriptor != null)
- return imageDescriptor;
- return ImageDescriptor.getMissingImageDescriptor();
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(
+ "org.objectstyle.wolips.wizards", path);
}
/**
* @return Returns the image descriptor.
*/
public static ImageDescriptor WOCOMPONENT_WIZARD_BANNER() {
- if(WOCOMPONENT_WIZARD_BANNER == null)
- WOCOMPONENT_WIZARD_BANNER = createImageDescriptor("icons/wizban/webobjects_wiz.gif");
+ if (WOCOMPONENT_WIZARD_BANNER == null)
+ WOCOMPONENT_WIZARD_BANNER = getImageDescriptor("icons/wizban/webobjects_wiz.gif");
return WOCOMPONENT_WIZARD_BANNER;
}
-
+
/**
* @return Returns the image descriptor.
*/
public static final ImageDescriptor WOPROJECT_WIZARD_BANNER() {
- if(WOPROJECT_WIZARD_BANNER == null)
- WOPROJECT_WIZARD_BANNER = createImageDescriptor("icons/wizban/webobjects_wiz.gif");
+ if (WOPROJECT_WIZARD_BANNER == null)
+ WOPROJECT_WIZARD_BANNER = getImageDescriptor("icons/wizban/webobjects_wiz.gif");
return WOPROJECT_WIZARD_BANNER;
}
-
-
+
}
Index: SelectTemplatePage.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/SelectTemplatePage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SelectTemplatePage.java 11 Dec 2004 10:25:24 -0000 1.2
+++ SelectTemplatePage.java 11 Feb 2006 13:09:07 -0000 1.3
@@ -1,9 +1,59 @@
-/*
- * Created on 26.02.2004
+/* ====================================================================
+ *
+ * The ObjectStyle Group Software License, Version 1.0
+ *
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
+ * and individual authors of the software. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * ObjectStyle Group (http://objectstyle.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "ObjectStyle Group" and "Cayenne"
+ * must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact [email protected].
+ *
+ * 5. Products derived from this software may not be called "ObjectStyle"
+ * nor may "ObjectStyle" appear in their names without prior written
+ * permission of the ObjectStyle Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE OBJECTSTYLE GROUP OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the ObjectStyle Group. For more
+ * information on the ObjectStyle Group, please see
+ * <http://objectstyle.org/>.
*
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
*/
+
package org.objectstyle.wolips.wizards;
import org.eclipse.jface.wizard.WizardPage;
@@ -12,23 +62,23 @@
/**
* @author ulrich
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
*/
public class SelectTemplatePage extends WizardPage {
private TemplateFolder[] templateFolder;
+
protected SelectTemplatePage(TemplateFolder[] templateFolder) {
super("");
this.templateFolder = templateFolder;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
// TODO Auto-generated method stub
-
+
}
}
Index: JarProjectWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/JarProjectWizard.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- JarProjectWizard.java 11 Dec 2004 10:25:24 -0000 1.2
+++ JarProjectWizard.java 11 Feb 2006 13:09:07 -0000 1.3
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -66,13 +67,13 @@
import org.objectstyle.wolips.templateengine.TemplateDefinition;
import org.objectstyle.wolips.templateengine.TemplateEngine;
import org.objectstyle.wolips.templateengine.TemplateEnginePlugin;
+
/**
* @author mnolte
- * @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of
- * type comments go to Window>Preferences>Java>Code Generation.
+ * @author uli To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public class JarProjectWizard extends AbstractProjectWizard {
/**
@@ -81,6 +82,7 @@
public JarProjectWizard() {
super(TemplateEnginePlugin.JarProject);
}
+
/*
* (non-Javadoc)
*
@@ -89,9 +91,10 @@
public String getWindowTitle() {
return Messages.getString("JarProjectCreationWizard.title");
}
-
+
private class Operation extends WorkspaceModifyOperation {
IProject project = null;
+
/**
* @param project
*/
@@ -99,8 +102,9 @@
super();
this.project = project;
}
+
protected void execute(IProgressMonitor monitor) throws CoreException,
- InvocationTargetException, InterruptedException {
+ InvocationTargetException, InterruptedException {
String projectName = this.project.getName();
String path = this.project.getLocation().toOSString();
@@ -110,12 +114,12 @@
src.mkdirs();
File bin = new File(path + File.separator + "bin");
bin.mkdirs();
- //project.close(nullProgressMonitor);
+ // project.close(nullProgressMonitor);
TemplateEngine templateEngine = new TemplateEngine();
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(projectName);
@@ -133,10 +137,10 @@
"jarproject/build.properties.vm", path,
"build.properties", "build.properties"));
templateEngine.run(new NullProgressMonitor());
- //project.open(nullProgressMonitor);
- //RunAnt runAnt = new RunAnt();
- //runAnt.asAnt(path + File.separator
- // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
+ // project.open(nullProgressMonitor);
+ // RunAnt runAnt = new RunAnt();
+ // runAnt.asAnt(path + File.separator
+ // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
this.project.refreshLocal(IResource.DEPTH_INFINITE,
nullProgressMonitor);
} catch (Exception e) {
@@ -144,6 +148,7 @@
}
}
}
+
/**
* (non-Javadoc) Method declared on IWizard
*
@@ -157,10 +162,10 @@
try {
operation.run(new NullProgressMonitor());
} catch (InvocationTargetException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
} catch (InterruptedException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
}
}
Index: Messages.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/Messages.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Messages.java 11 Dec 2004 10:25:23 -0000 1.2
+++ Messages.java 11 Feb 2006 13:09:07 -0000 1.3
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,18 +54,24 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+
/**
* @author uli
*/
public class Messages {
private static final String RESOURCE_BUNDLE = Messages.class.getName();
+
private static ResourceBundle fgResourceBundle = ResourceBundle
.getBundle(RESOURCE_BUNDLE);
+
private Messages() {
+ super();
}
+
public static String getString(String key) {
try {
return fgResourceBundle.getString(key);
@@ -73,6 +79,7 @@
return '!' + key + '!';
}
}
+
/**
* Gets a string from the resource bundle and formats it with the argument
*
@@ -80,8 +87,9 @@
* the string used to get the bundle value, must not be null
*/
public static String getFormattedString(String key, Object arg) {
- return MessageFormat.format(getString(key), new Object[]{arg});
+ return MessageFormat.format(getString(key), new Object[] { arg });
}
+
/**
* Gets a string from the resource bundle and formats it with arguments
*/
Index: WOFrameworkWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/WOFrameworkWizard.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- WOFrameworkWizard.java 20 Sep 2005 03:11:22 -0000 1.4
+++ WOFrameworkWizard.java 11 Feb 2006 13:09:07 -0000 1.5
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -67,13 +68,13 @@
import org.objectstyle.wolips.templateengine.TemplateDefinition;
import org.objectstyle.wolips.templateengine.TemplateEngine;
import org.objectstyle.wolips.templateengine.TemplateEnginePlugin;
+
/**
* @author mnolte
- * @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type
- * comments go to Window>Preferences>Java>Code Generation.
+ * @author uli To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public class WOFrameworkWizard extends AbstractProjectWizard {
/**
@@ -82,6 +83,7 @@
public WOFrameworkWizard() {
super(TemplateEnginePlugin.WOFrameworkProject);
}
+
/*
* (non-Javadoc)
*
@@ -93,6 +95,7 @@
private class Operation extends WorkspaceModifyOperation {
IProject project = null;
+
/**
* @param project
*/
@@ -100,6 +103,7 @@
super();
this.project = project;
}
+
protected void execute(IProgressMonitor monitor) throws CoreException,
InvocationTargetException, InterruptedException {
String projectName = this.project.getName();
@@ -110,24 +114,26 @@
src.mkdirs();
File bin = new File(path + File.separator + "bin");
bin.mkdirs();
-// File xcode = new File(path + File.separator + projectName
-// + ".xcode");
-// xcode.mkdirs();
-// File xcodeproj = new File(path + File.separator + projectName
-// + ".xcodeproj");
-// xcodeproj.mkdirs();
- File ant = new File(path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME);
+ // File xcode = new File(path + File.separator + projectName
+ // + ".xcode");
+ // xcode.mkdirs();
+ // File xcodeproj = new File(path + File.separator + projectName
+ // + ".xcodeproj");
+ // xcodeproj.mkdirs();
+ File ant = new File(path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME);
ant.mkdirs();
- //project.close(nullProgressMonitor);
+ // project.close(nullProgressMonitor);
TemplateEngine templateEngine = new TemplateEngine();
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(projectName);
- templateEngine.getWolipsContext().setAntFolderName(ProjectPatternsets.ANT_FOLDER_NAME);
+ templateEngine.getWolipsContext().setAntFolderName(
+ ProjectPatternsets.ANT_FOLDER_NAME);
templateEngine.addTemplate(new TemplateDefinition(
"woframework/.classpath.vm", path, ".classpath",
".classpath"));
@@ -160,15 +166,15 @@
templateEngine.addTemplate(new TemplateDefinition(
"woframework/Properties.vm", path, "Properties",
"Properties"));
-// templateEngine.addTemplate(new TemplateDefinition(
-// "woframework/project.pbxproj.vm", path + File.separator
-// + projectName + ".xcode", "project.pbxproj",
-// "project.pbxproj"));
+ // templateEngine.addTemplate(new TemplateDefinition(
+ // "woframework/project.pbxproj.vm", path + File.separator
+ // + projectName + ".xcode", "project.pbxproj",
+ // "project.pbxproj"));
templateEngine.run(nullProgressMonitor);
- //project.open(nullProgressMonitor);
- //RunAnt runAnt = new RunAnt();
- //runAnt.asAnt(path + File.separator
- // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
+ // project.open(nullProgressMonitor);
+ // RunAnt runAnt = new RunAnt();
+ // runAnt.asAnt(path + File.separator
+ // + IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
this.project.refreshLocal(IResource.DEPTH_INFINITE,
nullProgressMonitor);
} catch (Exception e) {
@@ -176,6 +182,7 @@
}
}
}
+
/**
* (non-Javadoc) Method declared on IWizard
*
@@ -189,10 +196,10 @@
try {
operation.run(new NullProgressMonitor());
} catch (InvocationTargetException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
} catch (InterruptedException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
}
}
Index: D2WApplicationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/D2WApplicationWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- D2WApplicationWizard.java 18 Sep 2005 17:26:59 -0000 1.3
+++ D2WApplicationWizard.java 11 Feb 2006 13:09:07 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2004 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,7 @@
*
*/
package org.objectstyle.wolips.wizards;
+
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -67,13 +68,13 @@
import org.objectstyle.wolips.templateengine.TemplateDefinition;
import org.objectstyle.wolips.templateengine.TemplateEngine;
import org.objectstyle.wolips.templateengine.TemplateEnginePlugin;
+
/**
* @author mnolte
- * @author uli
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type
- * comments go to Window>Preferences>Java>Code Generation.
+ * @author uli To change this generated comment edit the template variable
+ * "typecomment": Window>Preferences>Java>Templates. To enable and
+ * disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
*/
public class D2WApplicationWizard extends AbstractProjectWizard {
/**
@@ -82,6 +83,7 @@
public D2WApplicationWizard() {
super(TemplateEnginePlugin.D2W_ApplicationProject);
}
+
/*
* (non-Javadoc)
*
@@ -93,6 +95,7 @@
private class Operation extends WorkspaceModifyOperation {
IProject project = null;
+
/**
* @param project
*/
@@ -100,6 +103,7 @@
super();
this.project = project;
}
+
protected void execute(IProgressMonitor monitor) throws CoreException,
InvocationTargetException, InterruptedException {
@@ -119,24 +123,19 @@
src.mkdirs();
File bin = new File(path + File.separator + "bin");
bin.mkdirs();
-// File xcode = new File(path + File.separator + projectName
-// + ".xcode");
-// xcode.mkdirs();
-// File xcodeproj = new File(path + File.separator + projectName
-// + ".xcodeproj");
-// xcodeproj.mkdirs();
- File ant = new File(path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME);
+ File ant = new File(path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME);
ant.mkdirs();
- //project.close(nullProgressMonitor);
TemplateEngine templateEngine = new TemplateEngine();
try {
templateEngine.init();
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
throw new InvocationTargetException(e);
}
templateEngine.getWolipsContext().setProjectName(projectName);
- templateEngine.getWolipsContext().setAntFolderName(ProjectPatternsets.ANT_FOLDER_NAME);
+ templateEngine.getWolipsContext().setAntFolderName(
+ ProjectPatternsets.ANT_FOLDER_NAME);
templateEngine.addTemplate(new TemplateDefinition(
"d2w_application/Main.html.vm", path + File.separator
+ "Main.wo", "Main.html", "Main.html"));
@@ -190,8 +189,9 @@
+ File.separator + "src", "PageWrapper.java",
"PageWrapper.java"));
templateEngine.addTemplate(new TemplateDefinition(
- "d2w_application/Session.java.vm", path + File.separator
- + "src", "Session.java", "Session.java"));
+ "d2w_application/Session.java.vm", path
+ + File.separator + "src", "Session.java",
+ "Session.java"));
templateEngine.addTemplate(new TemplateDefinition(
"d2w_application/.classpath.vm", path, ".classpath",
".classpath"));
@@ -201,33 +201,39 @@
templateEngine
.addTemplate(new TemplateDefinition(
"d2w_application/ant.classpaths.user.home.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.user.home",
"ant.classpaths.user.home"));
templateEngine.addTemplate(new TemplateDefinition(
- "d2w_application/ant.classpaths.wo.wolocalroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ "d2w_application/ant.classpaths.wo.wolocalroot.vm",
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.wo.wolocalroot",
"ant.classpaths.wo.wolocalroot"));
templateEngine.addTemplate(new TemplateDefinition(
"d2w_application/ant.classpaths.wo.wosystemroot.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.classpaths.wo.wosystemroot",
"ant.classpaths.wo.wosystemroot"));
templateEngine
.addTemplate(new TemplateDefinition(
"d2w_application/ant.frameworks.user.home.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.user.home",
"ant.frameworks.user.home"));
templateEngine.addTemplate(new TemplateDefinition(
- "d2w_application/ant.frameworks.wo.wolocalroot.vm", path
- + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ "d2w_application/ant.frameworks.wo.wolocalroot.vm",
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.wo.wolocalroot",
"ant.frameworks.wo.wolocalroot"));
templateEngine.addTemplate(new TemplateDefinition(
"d2w_application/ant.frameworks.wo.wosystemroot.vm",
- path + File.separator + ProjectPatternsets.ANT_FOLDER_NAME,
+ path + File.separator
+ + ProjectPatternsets.ANT_FOLDER_NAME,
"ant.frameworks.wo.wosystemroot",
"ant.frameworks.wo.wosystemroot"));
templateEngine.addTemplate(new TemplateDefinition(
@@ -271,9 +277,9 @@
"d2w_application/user.d2wmodel.vm", path,
"user.d2wmodel", "user.d2wmodel"));
templateEngine.run(nullProgressMonitor);
- //project.open(nullProgressMonitor);
- //RunAnt runAnt = new RunAnt();
- //runAnt.asAnt(path + File.separator +
+ // project.open(nullProgressMonitor);
+ // RunAnt runAnt = new RunAnt();
+ // runAnt.asAnt(path + File.separator +
// IWOLipsModel.DEFAULT_BUILD_FILENAME, null, null);
this.project.refreshLocal(IResource.DEPTH_INFINITE,
nullProgressMonitor);
@@ -282,6 +288,7 @@
}
}
}
+
/**
* (non-Javadoc) Method declared on IWizard
*
@@ -295,10 +302,10 @@
try {
operation.run(new NullProgressMonitor());
} catch (InvocationTargetException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
} catch (InterruptedException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
success = false;
}
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642