Re: r4607 - in trunk/woproject/wolips/core/plugins: org.objectstyle.wolips.jdt org.objectstyle.wolips.jdt/META-INF org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ant org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/classpath org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/listener org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ui org.objectstyle.wolips.launching org.objectstyle.wolips.launching/java/org/objectstyle/wolips/launching/classpath org.objectstyle.wolips.wizards org.objectstyle.wolips.wizards/META-INF org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards

From: Ulrich Köster (ulric..bjectstyle.org)
Date: Wed Nov 07 2007 - 14:12:33 EST

  • Next message: Mike Schrag (JIRA): "[OS-JIRA] Created: (WOL-634) NPE's in new classpath code"

    To get an example take a look at woproject/wolips/core/plugins/
    org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/
    NewWOProjectWizard.java

    Uli

    Am 07.11.2007 um 19:38 schrieb Daryl Lee:

    > Cool. That's for adding the API.
    >
    >
    > On Nov 6, 2007, at 10:30 AM, ul..bjectstyle.org wrote:
    >
    >> Author: uli
    >> Date: 2007-11-06 13:29:31 -0500 (Tue, 06 Nov 2007)
    >> New Revision: 4607
    >>
    >> Removed:
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/WOClasspathContainer.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/
    >> WOClasspathContainerInitializer.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/WOClassPathContainerPage.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/
    >> WOClasspathContainerContentProvider.java
    >> trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathResolver.java
    >> Modified:
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> META-INF/MANIFEST.MF
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/UpdateFrameworkIncludeFiles.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/UpdateIncludeFiles.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/
    >> UpdateOtherClasspathIncludeFiles.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntries.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntry.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerInitializer.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/ResourceChangeListener.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/UpdateIncludeFilesJob.java
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> plugin.xml
    >> trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathProvider.java
    >> trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/plugin.xml
    >> trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/.classpath
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.wizards/
    >> META-INF/MANIFEST.MF
    >> trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.wizards/
    >> java/org/objectstyle/wolips/wizards/NewWOProjectWizard.java
    >> Log:
    >> WOL-632
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/META-INF/MANIFEST.MF
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> META-INF/MANIFEST.MF 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> META-INF/MANIFEST.MF 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -9,10 +9,11 @@
    >> Require-Bundle: org.eclipse.ui,
    >> org.eclipse.core.resources,
    >> org.eclipse.jdt.core,
    >> - org.objectstyle.wolips.datasets,
    >> org.objectstyle.wolips.variables,
    >> org.eclipse.jdt.ui,
    >> org.objectstyle.wolips.baseforplugins,
    >> + org.eclipse.ui.ide,
    >> + org.objectstyle.wolips,
    >> org.eclipse.jdt,
    >> org.eclipse.jdt.apt.core
    >> Eclipse-LazyStart: true
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ant/
    >> UpdateFrameworkIncludeFiles.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/
    >> UpdateFrameworkIncludeFiles.java 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/
    >> UpdateFrameworkIncludeFiles.java 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -51,13 +51,13 @@
    >> import org.eclipse.core.resources.IProject;
    >> import org.eclipse.core.runtime.CoreException;
    >> import org.eclipse.core.runtime.IPath;
    >> +import org.eclipse.core.runtime.NullProgressMonitor;
    >> import org.eclipse.core.runtime.Path;
    >> import org.eclipse.jdt.core.IClasspathEntry;
    >> import org.eclipse.jdt.core.IJavaProject;
    >> import org.eclipse.jdt.core.JavaCore;
    >> import org.eclipse.jdt.core.JavaModelException;
    >> -import org.objectstyle.wolips.datasets.adaptable.Project;
    >> -import org.objectstyle.wolips.datasets.resources.IWOLipsModel;
    >> +import
    >> org.objectstyle.wolips.core.resources.types.project.IProjectAdapter;
    >> import org.objectstyle.wolips.jdt.JdtPlugin;
    >> import org.objectstyle.wolips.variables.VariablesPlugin;
    >>
    >>.. -108,7 +108,7 @@
    >> for (int i = 0; i < this.getPaths().length; i++) {
    >>
    >> String thisPath = getPaths()[i].toOSString();
    >> - currentFrameworkListFile =
    >> this.getProject().getAntFolder().getFile(this.INCLUDES_FILE_PREFIX
    >> + "." + this.rootPaths[i]);
    >> + currentFrameworkListFile =
    >> this
    >> .getProjectAdapter
    >> ().getWoprojectAdapter
    >> ().getUnderlyingFolder().getFile(this.INCLUDES_FILE_PREFIX + "." +
    >> this.rootPaths[i]);
    >>
    >> // if (currentFrameworkListFile.exists()) {
    >> // delete old include file
    >>.. -155,17 +155,13 @@
    >> if (referencedProjects != null) {
    >> for (int j = 0; j < referencedProjects.length; j++) {
    >> if (referencedProjects[j].isAccessible() &&
    >> referencedProjects[j].isOpen()) {
    >> - try {
    >> - Project referencedWOLipsProject = (Project)
    >> (referencedProjects[j]).getAdapter(Project.class);
    >> - if (referencedWOLipsProject != null &&
    >> referencedWOLipsProject.hasWOLipsNature() &&
    >> referencedWOLipsProject.isFramework()) {
    >> - newFrameworkEntries.append("Library/Frameworks/");
    >> -
    >> newFrameworkEntries
    >> .append(referencedWOLipsProject.getIProject().getName());
    >> - newFrameworkEntries.append(".");
    >> - newFrameworkEntries.append(IWOLipsModel.EXT_FRAMEWORK);
    >> - newFrameworkEntries.append("\n");
    >> - }
    >> - } catch (CoreException e1) {
    >> - JdtPlugin.getDefault().getPluginLogger().log(e1);
    >> + IProjectAdapter referencedWOLipsProject = (IProjectAdapter)
    >> (referencedProjects[j]).getAdapter(IProjectAdapter.class);
    >> + if (referencedWOLipsProject != null &&
    >> referencedWOLipsProject.isFramework()) {
    >> + newFrameworkEntries.append("Library/Frameworks/");
    >> +
    >> newFrameworkEntries
    >> .append(referencedWOLipsProject.getUnderlyingProject().getName());
    >> + newFrameworkEntries.append(".");
    >> + newFrameworkEntries.append("framework");
    >> + newFrameworkEntries.append("\n");
    >> }
    >> }
    >> }
    >>.. -182,8 +178,7 @@
    >> currentFrameworkListFile.setContents(new
    >> ByteArrayInputStream(newFrameworkEntries.toString().getBytes()),
    >> true, true, null);
    >> } else {
    >> // create list file if any entries found
    >> - Project project = (Project)
    >> this.getIProject().getAdapter(Project.class);
    >> - project.createAntFolder();
    >> +
    >> this
    >> .getProjectAdapter
    >> ().getWoprojectAdapter().getUnderlyingFolder().create(false, true,
    >> new NullProgressMonitor());
    >> currentFrameworkListFile.create(new
    >> ByteArrayInputStream(newFrameworkEntries.toString().getBytes()),
    >> true, null);
    >> }
    >> } catch (CoreException e) {
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ant/
    >> UpdateIncludeFiles.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/UpdateIncludeFiles.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/UpdateIncludeFiles.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -57,7 +57,7 @@
    >>
    >> import org.eclipse.core.resources.IProject;
    >> import org.eclipse.core.runtime.IPath;
    >> -import org.objectstyle.wolips.datasets.adaptable.Project;
    >> +import
    >> org.objectstyle.wolips.core.resources.types.project.IProjectAdapter;
    >> import org.objectstyle.wolips.variables.VariablesPlugin;
    >>
    >> /**
    >>.. -74,7 +74,7 @@
    >>
    >> private IProject iProject;
    >>
    >> - private Project project;
    >> + private IProjectAdapter projectAdapter;
    >>
    >> /**
    >> *
    >>.. -112,13 +112,13 @@
    >> */
    >> public void setIProject(IProject iProject) {
    >> this.iProject = iProject;
    >> - this.project = (Project) iProject.getAdapter(Project.class);
    >> + this.projectAdapter = (IProjectAdapter)
    >> iProject.getAdapter(IProjectAdapter.class);
    >> }
    >>
    >> /**
    >> *..eturn Returns the project.
    >> */
    >> - protected Project getProject() {
    >> - return this.project;
    >> + protected IProjectAdapter getProjectAdapter() {
    >> + return this.projectAdapter;
    >> }
    >> }
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ant/
    >> UpdateOtherClasspathIncludeFiles.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/
    >> UpdateOtherClasspathIncludeFiles.java 2007-11-06 00:06:44 UTC (rev
    >> 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ant/
    >> UpdateOtherClasspathIncludeFiles.java 2007-11-06 18:29:31 UTC (rev
    >> 4607)
    >>.. -62,11 +62,11 @@
    >> import org.eclipse.core.resources.IFile;
    >> import org.eclipse.core.runtime.CoreException;
    >> import org.eclipse.core.runtime.IPath;
    >> +import org.eclipse.core.runtime.NullProgressMonitor;
    >> import org.eclipse.jdt.core.IClasspathEntry;
    >> import org.eclipse.jdt.core.IJavaProject;
    >> import org.eclipse.jdt.core.JavaCore;
    >> import org.eclipse.jdt.core.JavaModelException;
    >> -import org.objectstyle.wolips.datasets.adaptable.Project;
    >> import org.objectstyle.wolips.jdt.JdtPlugin;
    >>
    >> /**
    >>.. -110,7 +110,7 @@
    >>
    >> for (int i = 0; i < getPaths().length; i++) {
    >>
    >> - currentClasspathListFile =
    >> this.getProject().getAntFolder().getFile(this.INCLUDES_FILE_PREFIX
    >> + "." + this.rootPaths[i]);
    >> + currentClasspathListFile =
    >> this
    >> .getProjectAdapter
    >> ().getWoprojectAdapter
    >> ().getUnderlyingFolder().getFile(this.INCLUDES_FILE_PREFIX + "." +
    >> this.rootPaths[i]);
    >> // System.out.println("currentClasspathListFile: " +
    >> // currentClasspathListFile.toString());
    >> if (currentClasspathListFile.exists()) {
    >>.. -149,8 +149,7 @@
    >> currentClasspathListFile.setContents(new
    >> ByteArrayInputStream(newClasspathEntries.toString().getBytes()),
    >> true, true, null);
    >> } else {
    >> // create list file if any entries found
    >> - Project project = (Project)
    >> this.getIProject().getAdapter(Project.class);
    >> - project.createAntFolder();
    >> +
    >> this
    >> .getProjectAdapter
    >> ().getWoprojectAdapter().getUnderlyingFolder().create(false, true,
    >> new NullProgressMonitor());
    >> currentClasspathListFile.create(new
    >> ByteArrayInputStream(newClasspathEntries.toString().getBytes()),
    >> true, null);
    >> }
    >> } catch (CoreException e) {
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/
    >> classpath/ContainerEntries.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntries.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntries.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -158,4 +158,17 @@
    >> this.entries.add(containerEntries[i]);
    >> }
    >> }
    >> +
    >> + /**
    >> + *..aram containerEntries
    >> + */
    >> + public void add(ArrayList<ContainerEntry> containerEntries) {
    >> + if(containerEntries == null) {
    >> + return;
    >> + }
    >> + for (int i = 0; i < containerEntries.size(); i++) {
    >> + ContainerEntry containerEntry = containerEntries.get(i);
    >> + this.add(containerEntry);
    >> + }
    >> + }
    >> }
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/
    >> classpath/ContainerEntry.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntry.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerEntry.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -123,6 +123,12 @@
    >> }
    >>
    >> /**
    >> + *..aram name
    >> + */
    >> + public ContainerEntry(String name) {
    >> + this(name, null, null, null, null);
    >> + }
    >> + /**
    >> *..aram path
    >> *..eturn
    >> *..hrows PathCoderException
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/
    >> classpath/ContainerInitializer.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerInitializer.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/ContainerInitializer.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -60,13 +60,29 @@
    >> */
    >> package org.objectstyle.wolips.jdt.classpath;
    >>
    >> +import java.lang.reflect.InvocationTargetException;
    >> +import java.util.ArrayList;
    >> +
    >> +import org.eclipse.core.resources.IResourceStatus;
    >> import org.eclipse.core.runtime.CoreException;
    >> import org.eclipse.core.runtime.IPath;
    >> +import org.eclipse.core.runtime.IProgressMonitor;
    >> +import org.eclipse.core.runtime.IStatus;
    >> +import org.eclipse.core.runtime.Status;
    >> import org.eclipse.jdt.core.ClasspathContainerInitializer;
    >> import org.eclipse.jdt.core.IClasspathContainer;
    >> +import org.eclipse.jdt.core.IClasspathEntry;
    >> import org.eclipse.jdt.core.IJavaProject;
    >> import org.eclipse.jdt.core.JavaCore;
    >> +import org.eclipse.jface.dialogs.ErrorDialog;
    >> +import org.eclipse.jface.dialogs.MessageDialog;
    >> +import org.eclipse.swt.widgets.Display;
    >> +import org.eclipse.ui.PlatformUI;
    >> +import org.eclipse.ui.actions.WorkspaceModifyOperation;
    >> +import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
    >> +import org.eclipse.ui.progress.IProgressService;
    >> import org.objectstyle.wolips.jdt.JdtPlugin;
    >> +import org.objectstyle.wolips.jdt.classpath.model.Framework;
    >>
    >> /**
    >> *..uthor ulrich
    >>.. -127,7 +143,7 @@
    >> *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .core
    >> .ClasspathContainerInitializer
    >> #initialize(org.eclipse.core.runtime.IPath,
    >> * org.eclipse.jdt.core.IJavaProject)
    >> */
    >> - public void initialize(IPath containerPath, IJavaProject project)
    >> throws CoreException {
    >> + public void initialize(final IPath containerPath, final
    >> IJavaProject project) throws CoreException {
    >> int size = containerPath.segmentCount();
    >> if (size > 0) {
    >> String firstSegment = containerPath.segment(0);
    >>.. -144,6 +160,76 @@
    >> JavaCore.setClasspathContainer(containerPath, new
    >> IJavaProject[] { project }, new IClasspathContainer[]
    >> { classpathContainer }, null);
    >> }
    >> }
    >> + //convert old container
    >> + final String OLD_WOLIPS_CLASSPATH_CONTAINER_IDENTITY =
    >> "org.objectstyle.wolips.WO_CLASSPATH";
    >> + if
    >> (firstSegment.startsWith(OLD_WOLIPS_CLASSPATH_CONTAINER_IDENTITY)) {
    >> + final WorkspaceModifyOperation op = new
    >> WorkspaceModifyOperation(project.getProject()) {
    >> +
    >> + public void execute(IProgressMonitor monitor) throws
    >> CoreException {
    >> + IClasspathEntry[] classpathEntries =
    >> project.getRawClasspath();
    >> + IClasspathEntry[] newClasspathEntries = new
    >> IClasspathEntry[classpathEntries.length];
    >> + for (int i = 0; i < classpathEntries.length; i++) {
    >> + IClasspathEntry classpathEntry = classpathEntries[i];
    >> + String firstSegementOfEntry =
    >> classpathEntry.getPath().segment(0);
    >> + if (firstSegementOfEntry != null &&
    >> firstSegementOfEntry
    >> .startsWith(OLD_WOLIPS_CLASSPATH_CONTAINER_IDENTITY)) {
    >> + Container container = new Container(null);
    >> + ArrayList<Framework> frameworks = new
    >> ArrayList<Framework>();
    >> + for (int j = 1; j < containerPath.segmentCount(); j++) {
    >> + String segment = containerPath.segment(j);
    >> + Framework framework =
    >> JdtPlugin
    >> .getDefault().getClasspathModel().getFrameworkWithName(segment);
    >> + if (framework != null) {
    >> + frameworks.add(framework);
    >> + }
    >> + }
    >> + container.setContent(frameworks.toArray(new
    >> Framework[frameworks.size()]));
    >> + IPath newContainerPath = container.getPath();
    >> + IClasspathEntry newClasspathEntry =
    >> JavaCore.newContainerEntry(newContainerPath);
    >> + newClasspathEntries[i] = newClasspathEntry;
    >> + } else {
    >> + newClasspathEntries[i] = classpathEntry;
    >> + }
    >> + }
    >> + project.setRawClasspath(newClasspathEntries, monitor);
    >> + }
    >> +
    >> + };
    >> +
    >> + Display.getDefault().asyncExec(new Runnable() {
    >> +
    >> + public void run() {
    >> + IProgressService service =
    >> PlatformUI.getWorkbench().getProgressService();
    >> +
    >> + // run the classpath update operation
    >> + try {
    >> + service.run(true, true, op);
    >> + } catch (InterruptedException e) {
    >> + return;
    >> + } catch (final InvocationTargetException e) {
    >> +
    >> + // ie.- one of the steps resulted in a core
    >> + // exception
    >> + Throwable t = e.getTargetException();
    >> + if (t instanceof CoreException) {
    >> + if (((CoreException) t).getStatus().getCode() ==
    >> IResourceStatus.CASE_VARIANT_EXISTS) {
    >> + MessageDialog.openError(null, "WebObjects Frameworks
    >> Error while updating classpath", project.getProject().getName());
    >> + } else {
    >> + ErrorDialog.openError(null, "WebObjects Frameworks",
    >> null, // no
    >> + // special
    >> + // message
    >> + ((CoreException) t).getStatus());
    >> + }
    >> + } else {
    >> + // CoreExceptions are handled above, but
    >> + // unexpected
    >> + // runtime
    >> + // exceptions and errors may still occur.
    >> + IDEWorkbenchPlugin.getDefault().getLog().log(new
    >> Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH, 0,
    >> t.toString(), t));
    >> + MessageDialog.openError(null, "WebObjects Frameworks Error
    >> while updating classpath", t.getMessage());
    >> + }
    >> + }
    >> + }
    >> + });
    >> + }
    >> }
    >> }
    >> }
    >> \ No newline at end of file
    >>
    >> Deleted: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/
    >> classpath/WOClasspathContainer.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/WOClasspathContainer.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/WOClasspathContainer.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -1,186 +0,0 @@
    >> -/*
    >> ====================================================================
    >> - *
    >> - * 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 andru..bjectstyle.org.
    >> - *
    >> - * 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/>.
    >> - *
    >> - */
    >> -package org.objectstyle.wolips.jdt.classpath;
    >> -
    >> -import java.io.File;
    >> -import java.io.FilenameFilter;
    >> -import java.util.HashMap;
    >> -import java.util.LinkedHashSet;
    >> -import java.util.Map;
    >> -import java.util.Set;
    >> -
    >> -import org.eclipse.core.runtime.IPath;
    >> -import org.eclipse.core.runtime.Path;
    >> -import org.eclipse.jdt.core.IClasspathAttribute;
    >> -import org.eclipse.jdt.core.IClasspathContainer;
    >> -import org.eclipse.jdt.core.IClasspathEntry;
    >> -import org.eclipse.jdt.core.JavaCore;
    >> -import org.objectstyle.wolips.variables.VariablesPlugin;
    >> -
    >> -/**
    >> - *..uthor Harald Niesche
    >> - *..uthor uli
    >> - */
    >> -public final class WOClasspathContainer implements
    >> IClasspathContainer {
    >> - public static final String WOLIPS_CLASSPATH_CONTAINER_IDENTITY =
    >> "org.objectstyle.wolips.WO_CLASSPATH";
    >> -
    >> - public static final String[] WOLIPS_CLASSPATH_STANDARD_FRAMEWORKS
    >> = new String[] { "JavaWebObjects", "JavaFoundation", "JavaXML",
    >> "JavaWOExtensions", "JavaEOAccess", "JavaEOControl",
    >> "JavaJDBCAdaptor" };
    >> -
    >> - private IClasspathEntry[] classpathEntries = null;
    >> -
    >> - private static Map<String, Set<IClasspathEntry>>
    >> allClasspathEntries = new HashMap<String, Set<IClasspathEntry>>();
    >> -
    >> - private IPath id;
    >> -
    >> - /**
    >> - * Constructor for WOClassPathContainer.
    >> - *
    >> - *..aram id
    >> - */
    >> - public WOClasspathContainer(IPath id) {
    >> - super();
    >> - this.id = id;
    >> - }
    >> -
    >> - /**
    >> - *..ee
    >> org.eclipse.jdt.core.IClasspathContainer#getClasspathEntries()
    >> - */
    >> - public IClasspathEntry[] getClasspathEntries() {
    >> - if (classpathEntries == null) {
    >> - initPath();
    >> - }
    >> - return classpathEntries;
    >> - }
    >> -
    >> - /**
    >> - *..ee org.eclipse.jdt.core.IClasspathContainer#getDescription()
    >> - */
    >> - public String getDescription() {
    >> - return "WO Frameworks";
    >> - }
    >> -
    >> - /**
    >> - *..ee org.eclipse.jdt.core.IClasspathContainer#getKind()
    >> - */
    >> - public int getKind() {
    >> - return IClasspathContainer.K_APPLICATION;
    >> - }
    >> -
    >> - /**
    >> - *..ee org.eclipse.jdt.core.IClasspathContainer#getPath()
    >> - */
    >> - public IPath getPath() {
    >> - return id;
    >> - }
    >> -
    >> - private void initPath() {
    >> - synchronized (allClasspathEntries) {
    >> - Set<IClasspathEntry> path = new LinkedHashSet<IClasspathEntry>();
    >> - IPath[] paths = VariablesPlugin.getDefault().getFrameworkRoots();
    >> - for (int i = 1; i < id.segmentCount(); i++) {
    >> - for (int h = 0; h < paths.length; h++) {
    >> - IPath classpathVariable = paths[h];
    >> - String framework = id.segment(i);
    >> - if (!allClasspathEntries.containsKey(framework)) {
    >> - File frameworkFile = new
    >> File(classpathVariable.toOSString(), framework + ".framework/
    >> Resources/Java");
    >> - if (frameworkFile.isDirectory()) {
    >> - String archives[] = frameworkFile.list(new FilenameFilter() {
    >> - public boolean accept(File dir, String name) {
    >> - String lowerName = name.toLowerCase();
    >> - return (lowerName.endsWith(".zip") ||
    >> lowerName.endsWith(".jar"));
    >> - }
    >> - });
    >> - IPath source = new Path(classpathVariable.toOSString() +
    >> "/" + framework + ".framework/Resources/Java/src.jar");
    >> - if (!source.toFile().exists()) {
    >> - source = null;
    >> - }
    >> - for (int j = 0; j < archives.length; j++) {
    >> - // framework found under this root
    >> - h = paths.length;
    >> - IPath archivePath = new
    >> Path(frameworkFile.getAbsolutePath() + "/" + archives[j]);
    >> - // IClasspathEntry entry =
    >> - // JavaCore.newLibraryEntry(archivePath, null,
    >> - // null);
    >> - if (!archives[j].equals("src.jar")) {
    >> - IClasspathAttribute javadoc[] = new IClasspathAttribute[0];
    >> - if (framework.indexOf("Java") == 0) {
    >> - javadoc = new IClasspathAttribute[1];
    >> - String referenceApiString =
    >> VariablesPlugin
    >> .getDefault().getReferenceApiAsJavaDocCompatibleString();
    >> - if (referenceApiString != null) {
    >> - javadoc[0] =
    >> JavaCore
    >> .newClasspathAttribute
    >> (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME,
    >> referenceApiString);
    >> - }
    >> - }
    >> - IClasspathEntry entry =
    >> JavaCore.newLibraryEntry(archivePath, source, null, null, javadoc,
    >> false);
    >> - path.add(entry);
    >> - Set<IClasspathEntry> entrySet =
    >> WOClasspathContainer.allClasspathEntries.get(framework);
    >> - if (entrySet == null) {
    >> - entrySet = new LinkedHashSet<IClasspathEntry>();
    >> - WOClasspathContainer.allClasspathEntries.put(framework,
    >> entrySet);
    >> - }
    >> - entrySet.add(entry);
    >> - }
    >> - }
    >> - }
    >> - } else {
    >> - path.addAll(allClasspathEntries.get(framework));
    >> - h = paths.length;
    >> - }
    >> - }
    >> - }
    >> - classpathEntries = path.toArray(new
    >> IClasspathEntry[path.size()]);
    >> - }
    >> - }
    >> -}
    >> \ No newline at end of file
    >>
    >> Deleted: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/
    >> classpath/WOClasspathContainerInitializer.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/
    >> WOClasspathContainerInitializer.java 2007-11-06 00:06:44 UTC (rev
    >> 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/classpath/
    >> WOClasspathContainerInitializer.java 2007-11-06 18:29:31 UTC (rev
    >> 4607)
    >>.. -1,108 +0,0 @@
    >> -/*
    >> ====================================================================
    >> - *
    >> - * The ObjectStyle Group Software License, Version 1.0
    >> - *
    >> - * Copyright (c) 2002 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 andru..bjectstyle.org.
    >> - *
    >> - * 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/>.
    >> - *
    >> - */
    >> -
    >> -/**
    >> - * Created on 28.06.2002
    >> - *
    >> - */
    >> -package org.objectstyle.wolips.jdt.classpath;
    >> -
    >> -import org.eclipse.core.runtime.CoreException;
    >> -import org.eclipse.core.runtime.IPath;
    >> -import org.eclipse.jdt.core.ClasspathContainerInitializer;
    >> -import org.eclipse.jdt.core.IClasspathContainer;
    >> -import org.eclipse.jdt.core.IJavaProject;
    >> -import org.eclipse.jdt.core.JavaCore;
    >> -
    >> -/**
    >> - *..uthor Harald Niesche
    >> - *
    >> - */
    >> -public final class WOClasspathContainerInitializer extends
    >> ClasspathContainerInitializer {
    >> -
    >> - /**
    >> - * Constructor for WOClasspathContainerInitializer.
    >> - */
    >> - public WOClasspathContainerInitializer() {
    >> - super();
    >> - }
    >> -
    >> - /**
    >> - *..ee
    >> org.eclipse.jdt.core.ClasspathContainerInitializer#initialize(IPath,
    >> - * IJavaProject)
    >> - */
    >> - public final void initialize(IPath containerPath, IJavaProject
    >> project) throws CoreException {
    >> - int size = containerPath.segmentCount();
    >> - if (size > 0) {
    >> - String firstSegment = containerPath.segment(0);
    >> - if
    >> (firstSegment
    >> .startsWith
    >> (WOClasspathContainer.WOLIPS_CLASSPATH_CONTAINER_IDENTITY)) {
    >> -
    >> - JavaCore.setClasspathContainer(containerPath, new
    >> IJavaProject[] { project }, new IClasspathContainer[] { new
    >> WOClasspathContainer(containerPath) }, null);
    >> - }
    >> - }
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .core
    >> .ClasspathContainerInitializer
    >> #getComparisonID(org.eclipse.core.runtime.IPath,
    >> - * org.eclipse.jdt.core.IJavaProject)
    >> - */
    >> - public Object getComparisonID(IPath containerPath, IJavaProject
    >> project) {
    >> - // we want every WO container to show up
    >> - return containerPath;
    >> - }
    >> -}
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/listener/
    >> ResourceChangeListener.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/
    >> ResourceChangeListener.java 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/
    >> ResourceChangeListener.java 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -50,15 +50,13 @@
    >> package org.objectstyle.wolips.jdt.listener;
    >>
    >> import org.eclipse.core.resources.IFile;
    >> -import org.eclipse.core.resources.IProject;
    >> import org.eclipse.core.resources.IResource;
    >> import org.eclipse.core.resources.IResourceChangeEvent;
    >> import org.eclipse.core.resources.IResourceChangeListener;
    >> import org.eclipse.core.resources.IResourceDelta;
    >> import org.eclipse.core.resources.IResourceDeltaVisitor;
    >> import org.eclipse.core.runtime.CoreException;
    >> -import org.objectstyle.wolips.datasets.DataSetsPlugin;
    >> -import org.objectstyle.wolips.datasets.adaptable.Project;
    >> +import
    >> org.objectstyle.wolips.core.resources.types.project.IProjectAdapter;
    >> import org.objectstyle.wolips.jdt.JdtPlugin;
    >>
    >> /**
    >>.. -66,8 +64,6 @@
    >> */
    >> public class ResourceChangeListener implements
    >> IResourceChangeListener, IResourceDeltaVisitor {
    >>
    >> - private Project project;
    >> -
    >> /**
    >> * Constructor for ResourceChangeListener.
    >> */
    >>.. -94,7 +90,7 @@
    >> try {
    >> return examineResource(resource, delta.getKind());
    >> } catch (CoreException e) {
    >> - DataSetsPlugin.getDefault().getPluginLogger().log(e);
    >> + JdtPlugin.getDefault().getPluginLogger().log(e);
    >> return false;
    >> }
    >> }
    >>.. -119,12 +115,11 @@
    >> // further investigation of resource delta needed
    >> return true;
    >> case IResource.PROJECT:
    >> - this.project = null;
    >> - this.project = (Project) ((IProject)
    >> resource).getAdapter(Project.class);
    >> - if (this.project == null) {
    >> + IProjectAdapter project = (IProjectAdapter)
    >> resource.getAdapter(IProjectAdapter.class);
    >> + if (project == null) {
    >> return false;
    >> }
    >> - if (this.project.isWOLipsProject()) {
    >> + if (project.isApplication() || project.isFramework()) {
    >> return true;
    >> } // no webobjects project
    >> return false;
    >>.. -132,22 +127,9 @@
    >> return false;
    >> case IResource.FILE:
    >> if (resource.getName().equals(".classpath")) {
    >> - UpdateIncludeFilesJob updateIncludeFilesJob = new
    >> UpdateIncludeFilesJob(this.project.getIProject());
    >> - updateIncludeFilesJob.setRule(this.project.getIProject());
    >> + UpdateIncludeFilesJob updateIncludeFilesJob = new
    >> UpdateIncludeFilesJob(resource.getProject());
    >> + updateIncludeFilesJob.setRule(resource.getProject());
    >> updateIncludeFilesJob.schedule();
    >> - // IJavaProject iJavaProject = JavaCore.create(this.project
    >> - // .getIProject());
    >> - // JavaProject javaProject = (JavaProject) iJavaProject
    >> - // .getAdapter(JavaProject.class);
    >> - // List frameworkNames = javaProject.getFrameworkNames();
    >> - //
    >> - // if (frameworkNames != null) {
    >> - // UpdateFrameworkNamesJob updateFrameworkNamesJob = new
    >> - // UpdateFrameworkNamesJob(
    >> - // frameworkNames, this.project.getIProject());
    >> - // updateFrameworkNamesJob.setRule(this.project.getIProject());
    >> - // updateFrameworkNamesJob.schedule();
    >> - // }
    >> }
    >> }
    >> return false;
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/listener/
    >> UpdateIncludeFilesJob.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/UpdateIncludeFilesJob.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/listener/UpdateIncludeFilesJob.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -61,7 +61,7 @@
    >> import org.eclipse.core.runtime.IProgressMonitor;
    >> import org.eclipse.core.runtime.IStatus;
    >> import org.eclipse.core.runtime.Status;
    >> -import org.objectstyle.wolips.datasets.DataSetsPlugin;
    >> +import org.objectstyle.wolips.jdt.JdtPlugin;
    >> import org.objectstyle.wolips.jdt.ant.UpdateFrameworkIncludeFiles;
    >> import
    >> org.objectstyle.wolips.jdt.ant.UpdateOtherClasspathIncludeFiles;
    >>
    >>.. -91,6 +91,6 @@
    >> UpdateFrameworkIncludeFiles updateFrameworkIncludeFiles = new
    >> UpdateFrameworkIncludeFiles();
    >> updateFrameworkIncludeFiles.setIProject(iProject);
    >> updateFrameworkIncludeFiles.execute();
    >> - return new Status(IStatus.OK, DataSetsPlugin.getPluginId(),
    >> IStatus.OK, "Done", null);
    >> + return new Status(IStatus.OK, JdtPlugin.getPluginId(),
    >> IStatus.OK, "Done", null);
    >> }
    >> }
    >>
    >> Deleted: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ui/
    >> WOClassPathContainerPage.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/WOClassPathContainerPage.java
    >> 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/WOClassPathContainerPage.java
    >> 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -1,161 +0,0 @@
    >> -/*
    >> ====================================================================
    >> - *
    >> - * The ObjectStyle Group Software License, Version 1.0
    >> - *
    >> - * Copyright (c) 2002 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 andru..bjectstyle.org.
    >> - *
    >> - * 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/>.
    >> - *
    >> - */
    >> -
    >> -package org.objectstyle.wolips.jdt.ui;
    >> -
    >> -// http://www.eclipse.org/articles/Understanding%20Layouts/Understanding%20Layouts.htm
    >> -
    >> -import java.util.ArrayList;
    >> -import java.util.List;
    >> -
    >> -import org.eclipse.jdt.core.IClasspathEntry;
    >> -import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
    >> -import org.eclipse.jface.viewers.CheckboxTreeViewer;
    >> -import org.eclipse.jface.wizard.WizardPage;
    >> -import org.eclipse.swt.SWT;
    >> -import org.eclipse.swt.graphics.Rectangle;
    >> -import org.eclipse.swt.layout.GridData;
    >> -import org.eclipse.swt.layout.GridLayout;
    >> -import org.eclipse.swt.widgets.Composite;
    >> -import org.eclipse.swt.widgets.Label;
    >> -import
    >> org
    >> .objectstyle
    >> .wolips
    >> .jdt
    >> .ui.WOClasspathContainerContentProvider.WOClasspathContainerEntry;
    >> -import
    >> org
    >> .objectstyle
    >> .wolips
    >> .jdt.ui.WOClasspathContainerContentProvider.WOClasspathContainerRoot;
    >> -
    >> -/**
    >> - * Insert the type's description here.
    >> - *
    >> - *..ee WizardPage
    >> - */
    >> -public class WOClassPathContainerPage extends WizardPage
    >> implements IClasspathContainerPage {
    >> - private WOClasspathContainerContentProvider path;
    >> -
    >> - /**
    >> - * The constructor.
    >> - */
    >> - public WOClassPathContainerPage() {
    >> - super("non-localized WOClassPathContainerPage");
    >> - }
    >> -
    >> - public void createControl(Composite parent) {
    >> - Composite thisPage = new Composite(parent, SWT.NONE);
    >> -
    >> - thisPage.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    >> - thisPage.setLayout(new GridLayout());
    >> - // thisPage.setLayout(new RowLayout(SWT.VERTICAL));
    >> -
    >> - this._uiList = new CheckboxTreeViewer(thisPage, SWT.MULTI);
    >> - // _uiList = new CheckboxTreeViewer(thisPage, SWT.MULTI |
    >> SWT.BORDER |
    >> - // SWT.V_SCROLL | SWT.H_SCROLL);
    >> - GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL |
    >> GridData.FILL_HORIZONTAL);
    >> - // |GridData.VERTICAL_ALIGN_FILL
    >> - Rectangle trim = this._uiList.getTree().computeTrim(0, 0, 0, 12
    >> * this._uiList.getTree().getItemHeight());
    >> - gd.heightHint = trim.height;
    >> - this._uiList.getTree().setLayoutData(gd);
    >> - this._uiList.setContentProvider(this.path);
    >> - this._uiList.setLabelProvider(this.path);
    >> - this._uiList.setInput(this.path);
    >> - List<WOClasspathContainerEntry> checked = new
    >> ArrayList<WOClasspathContainerEntry>();
    >> - WOClasspathContainerRoot[] roots = this.path.getRoots();
    >> - if (roots != null) {
    >> - for (int i = 0; i < roots.length; i++) {
    >> - WOClasspathContainerEntry[] entries = roots[i].getEntries();
    >> - if (entries != null) {
    >> - for (int j = 0; j < entries.length; j++) {
    >> - if (entries[j].isChecked())
    >> - checked.add(entries[j]);
    >> - }
    >> - }
    >> - }
    >> - }
    >> - this._uiList.setCheckedElements(checked.toArray());
    >> -
    >> - Label lbl = new Label(thisPage, SWT.SINGLE);
    >> - lbl.setText("Hint: use Ctrl-click or Shift-click");
    >> -
    >> - thisPage.layout();
    >> -
    >> - setControl(thisPage);
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee org.eclipse.jdt.ui.wizards.IClasspathContainerPage#finish()
    >> - */
    >> - public boolean finish() {
    >> - return true;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org.eclipse.jdt.ui.wizards.IClasspathContainerPage#getSelection()
    >> - */
    >> - public IClasspathEntry getSelection() {
    >> - return this.path.getClasspathEntry();
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .ui
    >> .wizards
    >> .IClasspathContainerPage
    >> #setSelection(org.eclipse.jdt.core.IClasspathEntry)
    >> - */
    >> - public void setSelection(IClasspathEntry containerEntry) {
    >> - this.path = new
    >> WOClasspathContainerContentProvider(containerEntry);
    >> - }
    >> -
    >> - private CheckboxTreeViewer _uiList;
    >> -}
    >>
    >> Deleted: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/java/org/objectstyle/wolips/jdt/ui/
    >> WOClasspathContainerContentProvider.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/
    >> WOClasspathContainerContentProvider.java 2007-11-06 00:06:44 UTC
    >> (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> java/org/objectstyle/wolips/jdt/ui/
    >> WOClasspathContainerContentProvider.java 2007-11-06 18:29:31 UTC
    >> (rev 4607)
    >>.. -1,434 +0,0 @@
    >> -/*
    >> ====================================================================
    >> - *
    >> - * The ObjectStyle Group Software License, Version 1.0
    >> - *
    >> - * Copyright (c) 2004 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 andru..bjectstyle.org.
    >> - *
    >> - * 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/>.
    >> - *
    >> - */
    >> -package org.objectstyle.wolips.jdt.ui;
    >> -
    >> -import java.io.File;
    >> -import java.io.FilenameFilter;
    >> -import java.util.ArrayList;
    >> -import java.util.List;
    >> -
    >> -import org.eclipse.core.runtime.IPath;
    >> -import org.eclipse.core.runtime.Path;
    >> -import org.eclipse.jdt.core.IClasspathEntry;
    >> -import org.eclipse.jdt.core.JavaCore;
    >> -import org.eclipse.jface.viewers.CheckboxTreeViewer;
    >> -import org.eclipse.jface.viewers.ILabelProvider;
    >> -import org.eclipse.jface.viewers.ILabelProviderListener;
    >> -import org.eclipse.jface.viewers.ITreeContentProvider;
    >> -import org.eclipse.jface.viewers.Viewer;
    >> -import org.eclipse.swt.graphics.Image;
    >> -import org.objectstyle.wolips.jdt.PluginImages;
    >> -import org.objectstyle.wolips.jdt.classpath.WOClasspathContainer;
    >> -import org.objectstyle.wolips.variables.VariablesPlugin;
    >> -
    >> -/**
    >> - *..uthor ulrich
    >> - *
    >> - * To change the template for this generated type comment go to
    >> - * Window>Preferences>Java>Code Generation>Code and Comments
    >> - */
    >> -public class WOClasspathContainerContentProvider implements
    >> ITreeContentProvider, ILabelProvider {
    >> - private WOClasspathContainerRoot[] roots;
    >> -
    >> - private CheckboxTreeViewer checkboxTreeViewer;
    >> -
    >> - protected List<String> allEntries = new ArrayList<String>();
    >> -
    >> - private boolean isExported = false;
    >> -
    >> - /**
    >> - *..aram containerEntry
    >> - */
    >> - public WOClasspathContainerContentProvider(IClasspathEntry
    >> containerEntry) {
    >> - super();
    >> - IPath path = null;
    >> - if (containerEntry == null || containerEntry.getPath() == null) {
    >> - path = new
    >> Path(WOClasspathContainer.WOLIPS_CLASSPATH_CONTAINER_IDENTITY);
    >> - for (int i = 0; i <
    >> WOClasspathContainer.WOLIPS_CLASSPATH_STANDARD_FRAMEWORKS.length; i+
    >> +) {
    >> - path = path.append("/" +
    >> WOClasspathContainer.WOLIPS_CLASSPATH_STANDARD_FRAMEWORKS[i]);
    >> - }
    >> - } else {
    >> - this.isExported = containerEntry.isExported();
    >> - path = containerEntry.getPath();
    >> - }
    >> - String[] rootsNames =
    >> VariablesPlugin.getDefault().getFrameworkRootsNames();
    >> - IPath[] rootsPaths =
    >> VariablesPlugin.getDefault().getFrameworkRoots();
    >> - this.roots = new WOClasspathContainerRoot[rootsNames.length];
    >> - for (int i = 0; i < rootsNames.length; i++) {
    >> - this.roots[i] = new WOClasspathContainerRoot(rootsNames[i],
    >> rootsPaths[i], path);
    >> - }
    >> - }
    >> -
    >> - /**
    >> - *..uthor ulrich
    >> - *
    >> - * TODO To change the template for this generated type comment go
    >> to Window -
    >> - * Preferences - Java - Code Style - Code Templates
    >> - */
    >> - public final class WOClasspathContainerRoot {
    >> - private String root;
    >> -
    >> - private IPath rootPath;
    >> -
    >> - private IPath containerPath;
    >> -
    >> - private WOClasspathContainerEntry[] entries;
    >> -
    >> - protected WOClasspathContainerRoot(String root, IPath rootPath,
    >> IPath containerPath) {
    >> - this.root = root;
    >> - this.rootPath = rootPath;
    >> - this.containerPath = containerPath;
    >> - File fwBase = new File(rootPath.toOSString());
    >> - if (fwBase.exists() && fwBase.isDirectory()) {
    >> - File frameworks[] = fwBase.listFiles(new WOFWFilenameFilter());
    >> - this.entries = new WOClasspathContainerEntry[frameworks.length];
    >> - for (int i = 0; i < frameworks.length; i++) {
    >> - WOClasspathContainerEntry entry = new
    >> WOClasspathContainerEntry(this, containerPath, frameworks[i]);
    >> - this.entries[i] = entry;
    >> - }
    >> - }
    >> - }
    >> -
    >> - /**
    >> - *..eturn
    >> - */
    >> - public WOClasspathContainerEntry[] getEntries() {
    >> - return this.entries;
    >> - }
    >> -
    >> - protected String getRoot() {
    >> - return this.root;
    >> - }
    >> -
    >> - protected IPath getContainerPath() {
    >> - return this.containerPath;
    >> - }
    >> -
    >> - protected IPath getRootPath() {
    >> - return this.rootPath;
    >> - }
    >> -
    >> - }
    >> -
    >> - /**
    >> - *..uthor ulrich
    >> - *
    >> - * TODO To change the template for this generated type comment go
    >> to Window -
    >> - * Preferences - Java - Code Style - Code Templates
    >> - */
    >> - public final class WOClasspathContainerEntry {
    >> - private WOClasspathContainerRoot root;
    >> -
    >> - private boolean checked = false;
    >> -
    >> - private String name;
    >> -
    >> - protected WOClasspathContainerEntry(WOClasspathContainerRoot
    >> root, IPath path, File framework) {
    >> - this.root = root;
    >> - if (path != null) {
    >> - String[] segments = path.segments();
    >> - this.name = framework.getName();
    >> - // cut off the .framework
    >> - this.name = this.name.substring(0, this.name.length() - 10);
    >> - for (int i = 0; i < segments.length; i++) {
    >> - this.checked = (i > 0 && !
    >> WOClasspathContainerContentProvider
    >> .this.allEntries.contains(this.name) &&
    >> segments[i].equals(this.name) && this.exists(segments[i],
    >> (this.getRoot().getRootPath())));
    >> - if (this.checked) {
    >> - i = segments.length;
    >> -
    >> WOClasspathContainerContentProvider.this.allEntries.add(this.name);
    >> - }
    >> -
    >> - }
    >> - }
    >> - }
    >> -
    >> - private boolean exists(String framework, IPath rootPath) {
    >> - IPath frameworkPath = rootPath.append(framework +
    >> ".framework").append("Resources").append("Java");
    >> - File frameworkFile = new File(frameworkPath.toOSString());
    >> - return frameworkFile.isDirectory();
    >> - }
    >> -
    >> - /**
    >> - *..eturn
    >> - */
    >> - public boolean isChecked() {
    >> - return this.checked;
    >> - }
    >> -
    >> - /**
    >> - *..aram b
    >> - */
    >> - protected void setChecked(boolean b) {
    >> - this.checked = b;
    >> - }
    >> -
    >> - protected String getName() {
    >> - return this.name;
    >> - }
    >> -
    >> - protected WOClasspathContainerRoot getRoot() {
    >> - return this.root;
    >> - }
    >> -
    >> - }
    >> -
    >> - private static final class WildcardFilenameFilter implements
    >> FilenameFilter {
    >> - WildcardFilenameFilter(String prefix, String suffix) {
    >> - this._prefix = prefix;
    >> - this._suffix = suffix;
    >> - }
    >> -
    >> - public boolean accept(File file, String name) {
    >> -
    >> - String lowerName = name.toLowerCase();
    >> -
    >> - return (((null == this._prefix) ||
    >> lowerName.startsWith(this._prefix)) && ((null == this._suffix) ||
    >> lowerName.endsWith(this._suffix)));
    >> - }
    >> -
    >> - String _prefix;
    >> -
    >> - String _suffix;
    >> - }
    >> -
    >> - static final class WOFWFilenameFilter implements FilenameFilter {
    >> - public boolean accept(File file, String name) {
    >> - /* name.startsWith("Java") && */
    >> - boolean candidate = name.endsWith(".framework");
    >> -
    >> - boolean result = false;
    >> -
    >> - if (candidate) {
    >> - File resDir = new File(file, name + "/Resources/Java");
    >> - if (resDir.exists()) {
    >> -
    >> - String jarFiles[] = resDir.list(new
    >> WildcardFilenameFilter(null, ".jar"));
    >> - String zipFiles[] = resDir.list(new
    >> WildcardFilenameFilter(null, ".zip"));
    >> -
    >> - result = (0 != jarFiles.length) || (0 != zipFiles.length);
    >> -
    >> - }
    >> - }
    >> -
    >> - return (result);
    >> - }
    >> - }
    >> -
    >> - /**
    >> - *..eturn
    >> - */
    >> - public IClasspathEntry getClasspathEntry() {
    >> - IPath path = null;
    >> - path = new
    >> Path(WOClasspathContainer.WOLIPS_CLASSPATH_CONTAINER_IDENTITY);
    >> - if (this.getRoots() != null)
    >> - for (int i = 0; i < this.getRoots().length; i++) {
    >> - WOClasspathContainerRoot root = this.getRoots()[i];
    >> - if (root.getEntries() != null)
    >> - for (int j = 0; j < root.getEntries().length; j++) {
    >> - if (root.getEntries() != null &&
    >> this.checkboxTreeViewer.getChecked(root.getEntries()[j])) {
    >> - // path = path.append(root.root);
    >> - path = path.append(root.getEntries()[j].getName());
    >> - }
    >> - }
    >> - }
    >> - return JavaCore.newContainerEntry(path, this.isExported);
    >> - }
    >> -
    >> - /**
    >> - *..eturn
    >> - */
    >> - public WOClasspathContainerRoot[] getRoots() {
    >> - return this.roots;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
    >> - */
    >> - public Object[] getChildren(Object parentElement) {
    >> - if (parentElement instanceof WOClasspathContainerRoot) {
    >> - WOClasspathContainerEntry[] entries =
    >> ((WOClasspathContainerRoot) parentElement).getEntries();
    >> - /*
    >> - * for (int i = 0; i < entries.length; i++) {
    >> - * viewer.setChecked(entries[i], entries[i].isChecked()); }
    >> - */
    >> - return entries;
    >> - }
    >> - if (parentElement instanceof
    >> WOClasspathContainerContentProvider) {
    >> - WOClasspathContainerRoot[] currentRoots =
    >> ((WOClasspathContainerContentProvider) parentElement).getRoots();
    >> - /*
    >> - * for (int i = 0; i < roots.length; i++) { viewer.add(roots[i],
    >> - * this.getChildren(roots[i])); }
    >> - */
    >> - return currentRoots;
    >> - }
    >> - return new Object[0];
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
    >> - */
    >> - public Object getParent(Object element) {
    >> - if (element instanceof WOClasspathContainerRoot)
    >> - return this;
    >> - if (element instanceof WOClasspathContainerEntry)
    >> - return ((WOClasspathContainerEntry) element).getRoot();
    >> - return null;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
    >> - */
    >> - public boolean hasChildren(Object element) {
    >> - if (element instanceof WOClasspathContainerContentProvider)
    >> - return ((WOClasspathContainerContentProvider)
    >> element).getRoots() != null &&
    >> ((WOClasspathContainerContentProvider) element).getRoots().length >
    >> 0;
    >> - if (element instanceof WOClasspathContainerRoot)
    >> - return ((WOClasspathContainerRoot) element).getEntries() !=
    >> null && ((WOClasspathContainerRoot) element).getEntries().length > 0;
    >> - return false;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface
    >> .viewers.IStructuredContentProvider#getElements(java.lang.Object)
    >> - */
    >> - public Object[] getElements(Object inputElement) {
    >> - return this.getChildren(inputElement);
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee org.eclipse.jface.viewers.IContentProvider#dispose()
    >> - */
    >> - public void dispose() {
    >> - return;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface
    >> .viewers
    >> .IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
    >> - * java.lang.Object, java.lang.Object)
    >> - */
    >> - public void inputChanged(Viewer viewer, Object oldInput, Object
    >> newInput) {
    >> - this.checkboxTreeViewer = (CheckboxTreeViewer) viewer;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
    >> - */
    >> - public Image getImage(Object element) {
    >> - if (element instanceof WOClasspathContainerRoot)
    >> - return PluginImages.WOFRAMEWORK_ROOT_IMAGE();
    >> - if (element instanceof WOClasspathContainerEntry) {
    >> - for (int i = 0; i <
    >> WOClasspathContainer.WOLIPS_CLASSPATH_STANDARD_FRAMEWORKS.length; i+
    >> +) {
    >> - if
    >> (WOClasspathContainer
    >> .WOLIPS_CLASSPATH_STANDARD_FRAMEWORKS
    >> [i].equals(((WOClasspathContainerEntry) element).getName()))
    >> - return PluginImages.WOSTANDARD_FRAMEWORK_IMAGE();
    >> - }
    >> - return PluginImages.WOFRAMEWORK_IMAGE();
    >> - }
    >> - return null;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
    >> - */
    >> - public String getText(Object element) {
    >> - if (element instanceof WOClasspathContainerRoot)
    >> - return ((WOClasspathContainerRoot) element).getRoot();
    >> - if (element instanceof WOClasspathContainerEntry)
    >> - return ((WOClasspathContainerEntry) element).getName();
    >> -
    >> - return element.toString();
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface
    >> .viewers
    >> .IBaseLabelProvider
    >> #addListener(org.eclipse.jface.viewers.ILabelProviderListener)
    >> - */
    >> - public void addListener(ILabelProviderListener listener) {
    >> - return;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
    >> - * java.lang.String)
    >> - */
    >> - public boolean isLabelProperty(Object element, String property) {
    >> - return false;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jface
    >> .viewers
    >> .IBaseLabelProvider
    >> #removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
    >> - */
    >> - public void removeListener(ILabelProviderListener listener) {
    >> - return;
    >> - }
    >> -
    >> -}
    >> \ No newline at end of file
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.jdt/plugin.xml
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> plugin.xml 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/org.objectstyle.wolips.jdt/
    >> plugin.xml 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -25,7 +25,7 @@
    >> <extension
    >> point="org.eclipse.jdt.core.classpathContainerInitializer">
    >> <classpathContainerInitializer
    >> -
    >> class
    >> =
    >> "org
    >> .objectstyle.wolips.jdt.classpath.WOClasspathContainerInitializer"
    >> +
    >> class="org.objectstyle.wolips.jdt.classpath.ContainerInitializer"
    >> id="org.objectstyle.wolips.WO_CLASSPATH">
    >> </classpathContainerInitializer>
    >> </extension>
    >>.. -42,14 +42,6 @@
    >> <extension
    >> point="org.eclipse.jdt.ui.classpathContainerPage">
    >> <classpathContainerPage
    >> - name="WebObjects Frameworks old"
    >> -
    >> class="org.objectstyle.wolips.jdt.ui.WOClassPathContainerPage"
    >> - id="org.objectstyle.wolips.WO_CLASSPATH">
    >> - </classpathContainerPage>
    >> - </extension>
    >> - <extension
    >> - point="org.eclipse.jdt.ui.classpathContainerPage">
    >> - <classpathContainerPage
    >> name="WebObjects Frameworks"
    >> class="org.objectstyle.wolips.jdt.ui.ContainerPage"
    >> id="org.objectstyle.wolips.ContainerInitializer">
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathProvider.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathProvider.java 2007-11-06
    >> 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathProvider.java 2007-11-06
    >> 18:29:31 UTC (rev 4607)
    >>.. -181,10 +181,14 @@
    >> private boolean isAppleProvided(IRuntimeClasspathEntry
    >> runtimeClasspathEntry) {
    >> String location = runtimeClasspathEntry.getLocation();
    >> if (location != null) {
    >> - // check maven path
    >> + // check maven path (first french version)
    >> if (location.indexOf("webobjects" + File.separator + "apple") >
    >> 0) {
    >> return true;
    >> }
    >> + // check maven path
    >> + if (location.indexOf("apple" + File.separator + "webobjects") >
    >> 0) {
    >> + return true;
    >> + }
    >> // check mac path
    >> if (location.indexOf("System" + File.separator + "Library") > 0) {
    >> return true;
    >>
    >> Deleted: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathResolver.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathResolver.java 2007-11-06
    >> 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/java/org/objectstyle/wolips/
    >> launching/classpath/WORuntimeClasspathResolver.java 2007-11-06
    >> 18:29:31 UTC (rev 4607)
    >>.. -1,149 +0,0 @@
    >> -/*
    >> - *
    >> ====================================================================
    >> - *
    >> - * The ObjectStyle Group Software License, Version 1.0
    >> - *
    >> - * Copyright (c) 2002 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 andru..bjectstyle.org
    >> .
    >> - * 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/> .
    >> - *
    >> - */
    >> -
    >> -package org.objectstyle.wolips.launching.classpath;
    >> -
    >> -import java.util.ArrayList;
    >> -import java.util.Arrays;
    >> -import java.util.HashSet;
    >> -import java.util.List;
    >> -import java.util.Set;
    >> -
    >> -import org.eclipse.core.resources.IWorkspaceRoot;
    >> -import org.eclipse.core.resources.ResourcesPlugin;
    >> -import org.eclipse.core.runtime.CoreException;
    >> -import org.eclipse.core.runtime.IPath;
    >> -import org.eclipse.core.runtime.Path;
    >> -import org.eclipse.debug.core.ILaunchConfiguration;
    >> -import org.eclipse.jdt.core.IClasspathEntry;
    >> -import org.eclipse.jdt.core.IJavaProject;
    >> -import org.eclipse.jdt.core.JavaCore;
    >> -import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
    >> -import org.eclipse.jdt.launching.IRuntimeClasspathEntryResolver;
    >> -import org.eclipse.jdt.launching.IVMInstall;
    >> -import org.eclipse.jdt.launching.JavaRuntime;
    >> -import org.objectstyle.wolips.jdt.classpath.WOClasspathContainer;
    >> -
    >> -/**
    >> - *..uthor ulrich
    >> - *
    >> - * To change the template for this generated type comment go to
    >> - * Window>Preferences>Java>Code Generation>Code and Comments
    >> - */
    >> -public class WORuntimeClasspathResolver implements
    >> IRuntimeClasspathEntryResolver {
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .launching
    >> .IRuntimeClasspathEntryResolver
    >> #resolveRuntimeClasspathEntry
    >> (org.eclipse.jdt.launching.IRuntimeClasspathEntry,
    >> - * org.eclipse.debug.core.ILaunchConfiguration)
    >> - */
    >> - public IRuntimeClasspathEntry[]
    >> resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry,
    >> ILaunchConfiguration configuration) throws CoreException {
    >> - IJavaProject prj = JavaRuntime.getJavaProject(configuration);
    >> - return this.resolveRuntimeClasspathEntry(entry, prj);
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .launching
    >> .IRuntimeClasspathEntryResolver
    >> #resolveRuntimeClasspathEntry
    >> (org.eclipse.jdt.launching.IRuntimeClasspathEntry,
    >> - * org.eclipse.jdt.core.IJavaProject)
    >> - */
    >> - public IRuntimeClasspathEntry[]
    >> resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry,
    >> IJavaProject project) throws CoreException {
    >> - IPath path = entry.getClasspathEntry().getPath();
    >> -
    >> - List rawEntries = new
    >> ArrayList(Arrays.asList(project.getRawClasspath()));
    >> -
    >> - IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
    >> -
    >> - Set referencedFrameworks = new HashSet();
    >> - while (!rawEntries.isEmpty()) {
    >> - IClasspathEntry thisOne = (IClasspathEntry) rawEntries.remove(0);
    >> - if (IClasspathEntry.CPE_PROJECT == thisOne.getEntryKind()) {
    >> - String name = thisOne.getPath().lastSegment();
    >> - if (!referencedFrameworks.contains(name)) {
    >> - referencedFrameworks.add(name);
    >> - try {
    >> - IJavaProject refPrj =
    >> JavaCore.create(wsRoot.getProject(name));
    >> - rawEntries.addAll(Arrays.asList(refPrj.getRawClasspath()));
    >> - } catch (CoreException up) {
    >> - // ignore, for now
    >> - System.out.println(up);
    >> - }
    >> - }
    >> - }
    >> - }
    >> -
    >> - IPath resultPath = new Path(path.segment(0));
    >> -
    >> - for (int i = 1; i < path.segmentCount(); ++i) {
    >> - String segment = path.segment(i);
    >> - if (!referencedFrameworks.contains(segment)) {
    >> - resultPath = resultPath.append(segment);
    >> - }
    >> - }
    >> -
    >> - WOClasspathContainer rcc = new WOClasspathContainer(resultPath);
    >> -
    >> - IClasspathEntry re[] = rcc.getClasspathEntries();
    >> - IRuntimeClasspathEntry rrce[] = new
    >> IRuntimeClasspathEntry[re.length];
    >> -
    >> - for (int i = 0; i < re.length; ++i) {
    >> - rrce[i] =
    >> JavaRuntime.newArchiveRuntimeClasspathEntry(re[i].getPath());
    >> - }
    >> -
    >> - return rrce;
    >> - }
    >> -
    >> - /*
    >> - * (non-Javadoc)
    >> - *
    >> - *..ee
    >> org
    >> .eclipse
    >> .jdt
    >> .launching
    >> .IRuntimeClasspathEntryResolver
    >> #resolveVMInstall(org.eclipse.jdt.core.IClasspathEntry)
    >> - */
    >> - public IVMInstall resolveVMInstall(IClasspathEntry entry) throws
    >> CoreException {
    >> - return null;
    >> - }
    >> -
    >> -}
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/plugin.xml
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/plugin.xml 2007-11-06 00:06:44 UTC
    >> (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.launching/plugin.xml 2007-11-06 18:29:31 UTC
    >> (rev 4607)
    >>.. -61,19 +61,8 @@
    >>
    >> id="org.objectstyle.wolips.launching.WORuntimeClasspathProvider">
    >> </classpathProvider>
    >> </extension>
    >> +
    >> <!--
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> ===================================================================
    >> -->
    >> -<!-- Extension: runtime classpath entry
    >> resolvers -->
    >> -<!--
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> ===================================================================
    >> -->
    >> - <extension
    >> -
    >> point="org.eclipse.jdt.launching.runtimeClasspathEntryResolvers">
    >> - <runtimeClasspathEntryResolver
    >> -
    >> class
    >> =
    >> "org
    >> .objectstyle.wolips.launching.classpath.WORuntimeClasspathResolver"
    >> - container="org.objectstyle.wolips.WO_CLASSPATH"
    >> -
    >> id
    >> =
    >> "org
    >> .objectstyle.wolips.launching.classpath.WORuntimeClasspathResolver"
    >> -
    >> runtimeClasspathEntryId
    >> ="org.objectstyle.wolips.launching.WORuntimeClasspathProvider">
    >> - </runtimeClasspathEntryResolver>
    >> - </extension>
    >> -<!--
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> ===================================================================
    >> -->
    >> <!-- Extension: Launch
    >> shortcuts -->
    >> <!--
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> ===================================================================
    >> -->
    >> <extension
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/.classpath
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/.classpath 2007-11-06 00:06:44 UTC
    >> (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/.classpath 2007-11-06 18:29:31 UTC
    >> (rev 4607)
    >>.. -3,6 +3,5 @@
    >> <classpathentry kind="src" path="java"/>
    >> <classpathentry kind="con"
    >> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    >> <classpathentry kind="con"
    >> path="org.eclipse.pde.core.requiredPlugins"/>
    >> - <classpathentry kind="src" path="/org.objectstyle.wolips.jdt"/>
    >> <classpathentry kind="output" path="bin"/>
    >> </classpath>
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/META-INF/MANIFEST.MF
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/META-INF/MANIFEST.MF 2007-11-06
    >> 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/META-INF/MANIFEST.MF 2007-11-06
    >> 18:29:31 UTC (rev 4607)
    >>.. -21,7 +21,10 @@
    >> org.objectstyle.wolips.eogenerator.jdt,
    >> org.eclipse.ui,
    >> org.eclipse.core.resources,
    >> + org.objectstyle.wolips.jdt,
    >> + org.eclipse.core.resources,
    >> org.objectstyle.wolips.bindings
    >> Eclipse-LazyStart: true
    >> Export-Package: org.objectstyle.wolips.wizards,
    >> - org.objectstyle.wolips.wizards.actions
    >> + org.objectstyle.wolips.wizards.actions,
    >> + org.objectstyle.wolips.wizards.template
    >>
    >> Modified: trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/
    >> NewWOProjectWizard.java
    >> ===================================================================
    >> --- trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/
    >> NewWOProjectWizard.java 2007-11-06 00:06:44 UTC (rev 4606)
    >> +++ trunk/woproject/wolips/core/plugins/
    >> org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/
    >> NewWOProjectWizard.java 2007-11-06 18:29:31 UTC (rev 4607)
    >>.. -6,7 +6,6 @@
    >> import java.util.ArrayList;
    >> import java.util.HashMap;
    >> import java.util.HashSet;
    >> -import java.util.Iterator;
    >> import java.util.List;
    >> import java.util.Set;
    >> import java.util.StringTokenizer;
    >>.. -20,6 +19,7 @@
    >> import org.eclipse.core.runtime.CoreException;
    >> import org.eclipse.core.runtime.IConfigurationElement;
    >> import org.eclipse.core.runtime.IExecutableExtension;
    >> +import org.eclipse.core.runtime.IPath;
    >> import org.eclipse.core.runtime.IProgressMonitor;
    >> import org.eclipse.core.runtime.IStatus;
    >> import org.eclipse.core.runtime.OperationCanceledException;
    >>.. -62,7 +62,10 @@
    >> import org.eclipse.ui.internal.util.PrefUtil;
    >> import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
    >> import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
    >> -import org.objectstyle.wolips.jdt.classpath.WOClasspathContainer;
    >> +import org.objectstyle.wolips.jdt.classpath.Container;
    >> +import org.objectstyle.wolips.jdt.classpath.ContainerEntries;
    >> +import org.objectstyle.wolips.jdt.classpath.ContainerEntry;
    >> +import org.objectstyle.wolips.jdt.classpath.PathCoderException;
    >> import org.objectstyle.wolips.templateengine.ProjectTemplate;
    >> import org.objectstyle.wolips.templateengine.TemplateDefinition;
    >> import org.objectstyle.wolips.templateengine.TemplateEngine;
    >>.. -115,14 +118,18 @@
    >> * Extension attribute name for preferred perspectives.
    >> */
    >> private static final String PREFERRED_PERSPECTIVES =
    >> "preferredPerspectives"; //$NON-NLS-1$
    >> +
    >> /**
    >> * New Project from Template wizard
    >> */
    >> protected static final int NEWPROJECT_TEMPLATE_WIZARD = 0;
    >> +
    >> /**
    >> * Valid project wizard types: WO_APPLICATION_WIZARD,
    >> D2W_APPLICATION_WIZARD, D2WS_APPLICATION_WIZARD, JARPROJECT_WIZARD,
    >> WO_FRAMEWORK_WIZARD, WONDER_APPLICATION_WIZARD,
    >> WONDER_D2W_APPLICATION_WIZARD, WONDER_FRAMEWORK_WIZARD,
    >> NEWPROJECT_TEMPLATE_WIZARD
    >> */
    >> - public enum WizardType {WO_APPLICATION_WIZARD,
    >> D2W_APPLICATION_WIZARD, D2WS_APPLICATION_WIZARD, JARPROJECT_WIZARD,
    >> WO_FRAMEWORK_WIZARD, WONDER_APPLICATION_WIZARD,
    >> WONDER_D2W_APPLICATION_WIZARD, WONDER_FRAMEWORK_WIZARD,
    >> NEWPROJ_TEMPLATE_WIZARD }
    >> + public enum WizardType {
    >> + WO_APPLICATION_WIZARD, D2W_APPLICATION_WIZARD,
    >> D2WS_APPLICATION_WIZARD, JARPROJECT_WIZARD, WO_FRAMEWORK_WIZARD,
    >> WONDER_APPLICATION_WIZARD, WONDER_D2W_APPLICATION_WIZARD,
    >> WONDER_FRAMEWORK_WIZARD, NEWPROJ_TEMPLATE_WIZARD
    >> + }
    >>
    >> private WizardNewProjectCreationPage _mainPage;
    >>
    >>.. -134,9 +141,9 @@
    >>
    >> protected PackageSpecifierWizardPage _packagePage;
    >>
    >> - protected WOWebServicesWizardPage _webservicesSupportPage;
    >> + protected WOWebServicesWizardPage _webservicesSupportPage;
    >>
    >> - protected WOFrameworkSupportPage _frameworkSupportPage;
    >> + protected WOFrameworkSupportPage _frameworkSupportPage;
    >>
    >> protected TemplateInputsWizardPage _templateInputsWizardPage;
    >>
    >>.. -184,7 +191,6 @@
    >> _mainPage = createMainPage();
    >> addPage(_mainPage);
    >>
    >> -
    >> if (wizardType == WizardType.D2W_APPLICATION_WIZARD || wizardType
    >> == WizardType.WO_APPLICATION_WIZARD || wizardType ==
    >> WizardType.D2WS_APPLICATION_WIZARD || wizardType ==
    >> WizardType.WO_FRAMEWORK_WIZARD) {
    >> _packagePage = createPackageSpecifierWizardPage();
    >> if (_packagePage != null) {
    >>.. -231,7 +237,7 @@
    >>
    >> protected String getPageDescription() {
    >> String description = ResourceMessages.NewProject_description;
    >> - if (getWizardType() == WizardType.D2W_APPLICATION_WIZARD ) {
    >> + if (getWizardType() == WizardType.D2W_APPLICATION_WIZARD) {
    >> description =
    >> Messages.getString("D2WApplicationWizard.description");
    >> }
    >>
    >>.. -298,8 +304,6 @@
    >> return frameworkPage;
    >> }
    >>
    >> -
    >> -
    >> /**
    >> * Creates a new project resource with the selected name.
    >> * <p>
    >>.. -734,7 +738,7 @@
    >> * Create a component in the default java package
    >> */
    >> protected void addComponentDefinition(String templateFolder,
    >> TemplateEngine engine, String path, String name) {
    >> - addComponentDefinition (templateFolder, engine, path, name, "");
    >> + addComponentDefinition(templateFolder, engine, path, name, "");
    >> }
    >>
    >> /**
    >>.. -747,12 +751,12 @@
    >> */
    >> protected void addComponentDefinition(String templateFolder,
    >> TemplateEngine engine, String rootPath, String name, String
    >> packagePath) {
    >> //create component dir
    >> - String componentPath = rootPath + File.separator + name + ".wo";
    >> + String componentPath = rootPath + File.separator + name + ".wo";
    >> File wo = new File(componentPath);
    >> wo.mkdirs();
    >>
    >> //create src dirs
    >> - String fullPackagePath = (packagePath != null &&
    >> packagePath.length() > 0) ? rootPath + File.separator +
    >> "src"+File.separator+packagePath : rootPath + File.separator + "src";
    >> + String fullPackagePath = (packagePath != null &&
    >> packagePath.length() > 0) ? rootPath + File.separator + "src" +
    >> File.separator + packagePath : rootPath + File.separator + "src";
    >> File srcPath = new File(fullPackagePath);
    >> srcPath.mkdirs();
    >>
    >>.. -767,9 +771,9 @@
    >> * EOModel Support
    >> */
    >> //key = file name, value = full path to file including file name
    >> - protected HashMap <String,String> getEOModelPaths() {
    >> + protected HashMap<String, String> getEOModelPaths() {
    >> if (_eomodelImportPage == null) {
    >> - return new HashMap<String,String>();
    >> + return new HashMap<String, String>();
    >> }
    >> return _eomodelImportPage.getModelPaths();
    >> }
    >>.. -780,7 +784,7 @@
    >> */
    >> public void createEOModelSupport(IProject project) {
    >> //Move any specified models over
    >> - HashMap <String, String> paths = getEOModelPaths();
    >> + HashMap<String, String> paths = getEOModelPaths();
    >> EOModelImportWorkspaceJob job = new
    >> EOModelImportWorkspaceJob("eomodel import", paths, project);
    >> job.schedule();
    >> }
    >>.. -811,11 +815,11 @@
    >>
    >> if (_webservicesSupportPage != null) {
    >> if (_webservicesSupportPage.getClientSupport()) {
    >> - engine.addTemplate(new TemplateDefinition("wowebservices"+"/
    >> client.wsdd.vm", path, "client.wsdd", "client.wsdd"));
    >> + engine.addTemplate(new TemplateDefinition("wowebservices" + "/
    >> client.wsdd.vm", path, "client.wsdd", "client.wsdd"));
    >> }
    >>
    >> if (_webservicesSupportPage.getServerSupport()) {
    >> - engine.addTemplate(new TemplateDefinition("wowebservices"+"/
    >> server.wsdd.vm", path, "server.wsdd", "server.wsdd"));
    >> + engine.addTemplate(new TemplateDefinition("wowebservices" + "/
    >> server.wsdd.vm", path, "server.wsdd", "server.wsdd"));
    >> }
    >> }
    >> }
    >>.. -826,24 +830,27 @@
    >> */
    >> public void addWebServiceFrameworks(IProject project) {
    >> if (project.isOpen()) {
    >> - ArrayList<String> frameworkPaths = new ArrayList<String>();
    >> + ArrayList<ContainerEntry> containerEntries = new
    >> ArrayList<ContainerEntry>();
    >>
    >> if (_webservicesSupportPage != null) {
    >> if (_webservicesSupportPage.getClientSupport()) {
    >> - frameworkPaths.add("JavaWebServicesClient");
    >> + ContainerEntry containerEntry = new
    >> ContainerEntry("JavaWebServicesClient");
    >> + containerEntries.add(containerEntry);
    >> }
    >>
    >> if (_webservicesSupportPage.getServerSupport()) {
    >> - frameworkPaths.add("JavaWebServicesGeneration");
    >> + ContainerEntry containerEntry = new
    >> ContainerEntry("JavaWebServicesGeneration");
    >> + containerEntries.add(containerEntry);
    >> }
    >>
    >> if (_webservicesSupportPage.getServerSupport() ||
    >> _webservicesSupportPage.getClientSupport()) {
    >> - frameworkPaths.add("JavaWebServicesSupport");
    >> + ContainerEntry containerEntry = new
    >> ContainerEntry("JavaWebServicesSupport");
    >> + containerEntries.add(containerEntry);
    >> }
    >> }
    >>
    >> //Classpath surgery
    >> - addFrameworksToClasspath(project, frameworkPaths);
    >> + addFrameworksToClasspath(project, containerEntries);
    >>
    >> } else {
    >> System.err.println("Warning: project is not open and cannot be
    >> fully configured");
    >>.. -853,10 +860,10 @@
    >> /*
    >> * Java Package Support
    >> */
    >> - public void createJavaPackageSupport (IProject project, String
    >> packagePath) {
    >> - String fullPath = project.getLocation().toOSString()
    >> +File.separator+"src";
    >> + public void createJavaPackageSupport(IProject project, String
    >> packagePath) {
    >> + String fullPath = project.getLocation().toOSString() +
    >> File.separator + "src";
    >> if (packagePath.length() > 0) {
    >> - fullPath = fullPath+File.separator+packagePath;
    >> + fullPath = fullPath + File.separator + packagePath;
    >> }
    >> File pFile = new File(fullPath);
    >> pFile.mkdirs();
    >>.. -865,21 +872,20 @@
    >> /**
    >> * Classpath Support
    >> */
    >> - public void addFrameworksToClasspath(IProject project,
    >> ArrayList<String> frameworks) {
    >> - StringBuilder frameworkPaths = new StringBuilder();
    >> - Iterator<String> it = frameworks.iterator();
    >> - while (it.hasNext()) {
    >> - frameworkPaths.append("/").append(it.next());
    >> - }
    >> -
    >> + public void addFrameworksToClasspath(IProject project,
    >> ArrayList<ContainerEntry> containerEntries) {
    >> //Classpath surgery
    >> try {
    >> - IJavaProject javaProject =
    >> (IJavaProject)project.getNature(JavaCore.NATURE_ID);
    >> - IClasspathEntry [] entries = javaProject.readRawClasspath();
    >> - ArrayList <IClasspathEntry> newEntries = new
    >> ArrayList<IClasspathEntry>(entries.length);
    >> - for (IClasspathEntry anEntry: entries) {
    >> - if
    >> (anEntry
    >> .getPath
    >> ().toString
    >> ().startsWith
    >> (WOClasspathContainer.WOLIPS_CLASSPATH_CONTAINER_IDENTITY)) {
    >> - IClasspathEntry entry =
    >> JavaCore
    >> .newContainerEntry
    >> (anEntry.getPath().append(frameworkPaths.toString()));
    >> + IJavaProject javaProject = (IJavaProject)
    >> project.getNature(JavaCore.NATURE_ID);
    >> + IClasspathEntry[] entries = javaProject.readRawClasspath();
    >> + ArrayList<IClasspathEntry> newEntries = new
    >> ArrayList<IClasspathEntry>(entries.length);
    >> + for (IClasspathEntry anEntry : entries) {
    >> + IPath containerPath = anEntry.getPath();
    >> + if
    >> (containerPath.segment(0).equals(Container.CONTAINER_IDENTITY)) {
    >> + ContainerEntries newContainerEntries =
    >> ContainerEntries.initWithPath(containerPath.removeFirstSegments(1));
    >> + newContainerEntries.add(containerEntries);
    >> + Container container = new Container(newContainerEntries);
    >> + IPath newPath = container.getPath();
    >> + IClasspathEntry entry = JavaCore.newContainerEntry(newPath);
    >> newEntries.add(entry);
    >> } else {
    >> newEntries.add(anEntry);
    >>.. -888,10 +894,9 @@
    >> javaProject.setRawClasspath(newEntries.toArray(new
    >> IClasspathEntry[] {}), javaProject.getOutputLocation(), null);
    >>
    >> } catch (CoreException e) {
    >> - ErrorDialog.openError(getShell(),
    >> -
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.title"),
    >> - e.toString(),
    >> - new Status(IStatus.WARNING,
    >> "org.objectstyle.wolips.wizards" , e.toString()));
    >> + ErrorDialog.openError(getShell(),
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.title"),
    >> e.toString(), new Status(IStatus.WARNING,
    >> "org.objectstyle.wolips.wizards", e.toString()));
    >> + } catch (PathCoderException e) {
    >> + ErrorDialog.openError(getShell(),
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.title"),
    >> e.toString(), new Status(IStatus.WARNING,
    >> "org.objectstyle.wolips.wizards", e.toString()));
    >> }
    >> }
    >>
    >>.. -900,26 +905,23 @@
    >> */
    >> public void createFrameworksSupport(IProject project) {
    >> if (project.isOpen()) {
    >> - ArrayList<String> frameworkPaths = new ArrayList<String>();
    >> + ArrayList<ContainerEntry> containerEntries = new
    >> ArrayList<ContainerEntry>();
    >>
    >> if (_frameworkSupportPage != null) {
    >> if (_frameworkSupportPage.getJNDISupport()) {
    >> - frameworkPaths.add("JavaJNDIAdaptor");
    >> + ContainerEntry containerEntry = new
    >> ContainerEntry("JavaJNDIAdaptor");
    >> + containerEntries.add(containerEntry);
    >> }
    >>
    >> if (_frameworkSupportPage.getJ2EESupport()) {
    >> - frameworkPaths.add("JavaWOJSPServlet");
    >> + ContainerEntry containerEntry = new
    >> ContainerEntry("JavaWOJSPServlet");
    >> + containerEntries.add(containerEntry);
    >> }
    >> }
    >> -
    >> - //Classpath surgery
    >> - addFrameworksToClasspath(project, frameworkPaths);
    >> -
    >> + // Classpath surgery
    >> + addFrameworksToClasspath(project, containerEntries);
    >> } else {
    >> - ErrorDialog.openError(getShell(),
    >> -
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.title"),
    >> -
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.message"),
    >> - new Status(IStatus.WARNING,
    >> "org.objectstyle.wolips.wizards" ,
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.message")));
    >> + ErrorDialog.openError(getShell(),
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.title"),
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.message"),
    >> new Status(IStatus.WARNING, "org.objectstyle.wolips.wizards",
    >> Messages
    >> .getString("NewWOProjectWizard.errorMessage.classpath.message")));
    >> }
    >> }
    >> }
    >>
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 07 2007 - 14:14:53 EST