Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Lockfile is created on opening a visual class using visual editor
Lockfile is created on opening a visual class using visual editor [message #136070] Fri, 23 February 2007 11:56 Go to next message
Eclipse User
Originally posted by: Igor.Jasan.lbv.nrw.de

Hi,

the following lines of code are in my visual class:

...
public static String lockfilename = "drucken-lock";
...

public void WriteLockFile() {
try {
FileWriter out = new FileWriter(lockfilename);
int cnt = 0;
out.write(cnt + ": " + "\n");
out.close();
}
catch (IOException e) {
System.out.println("Fehler: Datei " + e.toString());
}
}

If I open my class in eclipse using the visual editor a file
"drucken-lock" is written into the project folder. This file is empty (0
bytes) and locked by the system. Only after closing the editor pane is it
possible to delete the file.
If I open the same class in the eclipse java editor nothing happens.

Is there any solution to this? I can't execute my application inside
eclipse if this lock file exists beforehand.

Thank you
Igor
Re: Lockfile is created on opening a visual class using visual editor [message #136088 is a reply to message #136070] Fri, 23 February 2007 13:43 Go to previous message
Eclipse User
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yes there is. Surround code like this:

if (!Beans.isDesigntime()) {
> try {
> FileWriter out = new FileWriter(lockfilename);
> int cnt = 0;
> out.write(cnt + ": " + "\n");
> out.close();
> }
> catch (IOException e) {
> System.out.println("Fehler: Datei " + e.toString());
> }
}

Igor wrote:
> Hi,
>
> the following lines of code are in my visual class:
>
> ...
> public static String lockfilename = "drucken-lock";
> ...
>
> public void WriteLockFile() {
> }
>
> If I open my class in eclipse using the visual editor a file
> "drucken-lock" is written into the project folder. This file is empty (0
> bytes) and locked by the system. Only after closing the editor pane is
> it possible to delete the file.
> If I open the same class in the eclipse java editor nothing happens.
>
> Is there any solution to this? I can't execute my application inside
> eclipse if this lock file exists beforehand.
>
> Thank you
> Igor
>

--
Thanks,
Rich Kulp
Re: Lockfile is created on opening a visual class using visual editor [message #615087 is a reply to message #136070] Fri, 23 February 2007 13:43 Go to previous message
Eclipse User
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yes there is. Surround code like this:

if (!Beans.isDesigntime()) {
> try {
> FileWriter out = new FileWriter(lockfilename);
> int cnt = 0;
> out.write(cnt + ": " + "\n");
> out.close();
> }
> catch (IOException e) {
> System.out.println("Fehler: Datei " + e.toString());
> }
}

Igor wrote:
> Hi,
>
> the following lines of code are in my visual class:
>
> ...
> public static String lockfilename = "drucken-lock";
> ...
>
> public void WriteLockFile() {
> }
>
> If I open my class in eclipse using the visual editor a file
> "drucken-lock" is written into the project folder. This file is empty (0
> bytes) and locked by the system. Only after closing the editor pane is
> it possible to delete the file.
> If I open the same class in the eclipse java editor nothing happens.
>
> Is there any solution to this? I can't execute my application inside
> eclipse if this lock file exists beforehand.
>
> Thank you
> Igor
>

--
Thanks,
Rich Kulp
Previous Topic:Lockfile is created on opening a visual class using visual editor
Next Topic:A simple PDE query
Goto Forum:
  


Current Time: Wed Oct 22 05:04:15 GMT 2014

Powered by FUDForum. Page generated in 0.01875 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software