• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

VAJ 3.5.3 - Import feature!

 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
While developing an application using VAJ, I accidentally deleted a java source file from the workspace named Clock.
I was developing this class(which is a frame) in "My Clock Project" ---> ClockPackage.VAJ found some problems while compiling this class.I went into the "All Problems" tab and when I tried to clear the log here, I was surprised to see that the java source file (Clock.java) in the workspace has been deleted!This is quite unlike what I had experienced with Oracle JDeveloper IDE.
I have read that although this file is deleted from the workspace, it still exists in the repository.However, I am unable to import this file in the workspace.
Could you explain how I should use the import feature in this case?I believe, I need to select a Directory and point to ivj.dat.But I am still not able to find the source file there!
The types shown in the Repository Explorer for the ClockPackage doesn't list Clock.So where is this file stored in the repository?
Thanks in advance,
Sandeep
PS : The package/project/class was not versioned.
-- Sandeep
 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you do not need to import
rather right click on workbench --> add class when dialog comes up click the radio button add types from repository - a list of whats available in teh repository will become available select your class
Fred
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fred,
I tried that earlier - but didnot see anything for the project in the repository.
Is it that only the Versioned editions go to the repository.If that is the case, are the open editions stored in the respository.I guess it is stored, since I got a warning that the class Clock or interface already exists in the repository when I tried creating the class with the same name again.
But why is it not showing that class in the Repository Explorer, once I delete the class?
Only when the class Clock exists in the workspace, I see the class in the Repository Explorer.Also, when I try to add a class, and select "Add from Repository" RadioButton, I DONOT see the class, even when the class is present in the workspace.

Please explain this.
Thanks in advance,
Sandeep
[This message has been edited by Desai Sandeep (edited July 31, 2001).]
 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you tried to compile/save the class with the problem, VAJ offers you the opportunity to save the class with the error, or to cancel the save. Is it possible you canceled the save and then deleted the class from your workspace without actually saving? If so, then it is reasonable that you cannot recover it.
It looks like when you cancel a save, there is some sort of record in the class in the repository, but it is not associated with the an edition of the package. The Repository Explorer doesn't have a way to display a class in the repository that is not associated with an a edition of its package (either an open edition or a version), so the class is effectively invisible to the Repository Explorer. However, it doesn't seem to cause any problems, just the (optional) warning message when you try to create the class with the same name. I presume it will just take up a bit of space in the repository until the next time you compact, just as it would if you had saved it and then purged it.
(Don't compact the respository until you have a chance to read exactly what compact does, and what you need to do to prepare.)
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,
Given the following steps I perform, do you believe I can retrieve the class back in the workspace ?

  1. Created a class, Clock extending java.awt.Frame
  2. Added the components (labels,buttons) in the frame using the VCE.
  3. Made the appropriate connections
  4. Saved the Bean with the "Save Bean" option in Bean menu of the VCE
  5. Noted that the workspace displays the error in the workspace
  6. Clicked on the "All Problems" tab in the Workspace
  7. Selected the class file here and pressed the Delete Key
  8. Received a warning dialog that the class file would be deleted..clicked OK
  9. Went back to the Workspace and discovered that the class has been deleted.This is fine!


  10. Although the class source file has been deleted (after being saved!) from the workspace, I believe, it would have been stored somewhere in the repository.I infer this because when I create a class with the same name again (in the same package) , I get a warning message that this class file exists as an Interface or a Class in the repository.However, it doesn't show up either in the Repository Explorer or the Add class screen.
    So, will I be able to get back my deleted source code back into the workspace?
    I haven't compacted my repository till now.I believe Compacting is allowed only if all the projects, including those in the current workspace has been versioned.
    Thanks,
    Sandeep
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I seem to have got it right now!It is working as John and Fred had mentioned.
I have noted that one can see only those types in the Repository Explorer, which are currently available in the workspace.So how does one delete a class, which shows up in the "Add Types from Repository.." in the Add Class wizard, but doesn't show up in the Repository Explorer.
To reiterate,this is what I want to do :

  1. Created a class Test, which extends java.lang.Object using the Add Class Wizard.
  2. Deleted the class Test from the workspace
  3. The edition of Test is still available in the repository as it features in the "Add class from Repository" list of the Add Class wizard.
  4. In the Repository Explorer, the type Test is not shown.

  5. I want to remove the edition of Test class from the Repository as well, so that next time, when I use the "Add Class" feature, the Test class doesn't appear in the "Add Class from Repository" list.How do I go about it?
    Thanks,
    Sandeep
    [This message has been edited by Desai Sandeep (edited August 01, 2001).]
 
John Dale
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Sandeep,
This is getting too deep for me, but I'll try.
I think that once you save a class in the repository, it stays there until you compact. You can delete it from a package, making it pretty invisible, but it still seems to be in the repository, recoverable by add class from repository. However, I think it will be removed from the repository when you compact, unless it is part of some versioned package.
I didn't realize this from my first reading of the documentation, but if that's really the way it works, it seems to be a nice feature.
If the problem is that you don't want the message to appear asking you to confirm that you want to create a class that is already in the repository, note that you can turn off that message.
I suppose you've noticed that packages have a different life cycle. You can Purge them from the repository. They may still be there until you Compact, available to Restore, but they are not visible to add package from repository unless you Restore.
Remember that, like you, I'm new to VAJ, so test what I say before relying on it.
John
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,
What you mentioned does make some sense.
I had given some thought on this.Probably, they don't allow deleting a class in the open edition since, you are still in the Development phase.Once you version a package it means that you have more or less finalized the classes in that package.Hence, at the versioned level, we have a Compact Repository feature, which will remove all the purged contents permanently from the repository.It will also remove the links to our "Test class", which used to show up in the "Add Class from the Repository" list of the "Add Class.." Wizard.
I think the next time when you add the versioned edition of the package in the workspace, the new open edition will not list the "Test class" in the "Add Class from the Repository" list.
I still have to try this.But I believe this is how it should behave.Is that correct?
-- Sandeep
PS : BTW, as far as VAJ goes, you are far more experienced than me on this product.Hence, I have no hesitation to consider you as my GURU
Thanks for your explanation,
Sandeep
[This message has been edited by Desai Sandeep (edited August 03, 2001).]
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic