Ist Projekt gelöscht?

  • Themenstarter Themenstarter asdfrgedfsyxc
  • Beginndatum Beginndatum
A

asdfrgedfsyxc

Gast
Hi,

ich habe in mein Plugin Handles zu IJavaElementen gespeichert. Ich möchte beim Start gerne prüfen, ob die Projekte auf die diesen verweisen noch existieren. Ich habe nun festgestellt, dass ich, obwohl das projekt gelöscht wurden ist, immer noch eine scheinbar gültige IJavaProject oder IProject-Referenz bekomme die mir dann angibt, dass ein projekt "nicht offen ist".

kann man das irgendwie von eclipse erfragen, ob ein Projekt existiert, bzw. zum workspace gehört
 
Hi,

im JavaDoc steht bei der methode:

"IResource objects are lightweight handle objects used to access resources in the workspace. However, having a handle object does not necessarily mean the workspace really has such a resource. When the workspace does have a genuine resource of a matching type, the resource is said to exist, and this method returns true; in all other cases, this method returns false. In particular, it returns false if the workspace has no resource at that path, or if it has a resource at that path with a type different from the type of this resource handle."

das doofe ist, dass diese bei exists false liefert, wenn das projekt geschlossen ist. Das macht es schwer ein geschlossenes Projekt von einem gelöschten zu unterscheiden.
 

Neue Themen


Zurück
Oben