Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] IJavaProject.setRawClasspath, IJavaProject.setOutputLocation - undesirable effect of copying of all resources from old output location to new output location IJavaProject.setOutputLocation



Hi,

Sorry, I am re-posting my question after subscribing to the list.

Regards, Hetty
Database Advanced Technology
IBM Silicon Valley Lab
E-mail:  hetty@xxxxxxxxxx
Phone: (408) 463-4512, Tieline:  543-4512, Fax: (408) 463-3834


----- Forwarded by Hetty Dougherty/Santa Teresa/IBM on 07/10/2003 04:18 PM
-----
                                                                                                                             
                      Hetty Dougherty                                                                                        
                                               To:       jdt-core-dev@xxxxxxxxxxx                                            
                      07/10/2003 03:57         cc:       murray beaton/toronto/ibm@ibmca, Tanya Couch/Santa Teresa/IBM@IBMUS 
                      PM                       From:     Hetty Dougherty/Santa Teresa/IBM@IBMUS                              
                                               Subject:  IJavaProject.setRawClasspath, IJavaProject.setOutputLocation -      
                                                undesirable effect of copying  of all resources from old output location to  
                                                new output location  IJavaProject.setOutputLocation                          
                                                                                                                             
                                                                                                                             



Hi,

Can you explain why IJavaProject.setRawClasspath and
IJavaProject.setOutputLocation now copy all resources from
old output location to new output location ?
It seems that someone else also is not sure if this is the right thing to
do :
Here is the comments in BatchImageBuilder.copyExtraResourcesBack.

protected void copyExtraResourcesBack(ClasspathMultiDirectory
sourceLocation, final boolean deletedAll) throws CoreException {
// When, if ever, does a builder need to copy resources files (not .java or
.class) into the output folder?
// If we wipe the output folder at the beginning of the build then all
'extra' resources must be copied to the output folder.

This has a very undesirable effect on the data definition view within the
Data perspective.  The following example illustrates the problem.

1. Go to Java perspective.
2. Create a Java project (e.g. myjavaproj) and take all the defaults. The
default output folder is set to the project folder.
3. Go to Data perspective.
4. From Data Definition view, create DB, Schema, a table, a default SQL SP
in the project from step 1.
5. Go back to the Java perspective
6. Bring up the properties dialog of the Java project.
7. Change the Default output  folder to myjavaproj to
myjavaproj/myoutputdir . myoutputdir does not exist yet.
    Press OK.
   All resources including the EMF persistence files for the database
objects such as .dbxmi, schxmi, .tblxmi, .spxmi, are
   copied from the old output location (myjavaproj) to the new output
location (myjavaproj/outputdir ).

8. Go back to the Data Definition. Now the data elements are replicated in
the myjavaproj/myoutputdir because
    the EMF persistence files (.dbxmi, .schxmi, etc) were copied into the
new output location (myjavaproj/myoutputdir).
    These files have special significance to the data view and should not
have been copied to the new output location.

Please let me know if IJavaProject.setRawClasspath and
IJavaProject.setOutputLocation will be changed so they
do not copy files that may have other significance to other plugins.
Thanks.

Here is the call stack leading to copying of the output folder that you may
find useful

org.eclipse.core.launcher.Main at localhost:8170 (may be out of synch)
System Thread [Finalizer] (Running) (may be out of synch)
System Thread [Reference Handler] (Running) (may be out of synch)
System Thread [Signal dispatcher] (Running) (may be out of synch)
Thread [main] (Suspended)
      BatchImageBuilder$3.visit(IResourceProxy) line: 180
      Resource$1.visitElement(ElementTree, IPathRequestor, Object) line: 50
      ElementTreeIterator.doIteration(DataTreeNode, IElementContentVisitor)
line: 76
      ElementTreeIterator.doIteration(DataTreeNode, IElementContentVisitor)
line: 80
      ElementTreeIterator.iterate(IElementContentVisitor) line: 119
      Project(Resource).accept(IResourceProxyVisitor, int) line: 60
      BatchImageBuilder.copyExtraResourcesBack(ClasspathMultiDirectory,
boolean) line: 170
      BatchImageBuilder.cleanOutputFolders() line: 113
      BatchImageBuilder.build() line: 37
      JavaBuilder.buildAll() line: 194
      JavaBuilder.build(int, Map, IProgressMonitor) line: 122
      BuildManager$2.run() line: 427
      InternalPlatform.run(ISafeRunnable) line: 1006
      Platform.run(ISafeRunnable) line: 413
      BuildManager.basicBuild(int, IncrementalProjectBuilder, Map,
MultiStatus, IProgressMonitor) line: 125
      BuildManager.basicBuild(IProject, int, String, Map, MultiStatus,
IProgressMonitor) line: 181
      BuildManager.basicBuild(IProject, int, ICommand[], MultiStatus,
IProgressMonitor) line: 191
      BuildManager$1.run() line: 151
      InternalPlatform.run(ISafeRunnable) line: 1006
      Platform.run(ISafeRunnable) line: 413
      BuildManager.basicBuild(IProject, int, MultiStatus, IProgressMonitor)
line: 165
      BuildManager.basicBuildLoop(IProject[], IProject[], int, MultiStatus,
IProgressMonitor) line: 243
      BuildManager.build(int, IProgressMonitor) line: 212
      Workspace.endOperation(boolean, IProgressMonitor) line: 884
      Workspace.run(IWorkspaceRunnable, IProgressMonitor) line: 1600
      JavaElement.runOperation(JavaModelOperation, IProgressMonitor) line:
543
      JavaProject.setRawClasspath(IClasspathEntry[], IPath,
IProgressMonitor, boolean, IClasspathEntry[], boolean, boolean) line: 2159
      JavaProject.setRawClasspath(IClasspathEntry[], IPath,
IProgressMonitor) line: 2123


Regards, Hetty
Database Advanced Technology
IBM Silicon Valley Lab
E-mail:  hetty@xxxxxxxxxx
Phone: (408) 463-4512, Tieline:  543-4512, Fax: (408) 463-3834





Back to the top