Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] how to create a temporary working copy for a nonexisting cu?

This sounds like a fair expectation. Please enter a defect, we will
investigate.



|---------+------------------------------>
|         |           "Adam Kiezun"      |
|         |           <adam.kiezun@xxxxxx|
|         |           t>                 |
|         |           Sent by:           |
|         |           jdt-core-dev-admin@|
|         |           eclipse.org        |
|         |                              |
|         |                              |
|         |           07/24/2002 11:22 AM|
|         |           Please respond to  |
|         |           jdt-core-dev       |
|         |                              |
|---------+------------------------------>
  >------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                  |
  |       To:       <jdt-core-dev@xxxxxxxxxxx>                                                                       |
  |       cc:                                                                                                        |
  |       Subject:  [jdt-core-dev] how to create a temporary working copy for a nonexisting cu?                      |
  >------------------------------------------------------------------------------------------------------------------|




hi,
i'm not sure if i'm not missing something really easy here:

i'm trying to perform some operation that requires an ICompilationUnit.
the thing is that this ICompilationUnit does not exist - i have its source
and name but it does not exist on the disk.

so the question is: how do i get a handle to an not-existing
ICompilationUnit (can be a working copy) and set its contents?
IPackageFragment::getCompilationUnit(String) gives me a handle but then
calling getBuffer() (i wanted to call setContents(String) on
the buffer)
results in a JavaModelException

will i have to resort to temporarily creating the thing on the disk and
deleting afterwards? hope not as that would be not pretty.

merci
a.

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top